summaryrefslogtreecommitdiff
path: root/accessx-status
diff options
context:
space:
mode:
authorCallum McKenzie <callum@src.gnome.org>2009-04-01 00:28:28 +0000
committerCallum McKenzie <callum@src.gnome.org>2009-04-01 00:28:28 +0000
commit8550642819d5f33b30971544ce522ab5ed109720 (patch)
treee4101a37808d77900a2a40faebeccfaab0fe1905 /accessx-status
parent9bee1b4d88301a251b8510f7204858733c62d9d9 (diff)
Fix icon-locating code for the accessx applet (bug 5767070)
svn path=/trunk/; revision=11432
Diffstat (limited to 'accessx-status')
-rw-r--r--accessx-status/ChangeLog5
-rw-r--r--accessx-status/applet.c11
2 files changed, 10 insertions, 6 deletions
diff --git a/accessx-status/ChangeLog b/accessx-status/ChangeLog
index b6fc122ea..bd0df486e 100644
--- a/accessx-status/ChangeLog
+++ b/accessx-status/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-31 Callum McKenzie <callum@spooky-possum.org>
+
+ * applet.c (accessx_applet_add_stock_icons): Make the icon loading
+ code actually work. Fixes bug 576707.
+
==================== 2.26.0 ======================
2009-03-16 Petr Kovar <pknbe@volny.cz>
diff --git a/accessx-status/applet.c b/accessx-status/applet.c
index 67379b348..e9c4e9ab8 100644
--- a/accessx-status/applet.c
+++ b/accessx-status/applet.c
@@ -896,8 +896,10 @@ accessx_applet_add_stock_icons (AccessxStatusApplet *sapplet, GtkWidget *widget)
filename = g_build_filename (ACCESSX_PIXMAPS_DIR,
stock_icons[i].name,
NULL);
- if (g_file_test (filename, G_FILE_TEST_EXISTS |
- G_FILE_TEST_IS_REGULAR)) {
+ if (g_file_test (filename, G_FILE_TEST_EXISTS) &&
+ g_file_test (filename, G_FILE_TEST_IS_REGULAR)) {
+ gtk_icon_source_set_filename (source, filename);
+ } else {
GtkIconSet *default_set =
gtk_icon_factory_lookup_default (GTK_STOCK_MISSING_IMAGE);
gtk_icon_source_set_pixbuf (source,
@@ -910,10 +912,7 @@ accessx_applet_add_stock_icons (AccessxStatusApplet *sapplet, GtkWidget *widget)
widget,
NULL));
}
- else {
- gtk_icon_source_set_filename (source, filename);
- g_free (filename);
- }
+ g_free (filename);
gtk_icon_source_set_state (source, stock_icons[i].state);
gtk_icon_source_set_state_wildcarded (source, stock_icons[i].wildcarded);
gtk_icon_set_add_source (icon_set, source);