[gnome-applets] window-picker: fix initial orientation on vertical panel



commit f2c75bc80dcdcc5bfe95f7d274305ae96e4aa7f2
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Jul 22 23:46:07 2015 +0300

    window-picker: fix initial orientation on vertical panel

 windowpicker/src/wp-applet.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/windowpicker/src/wp-applet.c b/windowpicker/src/wp-applet.c
index 927b441..240e635 100644
--- a/windowpicker/src/wp-applet.c
+++ b/windowpicker/src/wp-applet.c
@@ -178,16 +178,11 @@ static void
 wp_applet_load (PanelApplet *panel_applet)
 {
   WpApplet *applet;
-  GtkOrientation orientation;
 
   applet = WP_APPLET (panel_applet);
 
   applet->settings = panel_applet_settings_new (panel_applet, SETTINGS_SCHEMA);
 
-  orientation = panel_applet_get_gtk_orientation (panel_applet);
-  applet->container = gtk_box_new (orientation, 10);
-  gtk_container_add (GTK_CONTAINER (applet), applet->container);
-
   applet->tasks = task_list_new (applet);
   gtk_box_pack_start (GTK_BOX (applet->container), applet->tasks,
                       FALSE, FALSE, 0);
@@ -430,11 +425,18 @@ wp_applet_init (WpApplet *applet)
 {
   PanelApplet *panel_applet;
   PanelAppletFlags flags;
+  GtkOrientation orientation;
 
   panel_applet = PANEL_APPLET (applet);
+
   flags = PANEL_APPLET_EXPAND_MINOR | PANEL_APPLET_HAS_HANDLE;
+  orientation = panel_applet_get_gtk_orientation (panel_applet);
 
   panel_applet_set_flags (panel_applet, flags);
+
+  applet->container = gtk_box_new (orientation, 10);
+  gtk_container_add (GTK_CONTAINER (applet), applet->container);
+
   wp_applet_setup_menu (panel_applet);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]