[Xfce4-commits] <xfce4-panel:andrzejr/deskbar-github> Reverted to the previous method of changing pager orientation.

Andrzej noreply at xfce.org
Mon Dec 12 11:40:12 CET 2011


Updating branch refs/heads/andrzejr/deskbar-github
         to b1082e799173df1b620a453163058a1bba6df3db (commit)
       from 0e6a9ecb92708cef71c569c0a107423086ee17b3 (commit)

commit b1082e799173df1b620a453163058a1bba6df3db
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Fri Nov 11 06:23:02 2011 +0900

    Reverted to the previous method of changing pager orientation.
    
    This method avoids unnecessary allocation of the wnck or button objects.
    There are still some problems with aspect ratio of workspaces in the deskbar mode.

 plugins/pager/pager.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/plugins/pager/pager.c b/plugins/pager/pager.c
index 94d563a..7c7c5f6 100644
--- a/plugins/pager/pager.c
+++ b/plugins/pager/pager.c
@@ -401,7 +401,15 @@ static void
 pager_plugin_orientation_changed (XfcePanelPlugin *panel_plugin,
                                   GtkOrientation   orientation)
 {
-  pager_plugin_screen_layout_changed (XFCE_PAGER_PLUGIN (panel_plugin));
+  PagerPlugin *plugin = XFCE_PAGER_PLUGIN (panel_plugin);
+
+  if (xfce_panel_plugin_get_deskbar_mode (panel_plugin))
+    orientation = GTK_ORIENTATION_HORIZONTAL;
+
+  if (plugin->miniature_view)
+    wnck_pager_set_orientation (WNCK_PAGER (plugin->pager), orientation);
+  else
+    pager_buttons_set_orientation (XFCE_PAGER_BUTTONS (plugin->pager), orientation);
 }
 
 
@@ -409,7 +417,8 @@ static void
 pager_plugin_deskbar_mode_changed (XfcePanelPlugin *panel_plugin,
                                    gboolean         deskbar_mode)
 {
-  pager_plugin_screen_layout_changed (XFCE_PAGER_PLUGIN (panel_plugin));
+  pager_plugin_orientation_changed (XFCE_PAGER_PLUGIN (panel_plugin),
+                                    xfce_panel_plugin_get_orientation (panel_plugin));
 }
 
 


More information about the Xfce4-commits mailing list