aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-icon-factory.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@novell.com>2004-08-06 05:50:30 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-08-06 05:50:30 +0800
commitdccb069201949ec9f46a50dd5bfddc29634e00fa (patch)
treeabad00c0b9dda54617e2ea00531ab6b2ccba5d2e /e-util/e-icon-factory.c
parent7f82f1061a2230a0bb3866f12038d8afa5d0ee15 (diff)
downloadgsoc2013-evolution-dccb069201949ec9f46a50dd5bfddc29634e00fa.tar.gz
gsoc2013-evolution-dccb069201949ec9f46a50dd5bfddc29634e00fa.tar.zst
gsoc2013-evolution-dccb069201949ec9f46a50dd5bfddc29634e00fa.zip
connect to "changed" signal on the GnomeIconTheme object.
2004-08-05 Rodrigo Moya <rodrigo@novell.com> * e-icon-factory.c (e_icon_factory_init): connect to "changed" signal on the GnomeIconTheme object. (icon_theme_changed_cb): g_hash_table_foreach_remove all items in the hash table. (icon_foreach_remove): callback for removing hash table items. svn path=/trunk/; revision=26834
Diffstat (limited to 'e-util/e-icon-factory.c')
-rw-r--r--e-util/e-icon-factory.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/e-util/e-icon-factory.c b/e-util/e-icon-factory.c
index 14771b4bf0..3a8e79fa96 100644
--- a/e-util/e-icon-factory.c
+++ b/e-util/e-icon-factory.c
@@ -173,6 +173,17 @@ pixel_size_to_icon_size (int pixel_size)
return icon_size;
}
+static gboolean
+icon_foreach_remove (gpointer key, gpointer value, gpointer user_data)
+{
+ icon_free (value);
+}
+
+static void
+icon_theme_changed_cb (GnomeIconTheme *object, gpointer user_data)
+{
+ g_hash_table_foreach_remove (name_to_icon, (GHRFunc) icon_foreach_remove, NULL);
+}
/**
* e_icon_factory_init:
@@ -187,19 +198,18 @@ 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);
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);
}
-
static void
icon_foreach_free (gpointer key, gpointer value, gpointer user_data)
{
icon_free (value);
}
-
/**
* e_icon_factory_shutdown:
*