[Xfce4-commits] [apps/xfce4-taskmanager] 14/15: [wip] directly pass a hardcoded red GdkColor where gtk2 code pokes at GtkStyle internals

noreply at xfce.org noreply at xfce.org
Mon Dec 8 23:02:13 CET 2014


This is an automated email from the git hooks/post-receive script.

landry pushed a commit to branch landry/gtk3
in repository apps/xfce4-taskmanager.

commit eaa3886a5d9d41e80b8fba7719372c61909dc5f4
Author: Landry Breuil <landry at xfce.org>
Date:   Mon Dec 8 22:56:39 2014 +0100

    [wip] directly pass a hardcoded red GdkColor where gtk2 code pokes at GtkStyle internals
---
 src/process-monitor.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/process-monitor.c b/src/process-monitor.c
index 921992b..0b7cc6d 100644
--- a/src/process-monitor.c
+++ b/src/process-monitor.c
@@ -79,10 +79,15 @@ xtm_process_monitor_class_init (XtmProcessMonitorClass *klass)
 static void
 init_source_color (GtkWidget *widget, GtkStyle *prev_style, gpointer user_data)
 {
+#ifdef HAVE_GTK3
+	GdkColor *color;
+	gdk_color_parse("red", color);
+#else
 	GdkColor *color = &widget->style->base[GTK_STATE_SELECTED];
 	XTM_PROCESS_MONITOR (widget)->color_red = color->red / 65535.0;
 	XTM_PROCESS_MONITOR (widget)->color_green = color->green / 65535.0;
 	XTM_PROCESS_MONITOR (widget)->color_blue = color->blue / 65535.0;
+#endif
 }
 
 static void
@@ -276,7 +281,13 @@ xtm_process_monitor_paint (XtmProcessMonitor *monitor)
 	}
 	cairo_stroke (cr);
 
+#ifdef HAVE_GTK3
+	GdkColor *color;
+	gdk_color_parse("red", color);
+	gdk_cairo_set_source_color (cr, color);
+#else
 	gdk_cairo_set_source_color (cr, &GTK_WIDGET (monitor)->style->fg[GTK_STATE_NORMAL]);
+#endif
 	cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
 	cairo_set_line_width (cr, 1.0);
 	for (i = 25; i <= 75; i += 25)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list