From d54eea534ea258db21b14933202ec8aefa2f66e9 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 4 Nov 2009 21:16:38 +0000 Subject: Add a convenience routine to convert pixbuf data generated by gdk-pixbuf-csource to a GtkImage. Use it to load the expert indicator images. Add prettier indicator images. The "chat" indicator is more blue in order to differentiate it from the "none" indicator; make the chat text background more blue to match. svn path=/trunk/; revision=30825 --- gtk/gui_utils.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gtk/gui_utils.c') diff --git a/gtk/gui_utils.c b/gtk/gui_utils.c index 9561b2ff9f..f93410b210 100644 --- a/gtk/gui_utils.c +++ b/gtk/gui_utils.c @@ -522,6 +522,15 @@ GtkWidget *xpm_to_widget(const char ** xpm) { return xpm_to_widget_from_parent(top_level, xpm); } +/* Convert an pixbuf data to a GtkWidget */ +/* Data should be created with "gdk-pixbuf-csource --raw" */ +GtkWidget *pixbuf_to_widget(const char * pb_data) { + GdkPixbuf *pixbuf; + + pixbuf = gdk_pixbuf_new_from_inline (-1, pb_data, FALSE, NULL); + return gtk_image_new_from_pixbuf(pixbuf); +} + /* * Key to attach the "un-decorated" title to the window, so that if the * user-specified decoration changes, we can correctly update the -- cgit v1.2.3