[Xfce4-commits] <xfce4-panel:andrzejr/deskbar-github> Added support for the deskbar mode in a "pager" plug-in.
Andrzej
noreply at xfce.org
Mon Dec 12 11:40:08 CET 2011
Updating branch refs/heads/andrzejr/deskbar-github
to 4cfca15e1faa64880dc17490d6891a9edb3342f9 (commit)
from 860755c34a18d77392b06453af4b2b28d2f3cdc2 (commit)
commit 4cfca15e1faa64880dc17490d6891a9edb3342f9
Author: Andrzej <ndrwrdck at gmail.com>
Date: Fri Nov 11 05:00:36 2011 +0900
Added support for the deskbar mode in a "pager" plug-in.
plugins/pager/pager.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/plugins/pager/pager.c b/plugins/pager/pager.c
index 16e3d94..94d563a 100644
--- a/plugins/pager/pager.c
+++ b/plugins/pager/pager.c
@@ -59,6 +59,8 @@ static gboolean pager_plugin_size_changed (XfcePanelPlugin *pa
gint size);
static void pager_plugin_orientation_changed (XfcePanelPlugin *panel_plugin,
GtkOrientation orientation);
+static void pager_plugin_deskbar_mode_changed (XfcePanelPlugin *panel_plugin,
+ gboolean deskbar_mode);
static void pager_plugin_configure_workspace_settings (GtkWidget *button);
static void pager_plugin_configure_plugin (XfcePanelPlugin *panel_plugin);
static void pager_plugin_screen_layout_changed (PagerPlugin *plugin);
@@ -119,6 +121,7 @@ pager_plugin_class_init (PagerPluginClass *klass)
plugin_class->free_data = pager_plugin_free_data;
plugin_class->size_changed = pager_plugin_size_changed;
plugin_class->orientation_changed = pager_plugin_orientation_changed;
+ plugin_class->deskbar_mode_changed = pager_plugin_deskbar_mode_changed;
plugin_class->configure_plugin = pager_plugin_configure_plugin;
g_object_class_install_property (gobject_class,
@@ -287,6 +290,8 @@ pager_plugin_screen_layout_changed (PagerPlugin *plugin)
}
orientation = xfce_panel_plugin_get_orientation (XFCE_PANEL_PLUGIN (plugin));
+ if (xfce_panel_plugin_get_deskbar_mode (XFCE_PANEL_PLUGIN (plugin)))
+ orientation = GTK_ORIENTATION_HORIZONTAL;
if (plugin->miniature_view)
{
@@ -396,15 +401,17 @@ static void
pager_plugin_orientation_changed (XfcePanelPlugin *panel_plugin,
GtkOrientation orientation)
{
- PagerPlugin *plugin = XFCE_PAGER_PLUGIN (panel_plugin);
-
- if (plugin->miniature_view)
- wnck_pager_set_orientation (WNCK_PAGER (plugin->pager), orientation);
- else
- pager_buttons_set_orientation (XFCE_PAGER_BUTTONS (plugin->pager), orientation);
+ pager_plugin_screen_layout_changed (XFCE_PAGER_PLUGIN (panel_plugin));
}
+static void
+pager_plugin_deskbar_mode_changed (XfcePanelPlugin *panel_plugin,
+ gboolean deskbar_mode)
+{
+ pager_plugin_screen_layout_changed (XFCE_PAGER_PLUGIN (panel_plugin));
+}
+
static void
pager_plugin_configure_workspace_settings (GtkWidget *button)
More information about the Xfce4-commits
mailing list