11a4b7ee2SBrad BishopFrom 0651f228cef01a6c3e4758a991cace1cd7721031 Mon Sep 17 00:00:00 2001
21a4b7ee2SBrad BishopFrom: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
31a4b7ee2SBrad BishopDate: Mon, 24 Sep 2012 09:57:46 +0200
41a4b7ee2SBrad BishopSubject: [PATCH] windowmenu: do not display desktop icon when no window is
51a4b7ee2SBrad Bishop active
61a4b7ee2SBrad BishopMIME-Version: 1.0
71a4b7ee2SBrad BishopContent-Type: text/plain; charset=UTF-8
81a4b7ee2SBrad BishopContent-Transfer-Encoding: 8bit
91a4b7ee2SBrad Bishop
101a4b7ee2SBrad Bishop* desktop icon is of no use
111a4b7ee2SBrad Bishop* desktop icon confuses when using showdesktop plugin
121a4b7ee2SBrad Bishop
131a4b7ee2SBrad BishopUpstream-Status: Pending
141a4b7ee2SBrad Bishop
151a4b7ee2SBrad BishopSigned-off-by: Andreas Müller <schnitzeltony@googlemail.com>
16517393d9SAndrew Geissler
17*8e7b46e2SPatrick WilliamsRebase for xfce4-panel 4.18.3.
18517393d9SAndrew Geissler
19517393d9SAndrew GeisslerSigned-off-by: Kai Kang <kai.kang@windriver.com>
201a4b7ee2SBrad Bishop---
211a4b7ee2SBrad Bishop plugins/windowmenu/windowmenu.c | 10 +++++-----
221a4b7ee2SBrad Bishop 1 file changed, 5 insertions(+), 5 deletions(-)
231a4b7ee2SBrad Bishop
241a4b7ee2SBrad Bishopdiff --git a/plugins/windowmenu/windowmenu.c b/plugins/windowmenu/windowmenu.c
25*8e7b46e2SPatrick Williamsindex be7dea4..2f432b0 100644
261a4b7ee2SBrad Bishop--- a/plugins/windowmenu/windowmenu.c
271a4b7ee2SBrad Bishop+++ b/plugins/windowmenu/windowmenu.c
28*8e7b46e2SPatrick Williams@@ -262,7 +262,7 @@ window_menu_plugin_init (WindowMenuPlugin *plugin)
291a4b7ee2SBrad Bishop   g_signal_connect (G_OBJECT (plugin->button), "toggled",
301a4b7ee2SBrad Bishop       G_CALLBACK (window_menu_plugin_menu), plugin);
311a4b7ee2SBrad Bishop
321a4b7ee2SBrad Bishop-  plugin->icon = gtk_image_new_from_icon_name ("user-desktop", GTK_ICON_SIZE_BUTTON);
331a4b7ee2SBrad Bishop+  plugin->icon = gtk_image_new_from_icon_name (NULL, GTK_ICON_SIZE_BUTTON);
341a4b7ee2SBrad Bishop   gtk_container_add (GTK_CONTAINER (plugin->button), plugin->icon);
351a4b7ee2SBrad Bishop   gtk_widget_show (plugin->icon);
36*8e7b46e2SPatrick Williams
37*8e7b46e2SPatrick Williams@@ -695,19 +695,19 @@ window_menu_plugin_active_window_changed (WnckScreen       *screen,
381a4b7ee2SBrad Bishop           /* skip 'fake' windows */
391a4b7ee2SBrad Bishop           type = wnck_window_get_window_type (window);
401a4b7ee2SBrad Bishop           if (type == WNCK_WINDOW_DESKTOP || type == WNCK_WINDOW_DOCK)
411a4b7ee2SBrad Bishop-            goto show_desktop_icon;
421a4b7ee2SBrad Bishop+            goto show_no_icon;
431a4b7ee2SBrad Bishop
44517393d9SAndrew Geissler           window_menu_plugin_set_icon (plugin, window);
451a4b7ee2SBrad Bishop         }
461a4b7ee2SBrad Bishop       else
471a4b7ee2SBrad Bishop         {
481a4b7ee2SBrad Bishop-          show_desktop_icon:
491a4b7ee2SBrad Bishop+          show_no_icon:
501a4b7ee2SBrad Bishop
511a4b7ee2SBrad Bishop           /* desktop is shown right now */
52517393d9SAndrew Geissler           icon_size = xfce_panel_plugin_get_icon_size (XFCE_PANEL_PLUGIN (plugin));
531a4b7ee2SBrad Bishop-          gtk_image_set_from_icon_name (GTK_IMAGE (icon), "user-desktop", icon_size);
541a4b7ee2SBrad Bishop+          gtk_image_set_from_icon_name (GTK_IMAGE (icon), NULL, icon_size);
551a4b7ee2SBrad Bishop           gtk_image_set_pixel_size (GTK_IMAGE (icon), icon_size);
561a4b7ee2SBrad Bishop-          gtk_widget_set_tooltip_text (GTK_WIDGET (icon), _("Desktop"));
571a4b7ee2SBrad Bishop+          gtk_widget_set_tooltip_text (GTK_WIDGET (icon), _("No Windows"));
581a4b7ee2SBrad Bishop         }
591a4b7ee2SBrad Bishop     }
601a4b7ee2SBrad Bishop }
611a4b7ee2SBrad Bishop--
621a4b7ee2SBrad Bishop2.14.3
631a4b7ee2SBrad Bishop
64