aboutsummaryrefslogtreecommitdiff
path: root/libindicator/indicator-image-helper.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-11 10:51:17 -0600
committerTed Gould <ted@gould.cx>2010-03-11 10:51:17 -0600
commita6ecf4a5b44ae4179d17d1f78da80ced04209b32 (patch)
tree22220ffb54f4b58de1995565479f3841b6b86d0d /libindicator/indicator-image-helper.c
parente31a7de28b3a030186e49a4b0d88730604196539 (diff)
downloadlibayatana-indicator-a6ecf4a5b44ae4179d17d1f78da80ced04209b32.tar.gz
libayatana-indicator-a6ecf4a5b44ae4179d17d1f78da80ced04209b32.tar.bz2
libayatana-indicator-a6ecf4a5b44ae4179d17d1f78da80ced04209b32.zip
Watching for style changes on the image.
Diffstat (limited to 'libindicator/indicator-image-helper.c')
-rw-r--r--libindicator/indicator-image-helper.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libindicator/indicator-image-helper.c b/libindicator/indicator-image-helper.c
index ae417c7..86d6c25 100644
--- a/libindicator/indicator-image-helper.c
+++ b/libindicator/indicator-image-helper.c
@@ -109,6 +109,15 @@ image_destroyed_cb (GtkImage * image, gpointer user_data)
return;
}
+/* Catch the style changing on the image to make sure
+ we've got the latest. */
+static void
+image_style_change_cb (GtkImage * image, GtkStyle * previous_style, gpointer user_data)
+{
+ refresh_image(image);
+ return;
+}
+
/* Builds an image with the name and fallbacks and all kinds of fun
stuff . */
GtkImage *
@@ -146,6 +155,7 @@ indicator_image_helper_update (GtkImage * image, const gchar * name)
if (!seen_previously) {
g_signal_connect(G_OBJECT(gtk_icon_theme_get_default()), "changed", G_CALLBACK(theme_changed_cb), image);
g_signal_connect(G_OBJECT(image), "destroy", G_CALLBACK(image_destroyed_cb), NULL);
+ g_signal_connect(G_OBJECT(image), "style-set", G_CALLBACK(image_style_change_cb), NULL);
}
return;