aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-08-10 21:11:23 -0500
committerTed Gould <ted@gould.cx>2011-08-10 21:11:23 -0500
commit0a66155db574628f60542b45b1e6909f5343263e (patch)
tree4f648e6cbe4ce3df2c12d05ac16543dd281a6070
parenta51845f9aaed2a951eab8afba1aad685b3361f37 (diff)
parent1790510cc8db70c5adb3c2b3f25382d39db1a99f (diff)
downloadlibayatana-indicator-0a66155db574628f60542b45b1e6909f5343263e.tar.gz
libayatana-indicator-0a66155db574628f60542b45b1e6909f5343263e.tar.bz2
libayatana-indicator-0a66155db574628f60542b45b1e6909f5343263e.zip
Check a reload of the icon theme if needed
-rw-r--r--libindicator/indicator-image-helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libindicator/indicator-image-helper.c b/libindicator/indicator-image-helper.c
index b404b8f..23b08d0 100644
--- a/libindicator/indicator-image-helper.c
+++ b/libindicator/indicator-image-helper.c
@@ -44,6 +44,11 @@ refresh_image (GtkImage * image)
/* Look through the themes for that icon */
icon_info = gtk_icon_theme_lookup_by_gicon(default_theme, icon_names, icon_size, 0);
if (icon_info == NULL) {
+ /* Maybe the icon was just added to the theme, see if a rescan helps */
+ gtk_icon_theme_rescan_if_needed(default_theme);
+ icon_info = gtk_icon_theme_lookup_by_gicon(default_theme, icon_names, icon_size, 0);
+ }
+ if (icon_info == NULL) {
/* Try using the second item in the names, which should be the original filename supplied */
const gchar * const * names = g_themed_icon_get_names(G_THEMED_ICON( icon_names ));
if (names) {