[Xfce4-commits] <xfce4-panel:andrzejr/deskbar-github> Fixes after rebase to Nick's branch. More cleanup needed but the code should compile and more or less same as before the rebase.

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


Updating branch refs/heads/andrzejr/deskbar-github
         to 322ebaaa4a112f97a8a6db1196776f51ecaf7ffa (commit)
       from b62a8f92dba4f9636ce9f87208c754bead6fc913 (commit)

commit 322ebaaa4a112f97a8a6db1196776f51ecaf7ffa
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Sun Dec 11 15:09:09 2011 +0900

    Fixes after rebase to Nick's branch.
    More cleanup needed but the code should compile and more or less same as before the rebase.

 libxfce4panel/xfce-panel-plugin-provider.c  |   24 -----
 libxfce4panel/xfce-panel-plugin-provider.h  |   10 --
 libxfce4panel/xfce-panel-plugin.c           |  147 +--------------------------
 libxfce4panel/xfce-panel-plugin.h           |    8 --
 panel/panel-application.c                   |    1 -
 panel/panel-itembar.c                       |   40 +++-----
 panel/panel-plugin-external-46.c            |    2 -
 panel/panel-plugin-external.c               |   44 --------
 panel/panel-preferences-dialog.c            |    2 -
 panel/panel-preferences-dialog.glade        |   51 ---------
 panel/panel-window.c                        |   64 ------------
 plugins/actions/actions.c                   |   17 +---
 plugins/applicationsmenu/applicationsmenu.c |   45 +++-----
 plugins/launcher/launcher.c                 |   13 ---
 plugins/pager/pager.c                       |   65 +++++-------
 plugins/tasklist/tasklist-widget.c          |   49 ++++------
 plugins/tasklist/tasklist-widget.h          |    7 +-
 plugins/tasklist/tasklist.c                 |   40 ++------
 wrapper/main.c                              |    8 --
 19 files changed, 88 insertions(+), 549 deletions(-)

diff --git a/libxfce4panel/xfce-panel-plugin-provider.c b/libxfce4panel/xfce-panel-plugin-provider.c
index b29c0bf..b4ec7fc 100644
--- a/libxfce4panel/xfce-panel-plugin-provider.c
+++ b/libxfce4panel/xfce-panel-plugin-provider.c
@@ -137,30 +137,6 @@ xfce_panel_plugin_provider_set_nrows (XfcePanelPluginProvider *provider,
 
 
 void
-xfce_panel_plugin_provider_set_nrows (XfcePanelPluginProvider *provider,
-                                      guint                    nrows)
-{
-  panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (provider));
-  panel_return_if_fail (*XFCE_PANEL_PLUGIN_PROVIDER_GET_INTERFACE (provider)->set_nrows);
-
-  (*XFCE_PANEL_PLUGIN_PROVIDER_GET_INTERFACE (provider)->set_nrows) (provider, nrows);
-}
-
-
-
-void
-xfce_panel_plugin_provider_set_deskbar_mode (XfcePanelPluginProvider *provider,
-                                             gboolean                 deskbar_mode)
-{
-  panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (provider));
-  panel_return_if_fail (*XFCE_PANEL_PLUGIN_PROVIDER_GET_INTERFACE (provider)->set_deskbar_mode);
-
-  (*XFCE_PANEL_PLUGIN_PROVIDER_GET_INTERFACE (provider)->set_deskbar_mode) (provider, deskbar_mode);
-}
-
-
-
-void
 xfce_panel_plugin_provider_set_screen_position (XfcePanelPluginProvider *provider,
                                                 XfceScreenPosition       screen_position)
 {
diff --git a/libxfce4panel/xfce-panel-plugin-provider.h b/libxfce4panel/xfce-panel-plugin-provider.h
index 3587201..8e252c8 100644
--- a/libxfce4panel/xfce-panel-plugin-provider.h
+++ b/libxfce4panel/xfce-panel-plugin-provider.h
@@ -71,10 +71,6 @@ struct _XfcePanelPluginProviderInterface
   void         (*set_locked)          (XfcePanelPluginProvider       *provider,
                                        gboolean                       locked);
   void         (*ask_remove)          (XfcePanelPluginProvider       *provider);
-  void         (*set_nrows)           (XfcePanelPluginProvider       *provider,
-                                       guint                         nrows);
-  void         (*set_deskbar_mode)    (XfcePanelPluginProvider       *provider,
-                                       gboolean                      deskbar_mode);
 };
 
 /* signals send from the plugin to the panel (possibly through the wrapper) */
@@ -169,12 +165,6 @@ void                  xfce_panel_plugin_provider_set_mode            (XfcePanelP
 void                  xfce_panel_plugin_provider_set_nrows           (XfcePanelPluginProvider       *provider,
                                                                       guint                          rows);
 
-void                  xfce_panel_plugin_provider_set_nrows           (XfcePanelPluginProvider       *provider,
-                                                                      guint                          nrows);
-
-void                  xfce_panel_plugin_provider_set_deskbar_mode    (XfcePanelPluginProvider       *provider,
-                                                                      gboolean                       deskbar_mode);
-
 void                  xfce_panel_plugin_provider_set_screen_position (XfcePanelPluginProvider       *provider,
                                                                       XfceScreenPosition             screen_position);
 
diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index 55a5ecb..3b24c23 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -126,8 +126,6 @@ enum
   PROP_UNIQUE_ID,
   PROP_ORIENTATION,
   PROP_SIZE,
-  PROP_NROWS,
-  PROP_DESKBAR_MODE,
   PROP_SMALL,
   PROP_SCREEN_POSITION,
   PROP_EXPAND,
@@ -142,8 +140,6 @@ enum
   CONFIGURE_PLUGIN,
   FREE_DATA,
   ORIENTATION_CHANGED,
-  NROWS_CHANGED,
-  DESKBAR_MODE_CHANGED,
   REMOTE_EVENT,
   REMOVED,
   SAVE,
@@ -179,6 +175,7 @@ struct _XfcePanelPluginPrivate
   guint                shrink : 1;
   guint                nrows;
   XfcePanelPluginMode  mode;
+  gboolean             small : 1;
   XfceScreenPosition   screen_position;
   guint                locked : 1;
   GSList              *menu_items;
@@ -441,42 +438,6 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
                   G_TYPE_BOOLEAN, 1, G_TYPE_INT);
 
   /**
-   * XfcePanelPlugin::nrows-changed
-   * @plugin : an #XfcePanelPlugin.
-   * @nrows  : the new number of rows of the panel.
-   *
-   * This signal is emmitted whenever the number of rows of the panel
-   * the @plugin is on changes. Plugins writers can for example use
-   * this signal to update their icon size.
-   **/
-  plugin_signals[NROWS_CHANGED] =
-    g_signal_new (g_intern_static_string ("nrows-changed"),
-                  G_TYPE_FROM_CLASS (klass),
-                  G_SIGNAL_RUN_LAST,
-                  G_STRUCT_OFFSET (XfcePanelPluginClass, nrows_changed),
-                  NULL, NULL,
-                  g_cclosure_marshal_VOID__ENUM,
-                  G_TYPE_NONE, 1, G_TYPE_UINT);
-
-  /**
-   * XfcePanelPlugin::deskbar-mode-changed
-   * @plugin        : an #XfcePanelPlugin.
-   * @deskbar-mode  : a flag set to TRUE when the panel is in the deskbar mode.
-   *
-   * This signal is emmitted whenever the panel switches to or from the deskbar mode
-   * Plugins writers can for example use
-   * this signal to update the orientation of the icons.
-   **/
-  plugin_signals[DESKBAR_MODE_CHANGED] =
-    g_signal_new (g_intern_static_string ("deskbar-mode-changed"),
-                  G_TYPE_FROM_CLASS (klass),
-                  G_SIGNAL_RUN_LAST,
-                  G_STRUCT_OFFSET (XfcePanelPluginClass, deskbar_mode_changed),
-                  NULL, NULL,
-                  g_cclosure_marshal_VOID__ENUM,
-                  G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
-
-  /**
    * XfcePanelPlugin::screen-position-changed
    * @plugin   : an #XfcePanelPlugin.
    * @position : the new #XfceScreenPosition of the panel.
@@ -619,40 +580,6 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
                                                      | G_PARAM_STATIC_STRINGS));
 
   /**
-   * XfcePanelPlugin:nrows:
-   *
-   * The number of rows of the #XfcePanelPlugin. Plugin writer can use it to read the
-   * number of rows, but xfce_panel_plugin_get_nrows() is recommended.
-   *
-   * Since: 4.10
-   **/
-  g_object_class_install_property (gobject_class,
-                                   PROP_NROWS,
-                                   g_param_spec_uint ("nrows",
-                                                     "Number of Rows",
-                                                     "Number of rows of the plugin's panel",
-                                                     1, 8, 1,
-                                                     G_PARAM_READABLE
-                                                     | G_PARAM_STATIC_STRINGS));
-
-  /**
-   * XfcePanelPlugin:deskbar-mode:
-   *
-   * Is the #XfcePanelPlugin in a vertical deskbar mode? Plugin writer can use it to check the
-   * deskbar-mode flag, but xfce_panel_plugin_get_deskbar_mode() is recommended.
-   *
-   * Since: 4.10
-   **/
-  g_object_class_install_property (gobject_class,
-                                   PROP_DESKBAR_MODE,
-                                   g_param_spec_boolean ("deskbar-mode",
-                                                         "Deskbar Mode",
-                                                         "Deskbar mode flag of the plugin's panel",
-                                                         FALSE,
-                                                         G_PARAM_READABLE
-                                                         | G_PARAM_STATIC_STRINGS));
-
-  /**
    * XfcePanelPlugin:screen-position:
    *
    * The #XfceScreenPosition of the #XfcePanelPlugin. Plugin writer can use it
@@ -773,8 +700,6 @@ xfce_panel_plugin_init (XfcePanelPlugin *plugin)
   plugin->priv->property_base = NULL;
   plugin->priv->arguments = NULL;
   plugin->priv->size = 0;
-  plugin->priv->nrows = 1;
-  plugin->priv->deskbar_mode = FALSE;
   plugin->priv->small = FALSE;
   plugin->priv->expand = FALSE;
   plugin->priv->shrink = FALSE;
@@ -878,10 +803,6 @@ xfce_panel_plugin_get_property (GObject    *object,
       g_value_set_int (value, private->size);
       break;
 
-    case PROP_DESKBAR_MODE:
-      g_value_set_boolean (value, private->deskbar_mode);
-      break;
-
     case PROP_NROWS:
       g_value_set_uint (value, private->nrows);
       break;
@@ -1511,72 +1432,6 @@ xfce_panel_plugin_set_nrows (XfcePanelPluginProvider *provider,
 
 
 
-uint
-xfce_panel_plugin_get_nrows (XfcePanelPlugin *plugin)
-{
-  g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), TRUE);
-
-  return plugin->priv->nrows;
-}
-
-
-
-static void
-xfce_panel_plugin_set_nrows (XfcePanelPluginProvider *provider,
-                             guint                    nrows)
-{
-  XfcePanelPlugin *plugin = XFCE_PANEL_PLUGIN (provider);
-
-  panel_return_if_fail (XFCE_IS_PANEL_PLUGIN (provider));
-  /* check if update is required */
-  if (G_LIKELY (plugin->priv->nrows != nrows))
-    {
-      plugin->priv->nrows = nrows;
-
-      g_signal_emit (G_OBJECT (plugin),
-                     plugin_signals[NROWS_CHANGED], 0, nrows);
-
-      g_object_notify (G_OBJECT (plugin), "nrows");
-    }
-}
-
-
-
-gboolean
-xfce_panel_plugin_get_deskbar_mode (XfcePanelPlugin *plugin)
-{
-  g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), TRUE);
-
-  return plugin->priv->deskbar_mode;
-}
-
-
-
-static void
-xfce_panel_plugin_set_deskbar_mode (XfcePanelPluginProvider *provider,
-                                    gboolean                 deskbar_mode)
-{
-  XfcePanelPlugin *plugin = XFCE_PANEL_PLUGIN (provider);
-
-  panel_return_if_fail (XFCE_IS_PANEL_PLUGIN (provider));
-
-  /* normalize the value */
-  deskbar_mode = !!deskbar_mode;
-
-  if (G_LIKELY (plugin->priv->deskbar_mode != deskbar_mode))
-    {
-      plugin->priv->deskbar_mode = deskbar_mode;
-
-      g_signal_emit (G_OBJECT (plugin),
-                     plugin_signals[DESKBAR_MODE_CHANGED], 0,
-                     deskbar_mode);
-
-      g_object_notify (G_OBJECT (plugin), "deskbar-mode");
-    }
-}
-
-
-
 static void
 xfce_panel_plugin_set_screen_position (XfcePanelPluginProvider *provider,
                                        XfceScreenPosition       screen_position)
diff --git a/libxfce4panel/xfce-panel-plugin.h b/libxfce4panel/xfce-panel-plugin.h
index 84b11be..fce4e8d 100644
--- a/libxfce4panel/xfce-panel-plugin.h
+++ b/libxfce4panel/xfce-panel-plugin.h
@@ -120,10 +120,6 @@ struct _XfcePanelPluginClass
                                        gint                size);
   void     (*orientation_changed)     (XfcePanelPlugin    *plugin,
                                        GtkOrientation      orientation);
-  void     (*nrows_changed)           (XfcePanelPlugin    *plugin,
-                                       guint               nrows);
-  void     (*deskbar_mode_changed)    (XfcePanelPlugin    *plugin,
-                                       gboolean            deskbar_mode);
   void     (*free_data)               (XfcePanelPlugin    *plugin);
   void     (*save)                    (XfcePanelPlugin    *plugin);
   void     (*about)                   (XfcePanelPlugin    *plugin);
@@ -178,10 +174,6 @@ const gchar * const  *xfce_panel_plugin_get_arguments       (XfcePanelPlugin   *
 
 gint                  xfce_panel_plugin_get_size            (XfcePanelPlugin   *plugin) G_GNUC_PURE;
 
-guint                 xfce_panel_plugin_get_nrows           (XfcePanelPlugin   *plugin) G_GNUC_PURE;
-
-gboolean              xfce_panel_plugin_get_deskbar_mode    (XfcePanelPlugin   *plugin) G_GNUC_PURE;
-
 gboolean              xfce_panel_plugin_get_small           (XfcePanelPlugin   *plugin) G_GNUC_PURE;
 
 void                  xfce_panel_plugin_set_small           (XfcePanelPlugin   *plugin,
diff --git a/panel/panel-application.c b/panel/panel-application.c
index f1aeee3..104efdc 100644
--- a/panel/panel-application.c
+++ b/panel/panel-application.c
@@ -298,7 +298,6 @@ panel_application_xfconf_window_bindings (PanelApplication *application,
     { "output-name", G_TYPE_STRING },
     { "position", G_TYPE_STRING },
     { "disable-struts", G_TYPE_BOOLEAN },
-    { "deskbar-mode", G_TYPE_BOOLEAN },
     { NULL }
   };
 
diff --git a/panel/panel-itembar.c b/panel/panel-itembar.c
index ed50c75..16c37a6 100644
--- a/panel/panel-itembar.c
+++ b/panel/panel-itembar.c
@@ -29,6 +29,8 @@
 #include <panel/panel-itembar.h>
 
 #define HORIZONTAL(itembar) ((itembar)->mode == XFCE_PANEL_PLUGIN_MODE_HORIZONTAL)
+#define VERTICAL(itembar) ((itembar)->mode == XFCE_PANEL_PLUGIN_MODE_VERTICAL)
+#define DESKBAR(itembar) ((itembar)->mode == XFCE_PANEL_PLUGIN_MODE_DESKBAR)
 
 
 
@@ -186,7 +188,7 @@ panel_itembar_class_init (PanelItembarClass *klass)
                                    PROP_SIZE,
                                    g_param_spec_uint ("size",
                                                       NULL, NULL,
-                                                      16, 128*8, 30,
+                                                      16, 128*6, 30,
                                                       EXO_PARAM_WRITABLE));
 
   g_object_class_install_property (gobject_class,
@@ -196,20 +198,6 @@ panel_itembar_class_init (PanelItembarClass *klass)
                                                       1, 6, 1,
                                                       EXO_PARAM_WRITABLE));
 
