diff options
author | Anders Broman <anders.broman@ericsson.com> | 2013-01-04 17:07:26 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2013-01-04 17:07:26 +0000 |
commit | d9d58c34f298a0c3340bfb01976ffe0c7a49c317 (patch) | |
tree | b16578a07fdd3acaff62dd0204d2f9f97b885c53 /ui/gtk/gui_utils.c | |
parent | 886ac9a613b48746c2a9f389de96a92a4b3ffcb6 (diff) |
Add a wrapper for gdk_cairo_set_source_rgba() in GTK2 and use it in io_stat.c
svn path=/trunk/; revision=46932
Diffstat (limited to 'ui/gtk/gui_utils.c')
-rw-r--r-- | ui/gtk/gui_utils.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ui/gtk/gui_utils.c b/ui/gtk/gui_utils.c index b03126757e..1c6aa8f74d 100644 --- a/ui/gtk/gui_utils.c +++ b/ui/gtk/gui_utils.c @@ -50,6 +50,7 @@ #include "ui/gtk/gtkglobals.h" #include "ui/gtk/gui_utils.h" #include "ui/gtk/font_utils.h" +#include "ui/gtk/color_utils.h" #include "ui/gtk/old-gtk-compat.h" @@ -2040,7 +2041,6 @@ gtk_separator_new(GtkOrientation orientation) */ #if !GTK_CHECK_VERSION(3,0,0) - #else /* GTK3 */ void @@ -2093,4 +2093,20 @@ ws_gtk_grid_set_homogeneous(GtkGrid *grid, gboolean homogeneous) gtk_grid_set_column_homogeneous(grid, homogeneous); } +/* + * Wrapp gdk_cairo_set_source_color() with the GTK 3 equivalent + * to be used in GTK2 + */ +#if !GTK_CHECK_VERSION(3,0,0) +void +gdk_cairo_set_source_rgba(cairo_t *cr, const GdkRGBA *rgba) +{ + GdkColor color; + + gdkRGBAcolor_to_GdkColor(&color, rgba); + + gdk_cairo_set_source_color(cr, &color); + +} +#endif /* !GTK_CHECK_VERSION(3,0,0) */ #endif /* GTK_CHECK_VERSION(3,0,0) */ |