[Xfce4-commits] [xfce/xfce4-panel] 01/01: Action buttons: default to a horizontal button layout in the deskbar mode

noreply at xfce.org noreply at xfce.org
Sat May 10 01:22:38 CEST 2014


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

andrzejr pushed a commit to branch master
in repository xfce/xfce4-panel.

commit b72f3182b1c7a6cbe48c4ee1028df318cde35b2f
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Sat May 10 00:22:26 2014 +0100

    Action buttons: default to a horizontal button layout in the deskbar mode
---
 plugins/actions/actions.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/plugins/actions/actions.c b/plugins/actions/actions.c
index 53ff8d0..80a83d1 100644
--- a/plugins/actions/actions.c
+++ b/plugins/actions/actions.c
@@ -438,7 +438,8 @@ actions_plugin_size_changed (XfcePanelPlugin *panel_plugin,
       box = gtk_bin_get_child (GTK_BIN (plugin));
       if (box != NULL)
         {
-          if (plugin->invert_orientation)
+          if (plugin->invert_orientation !=
+              (xfce_panel_plugin_get_mode (panel_plugin) == XFCE_PANEL_PLUGIN_MODE_DESKBAR))
             {
               children = gtk_container_get_children (GTK_CONTAINER (box));
               if (G_UNLIKELY (children == NULL))
@@ -1092,12 +1093,15 @@ actions_plugin_pack_idle (gpointer data)
   if (plugin->items == NULL)
     plugin->items = actions_plugin_default_array ();
 
-  orientation = xfce_panel_plugin_get_orientation (XFCE_PANEL_PLUGIN (plugin));
-
   allowed_types = actions_plugin_actions_allowed ();
 
   if (plugin->type == APPEARANCE_TYPE_BUTTONS)
     {
+      if (xfce_panel_plugin_get_mode (XFCE_PANEL_PLUGIN (plugin)) == XFCE_PANEL_PLUGIN_MODE_VERTICAL)
+        orientation = GTK_ORIENTATION_VERTICAL;
+      else
+        orientation = GTK_ORIENTATION_HORIZONTAL;
+
       if (plugin->invert_orientation)
         orientation = !orientation;
       box = xfce_hvbox_new (orientation, FALSE, 0);
@@ -1113,7 +1117,8 @@ actions_plugin_pack_idle (gpointer data)
 
           /* skip separators when packing buttons in the opposite
            * orientation */
-          if (plugin->invert_orientation
+          if (plugin->invert_orientation !=
+              (xfce_panel_plugin_get_mode (XFCE_PANEL_PLUGIN (plugin)) == XFCE_PANEL_PLUGIN_MODE_DESKBAR)
               && g_strcmp0 (name + 1, "separator") == 0)
             continue;
 

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


More information about the Xfce4-commits mailing list