Merge lp:~agateau/libindicator/rescan-icon-theme into lp:libindicator/0.4

Proposed by Aurélien Gâteau
Status: Merged
Merged at revision: 430
Proposed branch: lp:~agateau/libindicator/rescan-icon-theme
Merge into: lp:libindicator/0.4
Diff against target: 15 lines (+5/-0)
1 file modified
libindicator/indicator-image-helper.c (+5/-0)
To merge this branch: bzr merge lp:~agateau/libindicator/rescan-icon-theme
Reviewer Review Type Date Requested Status
Ted Gould Pending
Review via email: mp+70162@code.launchpad.net

Description of the change

Rescan the icon theme if the wanted icon cannot be found.

You can reproduce the problem with sni-qt test program:

bzr branch lp:sni-qt
cd sni-qt
mkdir build
cd build
cmake ..
make
tests/manual/systray

Then change the icon with the combobox less than 5 seconds after startup.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libindicator/indicator-image-helper.c'
--- libindicator/indicator-image-helper.c 2010-08-16 14:14:49 +0000
+++ libindicator/indicator-image-helper.c 2011-08-02 13:43:27 +0000
@@ -44,6 +44,11 @@
44 /* Look through the themes for that icon */44 /* Look through the themes for that icon */
45 icon_info = gtk_icon_theme_lookup_by_gicon(default_theme, icon_names, icon_size, 0);45 icon_info = gtk_icon_theme_lookup_by_gicon(default_theme, icon_names, icon_size, 0);
46 if (icon_info == NULL) {46 if (icon_info == NULL) {
47 /* Maybe the icon was just added to the theme, see if a rescan helps */
48 gtk_icon_theme_rescan_if_needed(default_theme);
49 icon_info = gtk_icon_theme_lookup_by_gicon(default_theme, icon_names, icon_size, 0);
50 }
51 if (icon_info == NULL) {
47 /* Try using the second item in the names, which should be the original filename supplied */52 /* Try using the second item in the names, which should be the original filename supplied */
48 const gchar * const * names = g_themed_icon_get_names(G_THEMED_ICON( icon_names ));53 const gchar * const * names = g_themed_icon_get_names(G_THEMED_ICON( icon_names ));
49 if (names) {54 if (names) {

Subscribers

People subscribed via source and target branches