[Xfce4-commits] <xfce4-panel:master> Fix order of menu items based on screen position (bug #6978).

Nick Schermer noreply at xfce.org
Wed Dec 15 16:46:01 CET 2010


Updating branch refs/heads/master
         to c484579aa10e2e2fe2ccde0b8ca2a20c288e646f (commit)
       from 739c225bfbc8f3e909be51760e5150797848311b (commit)

commit c484579aa10e2e2fe2ccde0b8ca2a20c288e646f
Author: Nick Schermer <nick at xfce.org>
Date:   Wed Dec 15 16:42:49 2010 +0100

    Fix order of menu items based on screen position (bug #6978).

 plugins/launcher/launcher.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 21c780e..d45ffbf 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -1226,6 +1226,9 @@ launcher_plugin_screen_position_changed (XfcePanelPlugin    *panel_plugin,
   /* set the new arrow direction */
   xfce_arrow_button_set_arrow_type (XFCE_ARROW_BUTTON (plugin->arrow),
       xfce_panel_plugin_arrow_type (panel_plugin));
+
+  /* destroy the menu to update sort order */
+  launcher_plugin_menu_destroy (plugin);
 }
 
 
@@ -1478,10 +1481,10 @@ launcher_plugin_menu_construct (LauncherPlugin *plugin)
         }
 
       /* depending on the menu position we prepend or append */
-      if (G_UNLIKELY (arrow_type == GTK_ARROW_DOWN))
-        gtk_menu_shell_append (GTK_MENU_SHELL (plugin->menu), mi);
-      else
+      if (G_UNLIKELY (arrow_type == GTK_ARROW_UP))
         gtk_menu_shell_prepend (GTK_MENU_SHELL (plugin->menu), mi);
+      else
+        gtk_menu_shell_append (GTK_MENU_SHELL (plugin->menu), mi);
 
       /* set the icon if one is set */
       icon_name = garcon_menu_item_get_icon_name (item);



More information about the Xfce4-commits mailing list