[Xfce4-commits] r29739 - in xfce4-panel/trunk: . plugins/showdesktop

Nick Schermer nick at xfce.org
Thu Apr 9 21:00:55 CEST 2009


Author: nick
Date: 2009-04-09 19:00:55 +0000 (Thu, 09 Apr 2009)
New Revision: 29739

Modified:
   xfce4-panel/trunk/NEWS
   xfce4-panel/trunk/plugins/showdesktop/showdesktop.c
Log:
Add icon-name fallback to the show desktop plugin (bug #5117).


Modified: xfce4-panel/trunk/NEWS
===================================================================
--- xfce4-panel/trunk/NEWS	2009-04-09 18:45:56 UTC (rev 29738)
+++ xfce4-panel/trunk/NEWS	2009-04-09 19:00:55 UTC (rev 29739)
@@ -6,6 +6,7 @@
 - Properly set the systray orientation property (bug #5149).
 - Fix xfce-hvbox not working with gtk 2.16 (bug #5166).
 - Don't crash the launcher plugin when the launcher entry list is empty.
+- Add icon-name fallback to the show desktop plugin (bug #5117).
 
 
 4.6.0

Modified: xfce4-panel/trunk/plugins/showdesktop/showdesktop.c
===================================================================
--- xfce4-panel/trunk/plugins/showdesktop/showdesktop.c	2009-04-09 18:45:56 UTC (rev 29738)
+++ xfce4-panel/trunk/plugins/showdesktop/showdesktop.c	2009-04-09 19:00:55 UTC (rev 29739)
@@ -29,7 +29,6 @@
 #include <libxfce4panel/xfce-panel-plugin.h>
 #include <libxfce4panel/xfce-panel-convenience.h>
 
-#define SHOW_DESKTOP_ICON_NAME  "gnome-fs-desktop"
 #define TIP_ACTIVE              _("Restore hidden windows")
 #define TIP_INACTIVE            _("Hide windows and show desktop")
 
@@ -66,9 +65,12 @@
     GdkPixbuf *pb;
     int width = size - 2 - 2 * MAX (sdd->button->style->xthickness,
                                     sdd->button->style->ythickness);
-    
-    pb = xfce_themed_icon_load (SHOW_DESKTOP_ICON_NAME, width);
-    if (pb) 
+
+    pb = xfce_themed_icon_load ("user-desktop", width);
+    if (G_UNLIKELY (pb == NULL))
+      pb = xfce_themed_icon_load ("gnome-fs-desktop", width);
+
+    if (pb != NULL) 
     {
         gtk_image_set_from_pixbuf (GTK_IMAGE (sdd->image), pb);
         g_object_unref (pb);




More information about the Xfce4-commits mailing list