| Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 0651f228cef01a6c3e4758a991cace1cd7721031 Mon Sep 17 00:00:00 2001 | 
 | 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> | 
 | 3 | Date: Mon, 24 Sep 2012 09:57:46 +0200 | 
 | 4 | Subject: [PATCH] windowmenu: do not display desktop icon when no window is | 
 | 5 |  active | 
 | 6 | MIME-Version: 1.0 | 
 | 7 | Content-Type: text/plain; charset=UTF-8 | 
 | 8 | Content-Transfer-Encoding: 8bit | 
 | 9 |  | 
 | 10 | * desktop icon is of no use | 
 | 11 | * desktop icon confuses when using showdesktop plugin | 
 | 12 |  | 
 | 13 | Upstream-Status: Pending | 
 | 14 |  | 
 | 15 | Signed-off-by: Andreas MΓΌller <schnitzeltony@googlemail.com> | 
| Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 16 |  | 
 | 17 | Rebase for xfce4 4.18.0. | 
 | 18 |  | 
 | 19 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | 
| Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 20 | --- | 
 | 21 |  plugins/windowmenu/windowmenu.c | 10 +++++----- | 
 | 22 |  1 file changed, 5 insertions(+), 5 deletions(-) | 
 | 23 |  | 
 | 24 | diff --git a/plugins/windowmenu/windowmenu.c b/plugins/windowmenu/windowmenu.c | 
| Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 25 | index ba245a3..f8fdee8 100644 | 
| Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 26 | --- a/plugins/windowmenu/windowmenu.c | 
 | 27 | +++ b/plugins/windowmenu/windowmenu.c | 
| Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 28 | @@ -250,7 +250,7 @@ window_menu_plugin_init (WindowMenuPlugin *plugin) | 
| Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 |    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 Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 37 | @@ -680,19 +680,19 @@ window_menu_plugin_active_window_changed (WnckScreen       *screen, | 
| Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 38 |            /* 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 Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 44 |            window_menu_plugin_set_icon (plugin, window); | 
| Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 45 |          } | 
 | 46 |        else | 
 | 47 |          { | 
 | 48 | -          show_desktop_icon: | 
 | 49 | +          show_no_icon: | 
 | 50 |   | 
 | 51 |            /* desktop is shown right now */ | 
| Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 52 |            icon_size = xfce_panel_plugin_get_icon_size (XFCE_PANEL_PLUGIN (plugin)); | 
| Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 53 | -          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 | --  | 
 | 62 | 2.14.3 | 
 | 63 |  |