blob: 10c456f45e11d15c46da5797b52b08ce0a945208 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 0651f228cef01a6c3e4758a991cace1cd7721031 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Mon, 24 Sep 2012 09:57:46 +0200
4Subject: [PATCH] windowmenu: do not display desktop icon when no window is
5 active
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10* desktop icon is of no use
11* desktop icon confuses when using showdesktop plugin
12
13Upstream-Status: Pending
14
15Signed-off-by: Andreas MΓΌller <schnitzeltony@googlemail.com>
Andrew Geissler517393d2023-01-13 08:55:19 -060016
17Rebase for xfce4 4.18.0.
18
19Signed-off-by: Kai Kang <kai.kang@windriver.com>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020---
21 plugins/windowmenu/windowmenu.c | 10 +++++-----
22 1 file changed, 5 insertions(+), 5 deletions(-)
23
24diff --git a/plugins/windowmenu/windowmenu.c b/plugins/windowmenu/windowmenu.c
Andrew Geissler517393d2023-01-13 08:55:19 -060025index ba245a3..f8fdee8 100644
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080026--- a/plugins/windowmenu/windowmenu.c
27+++ b/plugins/windowmenu/windowmenu.c
Andrew Geissler517393d2023-01-13 08:55:19 -060028@@ -250,7 +250,7 @@ window_menu_plugin_init (WindowMenuPlugin *plugin)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029 g_signal_connect (G_OBJECT (plugin->button), "toggled",
30 G_CALLBACK (window_menu_plugin_menu), plugin);
31
32- plugin->icon = gtk_image_new_from_icon_name ("user-desktop", GTK_ICON_SIZE_BUTTON);
33+ plugin->icon = gtk_image_new_from_icon_name (NULL, GTK_ICON_SIZE_BUTTON);
34 gtk_container_add (GTK_CONTAINER (plugin->button), plugin->icon);
35 gtk_widget_show (plugin->icon);
36 }
Andrew Geissler517393d2023-01-13 08:55:19 -060037@@ -680,19 +680,19 @@ window_menu_plugin_active_window_changed (WnckScreen *screen,
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038 /* skip 'fake' windows */
39 type = wnck_window_get_window_type (window);
40 if (type == WNCK_WINDOW_DESKTOP || type == WNCK_WINDOW_DOCK)
41- goto show_desktop_icon;
42+ goto show_no_icon;
43
Andrew Geissler517393d2023-01-13 08:55:19 -060044 window_menu_plugin_set_icon (plugin, window);
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080045 }
46 else
47 {
48- show_desktop_icon:
49+ show_no_icon:
50
51 /* desktop is shown right now */
Andrew Geissler517393d2023-01-13 08:55:19 -060052 icon_size = xfce_panel_plugin_get_icon_size (XFCE_PANEL_PLUGIN (plugin));
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080053- gtk_image_set_from_icon_name (GTK_IMAGE (icon), "user-desktop", icon_size);
54+ gtk_image_set_from_icon_name (GTK_IMAGE (icon), NULL, icon_size);
55 gtk_image_set_pixel_size (GTK_IMAGE (icon), icon_size);
56- gtk_widget_set_tooltip_text (GTK_WIDGET (icon), _("Desktop"));
57+ gtk_widget_set_tooltip_text (GTK_WIDGET (icon), _("No Windows"));
58 }
59 }
60 }
61--
622.14.3
63