[Xfce4-commits] [xfce/xfce4-panel] 02/02: directorymenu: Fix plugin menu autohide behaviour

noreply at xfce.org noreply at xfce.org
Mon Jul 1 00:07:52 CEST 2019


This is an automated email from the git hooks/post-receive script.

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-panel.

commit b3702a0596f43fb6339028bb8df3e63e70376dd1
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Mon Jul 1 00:07:22 2019 +0200

    directorymenu: Fix plugin menu autohide behaviour
---
 plugins/directorymenu/directorymenu.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/plugins/directorymenu/directorymenu.c b/plugins/directorymenu/directorymenu.c
index e0ab30d..cb918be 100644
--- a/plugins/directorymenu/directorymenu.c
+++ b/plugins/directorymenu/directorymenu.c
@@ -503,14 +503,16 @@ directory_menu_plugin_remote_event (XfcePanelPlugin *panel_plugin,
 
 
 static void
-directory_menu_plugin_selection_done (GtkWidget *menu,
-                                      GtkWidget *button)
+directory_menu_plugin_selection_done (GtkWidget           *menu,
+                                      DirectoryMenuPlugin *plugin)
 {
-  panel_return_if_fail (button == NULL || GTK_IS_TOGGLE_BUTTON (button));
+  panel_return_if_fail (plugin->button == NULL || GTK_IS_TOGGLE_BUTTON (plugin->button));
   panel_return_if_fail (GTK_IS_MENU (menu));
 
-  if (button != NULL)
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), FALSE);
+  xfce_panel_plugin_block_autohide (XFCE_PANEL_PLUGIN (plugin), FALSE);
+
+  if (plugin->button != NULL)
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (plugin->button), FALSE);
 
   /* delay destruction so we can handle the activate event first */
   panel_utils_destroy_later (GTK_WIDGET (menu));
@@ -1005,16 +1007,16 @@ directory_menu_plugin_menu (GtkWidget           *button,
 
   menu = gtk_menu_new ();
   g_signal_connect (G_OBJECT (menu), "deactivate",
-      G_CALLBACK (directory_menu_plugin_selection_done), button);
+      G_CALLBACK (directory_menu_plugin_selection_done), plugin);
 
   g_object_set_qdata_full (G_OBJECT (menu), menu_file,
                            g_object_ref (plugin->base_directory),
                            g_object_unref);
   directory_menu_plugin_menu_load (menu, plugin);
-
   gtk_menu_popup_at_widget (GTK_MENU (menu), button,
                             xfce_panel_plugin_get_orientation (XFCE_PANEL_PLUGIN (plugin)) == GTK_ORIENTATION_VERTICAL
                             ? GDK_GRAVITY_NORTH_EAST : GDK_GRAVITY_SOUTH_WEST,
                             GDK_GRAVITY_NORTH_WEST,
                             NULL);
+  xfce_panel_plugin_block_autohide (XFCE_PANEL_PLUGIN (plugin), TRUE);
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list