diff options
author | Gerald Combs <gerald@wireshark.org> | 2009-11-04 21:16:38 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2009-11-04 21:16:38 +0000 |
commit | d54eea534ea258db21b14933202ec8aefa2f66e9 (patch) | |
tree | 6fc1f8c82699f6ea4ca658e9dc8af63480ad49b3 /gtk/gui_utils.c | |
parent | cd0147c0047bb13426fced79af28c6d49dbc975f (diff) | |
download | wireshark-d54eea534ea258db21b14933202ec8aefa2f66e9.tar.gz wireshark-d54eea534ea258db21b14933202ec8aefa2f66e9.tar.bz2 wireshark-d54eea534ea258db21b14933202ec8aefa2f66e9.zip |
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
Diffstat (limited to 'gtk/gui_utils.c')
-rw-r--r-- | gtk/gui_utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 |