blob: 1adb14552db841e9455e5b2fec1359f7e37d6544 [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>
16---
17 plugins/windowmenu/windowmenu.c | 10 +++++-----
18 1 file changed, 5 insertions(+), 5 deletions(-)
19
20diff --git a/plugins/windowmenu/windowmenu.c b/plugins/windowmenu/windowmenu.c
21index f47e993e..061d6544 100644
22--- a/plugins/windowmenu/windowmenu.c
23+++ b/plugins/windowmenu/windowmenu.c
24@@ -251,7 +251,7 @@ window_menu_plugin_init (WindowMenuPlugin *plugin)
25 g_signal_connect (G_OBJECT (plugin->button), "toggled",
26 G_CALLBACK (window_menu_plugin_menu), plugin);
27
28- plugin->icon = gtk_image_new_from_icon_name ("user-desktop", GTK_ICON_SIZE_BUTTON);
29+ plugin->icon = gtk_image_new_from_icon_name (NULL, GTK_ICON_SIZE_BUTTON);
30 gtk_container_add (GTK_CONTAINER (plugin->button), plugin->icon);
31 gtk_widget_show (plugin->icon);
32 }
33@@ -640,7 +640,7 @@ window_menu_plugin_active_window_changed (WnckScreen *screen,
34 /* skip 'fake' windows */
35 type = wnck_window_get_window_type (window);
36 if (type == WNCK_WINDOW_DESKTOP || type == WNCK_WINDOW_DOCK)
37- goto show_desktop_icon;
38+ goto show_no_icon;
39
40 /* get the window icon and set the tooltip */
41 gtk_widget_set_tooltip_text (GTK_WIDGET (icon),
42@@ -660,12 +660,12 @@ window_menu_plugin_active_window_changed (WnckScreen *screen,
43 }
44 else
45 {
46- show_desktop_icon:
47+ show_no_icon:
48
49 /* desktop is shown right now */
50- gtk_image_set_from_icon_name (GTK_IMAGE (icon), "user-desktop", icon_size);
51+ gtk_image_set_from_icon_name (GTK_IMAGE (icon), NULL, icon_size);
52 gtk_image_set_pixel_size (GTK_IMAGE (icon), icon_size);
53- gtk_widget_set_tooltip_text (GTK_WIDGET (icon), _("Desktop"));
54+ gtk_widget_set_tooltip_text (GTK_WIDGET (icon), _("No Windows"));
55 }
56 }
57 }
58--
592.14.3
60