gnome-applets r11432 - trunk/accessx-status



Author: callum
Date: Wed Apr  1 00:28:28 2009
New Revision: 11432
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=11432&view=rev

Log:
Fix icon-locating code for the accessx applet (bug 5767070)

Modified:
   trunk/accessx-status/ChangeLog
   trunk/accessx-status/applet.c

Modified: trunk/accessx-status/applet.c
==============================================================================
--- trunk/accessx-status/applet.c	(original)
+++ trunk/accessx-status/applet.c	Wed Apr  1 00:28:28 2009
@@ -896,8 +896,10 @@
 			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 @@
 								    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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]