aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-icon-factory.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-11-26 21:57:33 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-11-26 21:57:33 +0800
commitb66bfd09f72ecd36a44aef9338cb53891c27048e (patch)
tree28bdb7fa525c4791be40d66d2ebdf1e098995557 /e-util/e-icon-factory.c
parent686e2dabe9ecfb69423dc50f84d012eb06b98dde (diff)
downloadgsoc2013-evolution-b66bfd09f72ecd36a44aef9338cb53891c27048e.tar.gz
gsoc2013-evolution-b66bfd09f72ecd36a44aef9338cb53891c27048e.tar.zst
gsoc2013-evolution-b66bfd09f72ecd36a44aef9338cb53891c27048e.zip
add proto
2004-11-26 JP Rosevear <jpr@novell.com> * e-icon-factory.h: add proto * e-icon-factory.c (e_icon_factory_init): cast to kill warning (e_icon_factory_get_image): new function to return a GtkImage widget give an icon name and size svn path=/trunk/; revision=27995
Diffstat (limited to 'e-util/e-icon-factory.c')
-rw-r--r--e-util/e-icon-factory.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/e-util/e-icon-factory.c b/e-util/e-icon-factory.c
index 82461f0c26..eac14f4e9f 100644
--- a/e-util/e-icon-factory.c
+++ b/e-util/e-icon-factory.c
@@ -34,6 +34,7 @@
#include <pthread.h>
+#include <gtk/gtkimage.h>
#include <libgnomeui/gnome-icon-theme.h>
#include <e-util/e-icon-factory.h>
@@ -200,7 +201,7 @@ e_icon_factory_init (void)
icon_theme = gnome_icon_theme_new ();
name_to_icon = g_hash_table_new (g_str_hash, g_str_equal);
- g_signal_connect (G_OBJECT (icon_theme), "changed", icon_theme_changed_cb, NULL);
+ g_signal_connect (G_OBJECT (icon_theme), "changed", G_CALLBACK (icon_theme_changed_cb), NULL);
broken16_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) broken_image_16_xpm);
broken24_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) broken_image_24_xpm);
@@ -333,6 +334,18 @@ e_icon_factory_get_icon (const char *icon_name, int icon_size)
return pixbuf;
}
+GtkWidget *
+e_icon_factory_get_image (const char *icon_name, int icon_size)
+{
+ GdkPixbuf *pixbuf;
+ GtkWidget *image;
+
+ pixbuf = e_icon_factory_get_icon (icon_name, icon_size);
+ image = gtk_image_new_from_pixbuf (pixbuf);
+ g_object_unref (pixbuf);
+
+ return image;
+}
/**
* e_icon_factory_get_icon_list: