diff -Naur window-picker-applet-0.4.22/src/applet.c window-picker-applet-0.4.22-patched/src/applet.c --- window-picker-applet-0.4.22/src/applet.c 2009-02-24 13:49:12.000000000 +0100 +++ window-picker-applet-0.4.22-patched/src/applet.c 2009-05-04 04:51:55.208802732 +0200 @@ -52,6 +55,10 @@ GdkColor *colour, GdkPixmap *pixmap, gpointer user_data); +static void +cw_panel_orientation_changed (PanelApplet *applet, + guint orient, + gpointer user_data); static void display_about_dialog (BonoboUIComponent *component, gpointer user_data, const gchar *verb); @@ -162,6 +169,9 @@ /* Signals */ g_signal_connect (applet, "change-background", G_CALLBACK (cw_panel_background_changed), NULL); + + g_signal_connect (applet, "change-orient", + G_CALLBACK (cw_panel_orientation_changed), NULL); panel_applet_setup_menu (PANEL_APPLET (applet), Context_menu_xml, @@ -232,6 +242,36 @@ } } +static void +cw_panel_orientation_changed (PanelApplet *applet, + guint orient, + gpointer user_data) +{ + if (orient == PANEL_APPLET_ORIENT_LEFT || orient == PANEL_APPLET_ORIENT_RIGHT) + { + /*TODO*/ + + } + else + { + /*TODO*/ + } +} + +gboolean +applet_orientation_get_bool (void ) +{ + guint orient = panel_applet_get_orient (PANEL_APPLET(mainapp->applet)); + if (orient == PANEL_APPLET_ORIENT_LEFT || orient == PANEL_APPLET_ORIENT_RIGHT) { + return TRUE; + } + else + { + return FALSE; + } + +} + static void display_about_dialog (BonoboUIComponent *component, gpointer user_data, diff -Naur window-picker-applet-0.4.22/src/applet.h window-picker-applet-0.4.22-patched/src/applet.h --- window-picker-applet-0.4.22/src/applet.h 1970-01-01 01:00:00.000000000 +0100 +++ window-picker-applet-0.4.22-patched/src/applet.h 2009-05-04 04:45:52.702478047 +0200 @@ -0,0 +1,6 @@ +#ifndef _APPLET_H_ +#define _APPLET_H_ + +gboolean applet_orientation_get_bool (); + +#endif //_APPLET_H_ diff -Naur window-picker-applet-0.4.22/src/task-list.c window-picker-applet-0.4.22-patched/src/task-list.c --- window-picker-applet-0.4.22/src/task-list.c 2009-03-04 16:53:26.000000000 +0100 +++ window-picker-applet-0.4.22-patched/src/task-list.c 2009-05-04 04:49:43.480854858 +0200 @@ -18,10 +18,12 @@ */ #include "task-list.h" +#include "applet.h" #include -G_DEFINE_TYPE (TaskList, task_list, GTK_TYPE_HBOX); +G_DEFINE_TYPE (TaskList, task_list, \ + applet_orientation_get_bool()? GTK_TYPE_VBOX:GTK_TYPE_HBOX); #define TASK_LIST_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\ TASK_TYPE_LIST, \