-  g_object_class_install_property (gobject_class,
-                                   PROP_NROWS,
-                                   g_param_spec_uint ("nrows",
-                                                      NULL, NULL,
-                                                      1, 8, 1,
-                                                      EXO_PARAM_WRITABLE));
-
-  g_object_class_install_property (gobject_class,
-                                   PROP_DESKBAR_MODE,
-                                   g_param_spec_boolean ("deskbar-mode",
-                                                         NULL, NULL,
-                                                         FALSE,
-                                                         EXO_PARAM_WRITABLE));
-
   gtk_container_class_install_child_property (gtkcontainer_class,
                                               CHILD_PROP_SMALL,
                                               g_param_spec_boolean ("small",
@@ -323,7 +311,7 @@ panel_itembar_column_wrap (PanelItembar      *itembar,
                            gint               start)
 {
   *column_row = 0;
-  if (itembar->horizontal) {
+  if (HORIZONTAL (itembar)) {
     *y = start;
     *x += itembar->size / itembar->nrows;
   } else {
@@ -342,7 +330,7 @@ panel_itembar_column_next (PanelItembar      *itembar,
 {
   (*column_row)++;
   if (*column_row < (gint) itembar->nrows) {
-    if (itembar->horizontal)
+    if (HORIZONTAL (itembar))
       *y += itembar->size / itembar->nrows;
     else
       *x += itembar->size / itembar->nrows;
@@ -608,7 +596,7 @@ panel_itembar_size_allocate (GtkWidget     *widget,
             child_alloc.height = itembar->size / itembar->nrows;
             child_alloc.width = itembar->size / itembar->nrows;
             panel_itembar_column_next(itembar, &column_row, &x, &y, start);
-            if (!itembar->horizontal && !itembar->deskbar_mode)
+            if (0) //(VERTICAL (itembar)) // flip upside-down
               child_alloc.y = 2*allocation->y + allocation->height
                 - child_alloc.y - child_alloc.height;
             gtk_widget_size_allocate (child->widget, &child_alloc);
@@ -644,7 +632,7 @@ panel_itembar_size_allocate (GtkWidget     *widget,
                   child_alloc.width = child_alloc.height = 0;
                 }
 
-              if (!itembar->horizontal && !itembar->deskbar_mode)
+              if (0) //(VERTICAL (itembar)) //flip upside-down
                 child_alloc.y = 2*allocation->y + allocation->height
                   - child_alloc.y - child_alloc.height;
               gtk_widget_size_allocate (child->widget, &child_alloc);
@@ -701,12 +689,12 @@ panel_itembar_size_allocate (GtkWidget     *widget,
               y += child_alloc.height;
             }
 
-          if (!itembar->horizontal && !itembar->deskbar_mode)
+          if (0) //(VERTICAL (itembar)) //flip upside-down
             child_alloc.y = 2*allocation->y + allocation->height
               - child_alloc.y - child_alloc.height;
           gtk_widget_size_allocate (child->widget, &child_alloc);
 
-          if (itembar->horizontal)
+          if (HORIZONTAL (itembar))
             x += itembar->spacing;
           else
             y += itembar->spacing;
@@ -736,7 +724,7 @@ panel_itembar_expose_event (GtkWidget      *widget,
       cairo_set_source_rgb (cr, 1., 0., 0.);
       cairo_set_line_width (cr, 2);
 
-      if (itembar->horizontal)
+      if (HORIZONTAL (itembar))
         {
           if (itembar->highlight_small)
             {
@@ -751,7 +739,7 @@ panel_itembar_expose_event (GtkWidget      *widget,
               y2 = y1 + itembar->size;
             }
         }
-      else /* vertical */
+      else /* ! horizontal */
         {
           if (itembar->highlight_small)
             {
@@ -766,7 +754,7 @@ panel_itembar_expose_event (GtkWidget      *widget,
               x2 = x1 + itembar->size;
             }
           alloc = &widget->allocation;
-          if (!itembar->deskbar_mode)
+          if (0) //(VERTICAL (itembar)) //flip upside-down
             {
               y1 = 2 * alloc->y + alloc->height - y1;
               y2 = 2 * alloc->y + alloc->height - y2;
@@ -1123,11 +1111,11 @@ panel_itembar_get_drop_index (PanelItembar *itembar,
               if (x < (alloc->x + alloc->width / 2)) break;
             }
         }
-      else /* vertical */
+      else /* ! horizontal */
         {
           x2 = x;
           y2 = y;
-          if (!itembar->deskbar_mode)
+          if (0) //(VERTICAL (itembar)) //flip upside-down
             {
               y2 = 2 * alloc->y + alloc->height - y;
             }
diff --git a/panel/panel-plugin-external-46.c b/panel/panel-plugin-external-46.c
index 14d4c23..c2d1c11 100644
--- a/panel/panel-plugin-external-46.c
+++ b/panel/panel-plugin-external-46.c
@@ -246,7 +246,6 @@ panel_plugin_external_46_set_properties (PanelPluginExternal *external,
         case PROVIDER_PROP_TYPE_SET_MODE:
         case PROVIDER_PROP_TYPE_SET_NROWS:
         case PROVIDER_PROP_TYPE_SET_SCREEN_POSITION:
-        case PROVIDER_PROP_TYPE_SET_NROWS:
           event.data.s[1] = g_value_get_int (&property->value);
           break;
 
@@ -256,7 +255,6 @@ panel_plugin_external_46_set_properties (PanelPluginExternal *external,
 
         case PROVIDER_PROP_TYPE_SET_LOCKED:
         case PROVIDER_PROP_TYPE_SET_SENSITIVE:
-        case PROVIDER_PROP_TYPE_SET_DESKBAR_MODE:
           event.data.s[1] = g_value_get_boolean (&property->value);
           break;
 
diff --git a/panel/panel-plugin-external.c b/panel/panel-plugin-external.c
index 4414fff..b9e8f36 100644
--- a/panel/panel-plugin-external.c
+++ b/panel/panel-plugin-external.c
@@ -90,10 +90,6 @@ static void         panel_plugin_external_set_nrows               (XfcePanelPlug
                                                                    guint                             rows);
 static void         panel_plugin_external_set_screen_position     (XfcePanelPluginProvider          *provider,
                                                                    XfceScreenPosition                screen_position);
-static void         panel_plugin_external_set_nrows               (XfcePanelPluginProvider          *provider,
-                                                                   guint                             nrows);
-static void         panel_plugin_external_set_deskbar_mode        (XfcePanelPluginProvider          *provider,
-                                                                   gboolean                          deskbar_mode);
 static void         panel_plugin_external_save                    (XfcePanelPluginProvider          *provider);
 static gboolean     panel_plugin_external_get_show_configure      (XfcePanelPluginProvider          *provider);
 static void         panel_plugin_external_show_configure          (XfcePanelPluginProvider          *provider);
@@ -945,46 +941,6 @@ panel_plugin_external_set_nrows (XfcePanelPluginProvider *provider,
 
 
 static void
-panel_plugin_external_set_nrows (XfcePanelPluginProvider *provider,
-                                 guint                    nrows)
-{
-  GValue value = { 0, };
-
-  panel_return_if_fail (PANEL_IS_PLUGIN_EXTERNAL (provider));
-  panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (provider));
-
-  g_value_init (&value, G_TYPE_INT);
-  g_value_set_int (&value, nrows);
-
-  panel_plugin_external_queue_add (PANEL_PLUGIN_EXTERNAL (provider),
-                                   PROVIDER_PROP_TYPE_SET_NROWS, &value);
-
-  g_value_unset (&value);
-}
-
-
-
-static void
-panel_plugin_external_set_deskbar_mode (XfcePanelPluginProvider *provider,
-                                        gboolean                 deskbar_mode)
-{
-  GValue value = { 0, };
-
-  panel_return_if_fail (PANEL_IS_PLUGIN_EXTERNAL (provider));
-  panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (provider));
-
-  g_value_init (&value, G_TYPE_BOOLEAN);
-  g_value_set_boolean (&value, deskbar_mode);
-
-  panel_plugin_external_queue_add (PANEL_PLUGIN_EXTERNAL (provider),
-                                   PROVIDER_PROP_TYPE_SET_DESKBAR_MODE, &value);
-
-  g_value_unset (&value);
-}
-
-
-
-static void
 panel_plugin_external_set_screen_position (XfcePanelPluginProvider *provider,
                                            XfceScreenPosition       screen_position)
 {
diff --git a/panel/panel-preferences-dialog.c b/panel/panel-preferences-dialog.c
index 2ff331b..5a9c7da 100644
--- a/panel/panel-preferences-dialog.c
+++ b/panel/panel-preferences-dialog.c
@@ -424,8 +424,6 @@ panel_preferences_dialog_bindings_update (PanelPreferencesDialog *dialog)
   panel_preferences_dialog_bindings_add (dialog, "composited", "sensitive");
   panel_preferences_dialog_bindings_add (dialog, "background-style", "active");
   panel_preferences_dialog_bindings_add (dialog, "background-color", "color");
-  panel_preferences_dialog_bindings_add (dialog, "nrows", "value");
-  panel_preferences_dialog_bindings_add (dialog, "deskbar-mode", "active");
 
 
   /* watch image changes from the panel */
diff --git a/panel/panel-preferences-dialog.glade b/panel/panel-preferences-dialog.glade
index 4717e3c..33d843f 100644
--- a/panel/panel-preferences-dialog.glade
+++ b/panel/panel-preferences-dialog.glade
@@ -51,13 +51,6 @@
       </row>
     </data>
   </object>
-    <object class="GtkAdjustment" id="nrows">
-    <property name="value">1</property>
-    <property name="lower">1</property>
-    <property name="upper">8</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">1</property>
-  </object>
     <object class="GtkAdjustment" id="icon-size">
     <property name="value">16</property>
     <property name="lower">16</property>
@@ -348,20 +341,6 @@
                                     <property name="position">5</property>
                                   </packing>
                                 </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="deskbar-mode">
-                                    <property name="label" translatable="yes">Vertical panel as _deskbar</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="tooltip_text" translatable="yes">Select this option to distribute items horizontally. This has an effect only when the panel is oriented vertically.</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="draw_indicator">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="position">6</property>
-                                  </packing>
-                                </child>
                               </object>
                             </child>
                           </object>
@@ -439,20 +418,6 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkLabel" id="label18">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Number of Ro_ws:</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="mnemonic_widget">nrows-scale</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
                                   <object class="GtkHScale" id="length-scale">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
@@ -494,22 +459,6 @@
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkHScale" id="nrows-scale">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="update_policy">discontinuous</property>
-                                    <property name="adjustment">nrows</property>
-                                    <property name="digits">0</property>
-                                    <property name="value_pos">right</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
                                     <property name="top_attach">1</property>
                                     <property name="bottom_attach">2</property>
                                   </packing>
diff --git a/panel/panel-window.c b/panel/panel-window.c
index 992dcac..f9d75b6 100644
--- a/panel/panel-window.c
+++ b/panel/panel-window.c
@@ -157,8 +157,6 @@ enum
   PROP_SPAN_MONITORS,
   PROP_OUTPUT_NAME,
   PROP_POSITION,
-  PROP_NROWS,
-  PROP_DESKBAR_MODE,
   PROP_DISABLE_STRUTS
 };
 
@@ -423,18 +421,6 @@ panel_window_class_init (PanelWindowClass *klass)
                                                          FALSE,
                                                          EXO_PARAM_READWRITE));
 
-  g_object_class_install_property (gobject_class,
-                                   PROP_NROWS,
-                                   g_param_spec_uint ("nrows", NULL, NULL,
-                                                      1, 8, 1,
-                                                      EXO_PARAM_READWRITE));
-
-  g_object_class_install_property (gobject_class,
-                                   PROP_DESKBAR_MODE,
-                                   g_param_spec_boolean ("deskbar-mode", NULL, NULL,
-                                                         TRUE,
-                                                         EXO_PARAM_READWRITE));
-
   gtk_widget_class_install_style_property (gtkwidget_class,
                                            g_param_spec_int ("popup-delay",
                                                              NULL,
@@ -548,7 +534,6 @@ panel_window_init (PanelWindow *window)
   window->size = 48;
   window->length = 0.10;
   window->length_adjust = TRUE;
-  window->deskbar_mode = FALSE;
   window->snap_position = SNAP_POSITION_NONE;
   window->span_monitors = FALSE;
   window->position_locked = FALSE;
@@ -653,14 +638,6 @@ panel_window_get_property (GObject    *object,
       g_value_set_boolean (value, window->struts_disabled);
       break;
 
-    case PROP_NROWS:
-      g_value_set_uint (value,  window->nrows);
-      break;
-
-    case PROP_DESKBAR_MODE:
-      g_value_set_boolean (value, window->deskbar_mode);
-      break;
-
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -820,24 +797,6 @@ panel_window_set_property (GObject      *object,
         }
       break;
 
-    case PROP_NROWS:
-      val_uint = g_value_get_uint (value);
-      if (window->nrows != val_uint)
-        {
-          window->nrows = val_uint;
-          panel_window_plugins_update (window, PLUGIN_PROP_NROWS);
-        }
-      break;
-
-    case PROP_DESKBAR_MODE:
-      val_bool = g_value_get_boolean (value);
-      if (val_bool != window->deskbar_mode)
-        {
-          window->deskbar_mode = val_bool;
-          panel_window_plugins_update (window, PLUGIN_PROP_DESKBAR_MODE);
-        }
-      break;
-
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -2609,28 +2568,6 @@ panel_window_plugin_set_size (GtkWidget *widget,
                                        PANEL_WINDOW (user_data)->size);
 }
 
-static void
-panel_window_plugin_set_deskbar_mode (GtkWidget *widget,
-                                      gpointer   user_data)
-{
-  panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (widget));
-  panel_return_if_fail (PANEL_IS_WINDOW (user_data));
-
-  xfce_panel_plugin_provider_set_deskbar_mode (XFCE_PANEL_PLUGIN_PROVIDER (widget),
-                                               PANEL_WINDOW (user_data)->deskbar_mode);
-}
-
-static void
-panel_window_plugin_set_nrows (GtkWidget *widget,
-                               gpointer   user_data)
-{
-  panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (widget));
-  panel_return_if_fail (PANEL_IS_WINDOW (user_data));
-
-  xfce_panel_plugin_provider_set_nrows (XFCE_PANEL_PLUGIN_PROVIDER (widget),
-                                        PANEL_WINDOW (user_data)->nrows);
-}
-
 
 
 static void
@@ -2780,7 +2717,6 @@ panel_window_set_povider_info (PanelWindow *window,
   panel_window_plugin_set_screen_position (provider, window);
   panel_window_plugin_set_size (provider, window);
   panel_window_plugin_set_nrows (provider, window);
-  panel_window_plugin_set_deskbar_mode (provider, window);
 }
 
 
diff --git a/plugins/actions/actions.c b/plugins/actions/actions.c
index e1a9c98..38e9301 100644
--- a/plugins/actions/actions.c
+++ b/plugins/actions/actions.c
@@ -57,8 +57,6 @@ static gboolean   actions_plugin_size_changed        (XfcePanelPlugin       *pan
 static void       actions_plugin_configure_plugin    (XfcePanelPlugin       *panel_plugin);
 static void       actions_plugin_orientation_changed (XfcePanelPlugin       *panel_plugin,
                                                       GtkOrientation         orientation);
-static void       actions_plugin_deskbar_mode_changed(XfcePanelPlugin       *panel_plugin,
-                                                      gboolean               deskbar_mode);
 static void       actions_plugin_nrows_changed       (XfcePanelPlugin       *panel_plugin,
                                                       guint                  nrows);
 static void       actions_plugin_pack                (ActionsPlugin         *plugin);
@@ -240,7 +238,6 @@ actions_plugin_class_init (ActionsPluginClass *klass)
   plugin_class->construct = actions_plugin_construct;
   plugin_class->free_data = actions_plugin_free_data;
   plugin_class->size_changed = actions_plugin_size_changed;
-  plugin_class->deskbar_mode_changed = actions_plugin_deskbar_mode_changed;
   plugin_class->nrows_changed = actions_plugin_nrows_changed;
   plugin_class->configure_plugin = actions_plugin_configure_plugin;
   plugin_class->orientation_changed = actions_plugin_orientation_changed;
@@ -696,14 +693,6 @@ actions_plugin_orientation_changed (XfcePanelPlugin *panel_plugin,
 
 
 static void
-actions_plugin_deskbar_mode_changed (XfcePanelPlugin        *panel_plugin,
-                                     gboolean                deskbar_mode)
-{
-  actions_plugin_pack (XFCE_ACTIONS_PLUGIN (panel_plugin));
-}
-
-
-static void
 actions_plugin_nrows_changed (XfcePanelPlugin        *panel_plugin,
                               guint                   nrows)
 {
@@ -992,7 +981,6 @@ actions_plugin_pack_idle (gpointer data)
   const GValue   *val;
   gint            type;
   GtkOrientation  orientation;
-  gboolean        deskbar_mode;
 
   child = gtk_bin_get_child (GTK_BIN (plugin));
   if (child != NULL)
@@ -1062,9 +1050,8 @@ actions_plugin_pack_idle (gpointer data)
 
       label = gtk_label_new (username);
       gtk_container_add (GTK_CONTAINER (button), label);
-      deskbar_mode = xfce_panel_plugin_get_deskbar_mode (XFCE_PANEL_PLUGIN (plugin));
-      gtk_label_set_angle (GTK_LABEL (label),
-          (orientation == GTK_ORIENTATION_HORIZONTAL || deskbar_mode) ? 0 : 90);
+      //gtk_label_set_angle (GTK_LABEL (label),
+      //    (orientation == GTK_ORIENTATION_HORIZONTAL || deskbar_mode) ? 0 : 90);
       gtk_widget_show (label);
     }
 
diff --git a/plugins/applicationsmenu/applicationsmenu.c b/plugins/applicationsmenu/applicationsmenu.c
index f5aa8f3..ca4eac1 100644
--- a/plugins/applicationsmenu/applicationsmenu.c
+++ b/plugins/applicationsmenu/applicationsmenu.c
@@ -101,10 +101,8 @@ static void      applications_menu_plugin_construct            (XfcePanelPlugin
 static void      applications_menu_plugin_free_data            (XfcePanelPlugin        *panel_plugin);
 static gboolean  applications_menu_plugin_size_changed         (XfcePanelPlugin        *panel_plugin,
                                                                 gint                    size);
-static void      applications_menu_plugin_orientation_changed  (XfcePanelPlugin        *panel_plugin,
-                                                                GtkOrientation          orientation);
-static void      applications_menu_plugin_deskbar_mode_changed (XfcePanelPlugin        *panel_plugin,
-                                                                gboolean                deskbar_mode);
+static void      applications_menu_plugin_mode_changed         (XfcePanelPlugin        *panel_plugin,
+                                                                XfcePanelPluginMode     mode);
 static void      applications_menu_plugin_nrows_changed        (XfcePanelPlugin        *panel_plugin,
                                                                 guint                   nrows);
 static void      applications_menu_plugin_configure_plugin     (XfcePanelPlugin        *panel_plugin);
@@ -141,8 +139,7 @@ applications_menu_plugin_class_init (ApplicationsMenuPluginClass *klass)
   plugin_class->construct = applications_menu_plugin_construct;
   plugin_class->free_data = applications_menu_plugin_free_data;
   plugin_class->size_changed = applications_menu_plugin_size_changed;
-  plugin_class->orientation_changed = applications_menu_plugin_orientation_changed;
-  plugin_class->deskbar_mode_changed = applications_menu_plugin_deskbar_mode_changed;
+  plugin_class->mode_changed = applications_menu_plugin_mode_changed;
   plugin_class->nrows_changed = applications_menu_plugin_nrows_changed;
   plugin_class->configure_plugin = applications_menu_plugin_configure_plugin;
   plugin_class->remote_event = applications_menu_plugin_remote_event;
@@ -432,6 +429,7 @@ applications_menu_plugin_size_changed (XfcePanelPlugin *panel_plugin,
   GtkStyle               *style;
   gint                    plugin_size;
   gint                    plugin_nrows;
+  XfcePanelPluginMode     mode;
   GtkOrientation          orientation;
   GtkRequisition          label_size;
 
@@ -446,12 +444,13 @@ applications_menu_plugin_size_changed (XfcePanelPlugin *panel_plugin,
 
   xfce_panel_image_set_size (XFCE_PANEL_IMAGE (plugin->icon), icon_size);
 
-  orientation = xfce_panel_plugin_get_orientation (panel_plugin);
+  mode = xfce_panel_plugin_get_mode (panel_plugin);
+  orientation = (mode == XFCE_PANEL_PLUGIN_MODE_HORIZONTAL) ?
+    GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL;
 
   /* deskbar mode & button title */
   if (plugin->show_button_title &&
-      xfce_panel_plugin_get_deskbar_mode (panel_plugin) &&
-      orientation == GTK_ORIENTATION_VERTICAL)
+      mode == XFCE_PANEL_PLUGIN_MODE_DESKBAR)
     {
       gtk_widget_size_request(GTK_WIDGET (plugin->label), &label_size);
 
@@ -469,25 +468,22 @@ applications_menu_plugin_size_changed (XfcePanelPlugin *panel_plugin,
 
 
 static void
-applications_menu_plugin_orientation_changed (XfcePanelPlugin *panel_plugin,
-                                              GtkOrientation   orientation)
+applications_menu_plugin_mode_changed (XfcePanelPlugin      *panel_plugin,
+                                       XfcePanelPluginMode   mode)
 {
   ApplicationsMenuPlugin *plugin = XFCE_APPLICATIONS_MENU_PLUGIN (panel_plugin);
 
-  if (xfce_panel_plugin_get_deskbar_mode (panel_plugin))
-    orientation = GTK_ORIENTATION_HORIZONTAL;
-
-  gtk_orientable_set_orientation (GTK_ORIENTABLE (plugin->box),
-                                  orientation);
-  if (orientation == GTK_ORIENTATION_HORIZONTAL)
+  if (mode != XFCE_PANEL_PLUGIN_MODE_VERTICAL)
     {
-      gtk_box_reorder_child (GTK_BOX (plugin->box), plugin->icon, 0);
+      gtk_orientable_set_orientation (GTK_ORIENTABLE (plugin->box), GTK_ORIENTATION_HORIZONTAL);
+      /* gtk_box_reorder_child (GTK_BOX (plugin->box), plugin->icon, 0); */
       gtk_label_set_angle (GTK_LABEL (plugin->label), 0);
     }
   else
     {
-      gtk_box_reorder_child (GTK_BOX (plugin->box), plugin->icon, -1);
-      gtk_label_set_angle (GTK_LABEL (plugin->label), 90);
+      gtk_orientable_set_orientation (GTK_ORIENTABLE (plugin->box), GTK_ORIENTATION_VERTICAL);
+      /* gtk_box_reorder_child (GTK_BOX (plugin->box), plugin->icon, -1); */
+      gtk_label_set_angle (GTK_LABEL (plugin->label), 270);
     }
   applications_menu_plugin_size_changed (panel_plugin,
                                          xfce_panel_plugin_get_size (panel_plugin));
@@ -495,15 +491,6 @@ applications_menu_plugin_orientation_changed (XfcePanelPlugin *panel_plugin,
 
 
 static void
-applications_menu_plugin_deskbar_mode_changed (XfcePanelPlugin        *panel_plugin,
-                                               gboolean                deskbar_mode)
-{
-  applications_menu_plugin_orientation_changed (panel_plugin,
-                                                xfce_panel_plugin_get_orientation (panel_plugin));
-}
-
-
-static void
 applications_menu_plugin_nrows_changed (XfcePanelPlugin        *panel_plugin,
                                        guint                   nrows)
 {
diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 98e205e..cc90685 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -72,8 +72,6 @@ static gboolean           launcher_plugin_size_changed                  (XfcePan
                                                                          gint                  size);
 static void               launcher_plugin_nrows_changed                 (XfcePanelPlugin      *panel_plugin,
                                                                          guint                 nrows);
-static void               launcher_plugin_deskbar_mode_changed          (XfcePanelPlugin      *panel_plugin,
-                                                                         gboolean              deskbar_mode);
 static void               launcher_plugin_configure_plugin              (XfcePanelPlugin      *panel_plugin);
 static void               launcher_plugin_screen_position_changed       (XfcePanelPlugin      *panel_plugin,
                                                                          XfceScreenPosition    position);
@@ -275,7 +273,6 @@ launcher_plugin_class_init (LauncherPluginClass *klass)
   plugin_class->orientation_changed = launcher_plugin_orientation_changed;
   plugin_class->size_changed = launcher_plugin_size_changed;
   plugin_class->nrows_changed = launcher_plugin_nrows_changed;
-  plugin_class->deskbar_mode_changed = launcher_plugin_deskbar_mode_changed;
   plugin_class->configure_plugin = launcher_plugin_configure_plugin;
   plugin_class->screen_position_changed = launcher_plugin_screen_position_changed;
   plugin_class->removed = launcher_plugin_removed;
@@ -1319,16 +1316,6 @@ launcher_plugin_nrows_changed (XfcePanelPlugin *panel_plugin,
 
 
 static void
-launcher_plugin_deskbar_mode_changed (XfcePanelPlugin *panel_plugin,
-                                      gboolean         deskbar_mode)
-{
-  launcher_plugin_orientation_changed (XFCE_PANEL_PLUGIN (panel_plugin),
-                                       xfce_panel_plugin_get_orientation (XFCE_PANEL_PLUGIN (panel_plugin)));
-}
-
-
-
-static void
 launcher_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
 {
   /* run the configure dialog */
diff --git a/plugins/pager/pager.c b/plugins/pager/pager.c
index e820826..37ed847 100644
--- a/plugins/pager/pager.c
+++ b/plugins/pager/pager.c
@@ -58,10 +58,8 @@ static void     pager_plugin_construct                    (XfcePanelPlugin   *pa
 static void     pager_plugin_free_data                    (XfcePanelPlugin   *panel_plugin);
 static gboolean pager_plugin_size_changed                 (XfcePanelPlugin   *panel_plugin,
                                                            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_mode_changed                 (XfcePanelPlugin     *panel_plugin,
+                                                           XfcePanelPluginMode  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);
@@ -144,8 +142,7 @@ pager_plugin_class_init (PagerPluginClass *klass)
   plugin_class->construct = pager_plugin_construct;
   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->mode_changed = pager_plugin_mode_changed;
   plugin_class->configure_plugin = pager_plugin_configure_plugin;
 
   g_object_class_install_property (gobject_class,
@@ -302,8 +299,8 @@ pager_plugin_scroll_event (GtkWidget      *widget,
 static void
 pager_plugin_screen_layout_changed (PagerPlugin *plugin)
 {
-  GtkOrientation panel_orientation;
-  GtkOrientation plugin_orientation;
+  XfcePanelPluginMode mode;
+  GtkOrientation orientation;
 
   panel_return_if_fail (XFCE_IS_PAGER_PLUGIN (plugin));
   panel_return_if_fail (WNCK_IS_SCREEN (plugin->wnck_screen));
@@ -314,10 +311,10 @@ pager_plugin_screen_layout_changed (PagerPlugin *plugin)
       wnck_screen_force_update (plugin->wnck_screen);
     }
 
-  panel_orientation = xfce_panel_plugin_get_orientation (XFCE_PANEL_PLUGIN (plugin));
-  plugin_orientation = panel_orientation;
-  if (xfce_panel_plugin_get_deskbar_mode (XFCE_PANEL_PLUGIN (plugin)))
-    plugin_orientation = GTK_ORIENTATION_HORIZONTAL;
+  mode = xfce_panel_plugin_get_mode (XFCE_PANEL_PLUGIN (plugin));
+  orientation = (mode == XFCE_PANEL_PLUGIN_MODE_HORIZONTAL) ?
+    GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL;
+
 
   if (plugin->miniature_view)
     {
@@ -325,25 +322,25 @@ pager_plugin_screen_layout_changed (PagerPlugin *plugin)
       pager_wnck_set_display_mode (XFCE_PAGER_WNCK (plugin->pager), PAGER_WNCK_DISPLAY_CONTENT);
       if (!pager_wnck_set_n_rows (XFCE_PAGER_WNCK (plugin->pager), plugin->rows))
         g_message ("Setting the pager rows returned false. Maybe the setting is not applied.");
-      if (panel_orientation == GTK_ORIENTATION_HORIZONTAL)
+      if (mode != XFCE_PANEL_PLUGIN_MODE_HORIZONTAL)
         pager_wnck_set_layout_policy (XFCE_PAGER_WNCK (plugin->pager), PAGER_LAYOUT_POLICY_WIDTH_FOR_HEIGHT);
       else
         pager_wnck_set_layout_policy (XFCE_PAGER_WNCK (plugin->pager), PAGER_LAYOUT_POLICY_HEIGHT_FOR_WIDTH);
-      pager_wnck_set_orientation (XFCE_PAGER_WNCK (plugin->pager), plugin_orientation);
-      if (plugin_orientation == GTK_ORIENTATION_HORIZONTAL)
+      pager_wnck_set_orientation (XFCE_PAGER_WNCK (plugin->pager), orientation);
+      if (mode != XFCE_PANEL_PLUGIN_MODE_VERTICAL)
         pager_wnck_set_starting_corner (XFCE_PAGER_WNCK (plugin->pager), PAGER_LAYOUT_CORNER_TOPLEFT);
       else
-        pager_wnck_set_starting_corner (XFCE_PAGER_WNCK (plugin->pager), PAGER_LAYOUT_CORNER_BOTTOMLEFT);
+        pager_wnck_set_starting_corner (XFCE_PAGER_WNCK (plugin->pager), PAGER_LAYOUT_CORNER_TOPRIGHT);
     }
   else
     {
       plugin->pager = pager_buttons_new (plugin->wnck_screen);
       pager_buttons_set_n_rows (XFCE_PAGER_BUTTONS (plugin->pager), plugin->rows);
-      pager_buttons_set_orientation (XFCE_PAGER_BUTTONS (plugin->pager), plugin_orientation);
-      if (plugin_orientation == GTK_ORIENTATION_HORIZONTAL)
+      pager_buttons_set_orientation (XFCE_PAGER_BUTTONS (plugin->pager), orientation);
+      if (mode != XFCE_PANEL_PLUGIN_MODE_VERTICAL)
         pager_buttons_set_starting_corner (XFCE_PAGER_BUTTONS (plugin->pager), PAGER_LAYOUT_CORNER_TOPLEFT);
       else
-        pager_buttons_set_starting_corner (XFCE_PAGER_BUTTONS (plugin->pager), PAGER_LAYOUT_CORNER_BOTTOMLEFT);
+        pager_buttons_set_starting_corner (XFCE_PAGER_BUTTONS (plugin->pager), PAGER_LAYOUT_CORNER_TOPRIGHT);
     }
 
   gtk_container_add (GTK_CONTAINER (plugin), plugin->pager);
@@ -449,51 +446,43 @@ pager_plugin_size_changed (XfcePanelPlugin *panel_plugin,
 
 
 static void
-pager_plugin_orientation_changed (XfcePanelPlugin *panel_plugin,
-                                  GtkOrientation   orientation)
+pager_plugin_mode_changed (XfcePanelPlugin      *panel_plugin,
+                           XfcePanelPluginMode   mode)
 {
   PagerPlugin *plugin = XFCE_PAGER_PLUGIN (panel_plugin);
+  GtkOrientation orientation;
+
+  orientation = (mode == XFCE_PANEL_PLUGIN_MODE_HORIZONTAL) ?
+    GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL;
 
   if (plugin->miniature_view)
     {
-      if (orientation == GTK_ORIENTATION_HORIZONTAL)
+      if (mode == XFCE_PANEL_PLUGIN_MODE_HORIZONTAL)
         pager_wnck_set_layout_policy (XFCE_PAGER_WNCK (plugin->pager), PAGER_LAYOUT_POLICY_WIDTH_FOR_HEIGHT);
       else
         pager_wnck_set_layout_policy (XFCE_PAGER_WNCK (plugin->pager), PAGER_LAYOUT_POLICY_HEIGHT_FOR_WIDTH);
     }
 
-  if (xfce_panel_plugin_get_deskbar_mode (panel_plugin))
-    orientation = GTK_ORIENTATION_HORIZONTAL;
-
   if (plugin->miniature_view)
     {
       pager_wnck_set_orientation (XFCE_PAGER_WNCK (plugin->pager), orientation);
-      if (orientation == GTK_ORIENTATION_HORIZONTAL)
+      if (mode != XFCE_PANEL_PLUGIN_MODE_VERTICAL)
         pager_wnck_set_starting_corner (XFCE_PAGER_WNCK (plugin->pager), PAGER_LAYOUT_CORNER_TOPLEFT);
       else
-        pager_wnck_set_starting_corner (XFCE_PAGER_WNCK (plugin->pager), PAGER_LAYOUT_CORNER_BOTTOMLEFT);
+        pager_wnck_set_starting_corner (XFCE_PAGER_WNCK (plugin->pager), PAGER_LAYOUT_CORNER_TOPRIGHT);
     }
   else
     {
       pager_buttons_set_orientation (XFCE_PAGER_BUTTONS (plugin->pager), orientation);
-      if (orientation == GTK_ORIENTATION_HORIZONTAL)
+      if (mode != XFCE_PANEL_PLUGIN_MODE_VERTICAL)
         pager_buttons_set_starting_corner (XFCE_PAGER_BUTTONS (plugin->pager), PAGER_LAYOUT_CORNER_TOPLEFT);
       else
-        pager_buttons_set_starting_corner (XFCE_PAGER_BUTTONS (plugin->pager), PAGER_LAYOUT_CORNER_BOTTOMLEFT);
+        pager_buttons_set_starting_corner (XFCE_PAGER_BUTTONS (plugin->pager), PAGER_LAYOUT_CORNER_TOPRIGHT);
     }
 }
 
 
 static void
-pager_plugin_deskbar_mode_changed (XfcePanelPlugin *panel_plugin,
-                                   gboolean         deskbar_mode)
-{
-  pager_plugin_orientation_changed (panel_plugin,
-                                    xfce_panel_plugin_get_orientation (panel_plugin));
-}
-
-
-static void
 pager_plugin_configure_workspace_settings (GtkWidget *button)
 {
   GdkScreen *screen;
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index e1df261..740524b 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -130,6 +130,9 @@ struct _XfceTasklist
   /* size of the panel pluin */
   gint                  size;
 
+  /* mode (orientation) of the tasklist */
+  XfcePanelPluginMode   mode;
+
   /* orientation of the tasklist */
   guint                 horizontal : 1;
 
@@ -539,6 +542,7 @@ xfce_tasklist_init (XfceTasklist *tasklist)
   tasklist->screen = NULL;
   tasklist->windows = NULL;
   tasklist->skipped_windows = NULL;
+  tasklist->mode = XFCE_PANEL_PLUGIN_MODE_HORIZONTAL;
   tasklist->horizontal = TRUE;
   tasklist->nrows = 1;
   tasklist->deskbar_mode = FALSE;
@@ -2046,15 +2050,15 @@ xfce_tasklist_child_new (XfceTasklist *tasklist)
   gtk_box_pack_start (GTK_BOX (child->box), child->label, TRUE, TRUE, 0);
   if (xfce_tasklist_horizontal (tasklist))
     {
-      gtk_box_reorder_child (GTK_BOX (child->box), child->icon, 0);
+      /* gtk_box_reorder_child (GTK_BOX (child->box), child->icon, 0); */
       gtk_misc_set_alignment (GTK_MISC (child->label), 0.0, 0.5);
       gtk_label_set_ellipsize (GTK_LABEL (child->label), tasklist->ellipsize_mode);
     }
   else
     {
-      gtk_box_reorder_child (GTK_BOX (child->box), child->icon, -1);
-      gtk_label_set_angle (GTK_LABEL (child->label), 90);
-      gtk_misc_set_alignment (GTK_MISC (child->label), 0.50, 1.00);
+      /* gtk_box_reorder_child (GTK_BOX (child->box), child->icon, -1); */
+      gtk_label_set_angle (GTK_LABEL (child->label), 270);
+      gtk_misc_set_alignment (GTK_MISC (child->label), 0.50, 0.00);
       /* TODO can we already ellipsize here yet? */
     }
 
@@ -3809,7 +3813,7 @@ xfce_tasklist_update_orientation (XfceTasklist *tasklist)
       /* update the label */
       if (horizontal)
         {
-          gtk_box_reorder_child (GTK_BOX (child->box), child->icon, 0);
+          /* gtk_box_reorder_child (GTK_BOX (child->box), child->icon, 0); */
           gtk_misc_set_alignment (GTK_MISC (child->label), 0.0, 0.5);
           gtk_label_set_angle (GTK_LABEL (child->label), 0);
           gtk_label_set_ellipsize (GTK_LABEL (child->label),
@@ -3817,9 +3821,9 @@ xfce_tasklist_update_orientation (XfceTasklist *tasklist)
         }
       else
         {
-          gtk_box_reorder_child (GTK_BOX (child->box), child->icon, -1);
-          gtk_misc_set_alignment (GTK_MISC (child->label), 0.50, 1.00);
-          gtk_label_set_angle (GTK_LABEL (child->label), 90);
+          /* gtk_box_reorder_child (GTK_BOX (child->box), child->icon, -1); */
+          gtk_misc_set_alignment (GTK_MISC (child->label), 0.50, 0.00);
+          gtk_label_set_angle (GTK_LABEL (child->label), 270);
           gtk_label_set_ellipsize (GTK_LABEL (child->label), PANGO_ELLIPSIZE_NONE);
         }
     }
@@ -3860,32 +3864,17 @@ xfce_tasklist_set_nrows (XfceTasklist *tasklist,
 
 
 void
-xfce_tasklist_set_deskbar_mode (XfceTasklist *tasklist,
-                                gboolean      deskbar_mode)
+xfce_tasklist_set_mode (XfceTasklist        *tasklist,
+                        XfcePanelPluginMode  mode)
 {
   panel_return_if_fail (XFCE_IS_TASKLIST (tasklist));
 
-  if (tasklist->deskbar_mode != deskbar_mode)
-    {
-      tasklist->deskbar_mode = deskbar_mode;
-      xfce_tasklist_update_orientation (tasklist);
-    }
-}
-
-
-
-void
-xfce_tasklist_set_orientation (XfceTasklist   *tasklist,
-                               GtkOrientation  orientation)
-{
-  gboolean horizontal;
-
-  panel_return_if_fail (XFCE_IS_TASKLIST (tasklist));
-
-  horizontal = !!(orientation == GTK_ORIENTATION_HORIZONTAL);
-  if (tasklist->horizontal != horizontal)
+  if (tasklist->mode != mode)
     {
-      tasklist->horizontal = horizontal;
+      tasklist->mode = mode;
+      /* transitional variables, to be removed */
+      tasklist->horizontal = !!(mode == XFCE_PANEL_PLUGIN_MODE_HORIZONTAL);
+      tasklist->deskbar_mode = !!(mode == XFCE_PANEL_PLUGIN_MODE_DESKBAR);
       xfce_tasklist_update_orientation (tasklist);
     }
 }
diff --git a/plugins/tasklist/tasklist-widget.h b/plugins/tasklist/tasklist-widget.h
index 30e9777..f7fbdd8 100644
--- a/plugins/tasklist/tasklist-widget.h
+++ b/plugins/tasklist/tasklist-widget.h
@@ -65,8 +65,8 @@ enum _XfceTasklistSortOrder
 
 GType xfce_tasklist_get_type                (void) G_GNUC_CONST;
 
-void  xfce_tasklist_set_orientation         (XfceTasklist   *tasklist,
-                                             GtkOrientation  orientation);
+void  xfce_tasklist_set_mode                (XfceTasklist        *tasklist,
+                                             XfcePanelPluginMode  mode);
 
 void  xfce_tasklist_set_size                (XfceTasklist   *tasklist,
                                              gint            size);
@@ -74,9 +74,6 @@ void  xfce_tasklist_set_size                (XfceTasklist   *tasklist,
 void  xfce_tasklist_set_nrows               (XfceTasklist   *tasklist,
                                              guint           nrows);
 
-void  xfce_tasklist_set_deskbar_mode        (XfceTasklist   *tasklist,
-                                             gboolean        deskbar_mode);
-
 void  xfce_tasklist_update_monitor_geometry (XfceTasklist   *tasklist);
 
 G_END_DECLS
diff --git a/plugins/tasklist/tasklist.c b/plugins/tasklist/tasklist.c
index 7e3b53b..bf0bb43 100644
--- a/plugins/tasklist/tasklist.c
+++ b/plugins/tasklist/tasklist.c
@@ -61,14 +61,12 @@ struct _TasklistPlugin
 
 
 static void     tasklist_plugin_construct               (XfcePanelPlugin    *panel_plugin);
-static void     tasklist_plugin_orientation_changed     (XfcePanelPlugin    *panel_plugin,
-                                                         GtkOrientation      orientation);
+static void     tasklist_plugin_mode_changed            (XfcePanelPlugin    *panel_plugin,
+                                                         XfcePanelPluginMode mode);
 static gboolean tasklist_plugin_size_changed            (XfcePanelPlugin    *panel_plugin,
                                                          gint                size);
 static void     tasklist_plugin_nrows_changed           (XfcePanelPlugin    *panel_plugin,
                                                          guint               nrows);
-static void     tasklist_plugin_deskbar_mode_changed    (XfcePanelPlugin    *panel_plugin,
-                                                         gboolean            deskbar_mode);
 static void     tasklist_plugin_screen_position_changed (XfcePanelPlugin    *panel_plugin,
                                                          XfceScreenPosition  position);
 static void     tasklist_plugin_configure_plugin        (XfcePanelPlugin    *panel_plugin);
@@ -90,10 +88,9 @@ tasklist_plugin_class_init (TasklistPluginClass *klass)
 
   plugin_class = XFCE_PANEL_PLUGIN_CLASS (klass);
   plugin_class->construct = tasklist_plugin_construct;
-  plugin_class->orientation_changed = tasklist_plugin_orientation_changed;
+  plugin_class->mode_changed = tasklist_plugin_mode_changed;
   plugin_class->size_changed = tasklist_plugin_size_changed;
   plugin_class->nrows_changed = tasklist_plugin_nrows_changed;
-  plugin_class->deskbar_mode_changed = tasklist_plugin_deskbar_mode_changed;
   plugin_class->screen_position_changed = tasklist_plugin_screen_position_changed;
   plugin_class->configure_plugin = tasklist_plugin_configure_plugin;
 }
@@ -167,21 +164,13 @@ tasklist_plugin_construct (XfcePanelPlugin *panel_plugin)
 
 
 static void
-tasklist_plugin_orientation_changed (XfcePanelPlugin *panel_plugin,
-                                     GtkOrientation   orientation)
+tasklist_plugin_mode_changed (XfcePanelPlugin     *panel_plugin,
+                              XfcePanelPluginMode  mode)
 {
-  gboolean        deskbar_mode;
   TasklistPlugin *plugin = XFCE_TASKLIST_PLUGIN (panel_plugin);
 
-  deskbar_mode = xfce_panel_plugin_get_deskbar_mode (panel_plugin);
-
-  if ((orientation == GTK_ORIENTATION_HORIZONTAL) || deskbar_mode)
-    gtk_box_reorder_child (GTK_BOX (plugin->box), plugin->handle, 0);
-  else
-    gtk_box_reorder_child (GTK_BOX (plugin->box), plugin->handle, -1);
-
-  /* set the new tasklist orientation */
-  xfce_tasklist_set_orientation (XFCE_TASKLIST (plugin->tasklist), orientation);
+  /* set the new tasklist mode */
+  xfce_tasklist_set_mode (XFCE_TASKLIST (plugin->tasklist), mode);
 }
 
 
@@ -213,21 +202,6 @@ tasklist_plugin_nrows_changed (XfcePanelPlugin *panel_plugin,
 
 
 static void
-tasklist_plugin_deskbar_mode_changed (XfcePanelPlugin *panel_plugin,
-                                      gboolean         deskbar_mode)
-{
-  TasklistPlugin *plugin = XFCE_TASKLIST_PLUGIN (panel_plugin);
-
-  tasklist_plugin_orientation_changed (panel_plugin,
-                                       xfce_panel_plugin_get_orientation (panel_plugin));
-
-  /* set the tasklist deskbar_mode */
-  xfce_tasklist_set_deskbar_mode (XFCE_TASKLIST (plugin->tasklist), deskbar_mode);
-}
-
-
-
-static void
 tasklist_plugin_screen_position_changed (XfcePanelPlugin    *panel_plugin,
                                          XfceScreenPosition  position)
 {
diff --git a/wrapper/main.c b/wrapper/main.c
index b473fdb..145e20e 100644
--- a/wrapper/main.c
+++ b/wrapper/main.c
@@ -97,18 +97,10 @@ wrapper_gproxy_set (DBusGProxy              *dbus_gproxy,
           xfce_panel_plugin_provider_set_nrows (provider, g_value_get_int (value));
           break;
 
-        case PROVIDER_PROP_TYPE_SET_DESKBAR_MODE:
-          xfce_panel_plugin_provider_set_deskbar_mode (provider, g_value_get_boolean (value));
-          break;
-
         case PROVIDER_PROP_TYPE_SET_SCREEN_POSITION:
           xfce_panel_plugin_provider_set_screen_position (provider, g_value_get_int (value));
           break;
 
-        case PROVIDER_PROP_TYPE_SET_NROWS:
-          xfce_panel_plugin_provider_set_nrows (provider, g_value_get_int (value));
-          break;
-
         case PROVIDER_PROP_TYPE_SET_LOCKED:
           xfce_panel_plugin_provider_set_locked (provider, g_value_get_boolean (value));
           break;


More information about the Xfce4-commits mailing list