[geary] Don't resize conversations_paned on initial set up



commit 8b00d84fc52ac55e8f9a58efa2d0b9b39fc937f3
Author: Robert Schroll <rschroll gmail com>
Date:   Tue Mar 10 19:00:54 2015 -0400

    Don't resize conversations_paned on initial set up
    
    https://bugzilla.gnome.org/show_bug.cgi?id=714793

 src/client/components/main-window.vala |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala
index 1bf14b3..ae4bb71 100644
--- a/src/client/components/main-window.vala
+++ b/src/client/components/main-window.vala
@@ -334,9 +334,12 @@ public class MainWindow : Gtk.ApplicationWindow {
     
     private void on_change_orientation() {
         bool horizontal = GearyApplication.instance.config.folder_list_pane_horizontal;
+        bool initial = true;
         
-        if (status_bar.parent != null)
+        if (status_bar.parent != null) {
             status_bar.parent.remove(status_bar);
+            initial = false;
+        }
         
         GLib.Settings.unbind(folder_paned, "position");
         folder_paned.orientation = horizontal ? Gtk.Orientation.HORIZONTAL :
@@ -345,10 +348,12 @@ public class MainWindow : Gtk.ApplicationWindow {
         int folder_list_width =
             GearyApplication.instance.config.folder_list_pane_position_horizontal;
         if (horizontal) {
-            conversations_paned.position += folder_list_width;
+            if (!initial)
+                conversations_paned.position += folder_list_width;
             folder_box.pack_start(status_bar, false, false);
         } else {
-            conversations_paned.position -= folder_list_width;
+            if (!initial)
+                conversations_paned.position -= folder_list_width;
             conversation_box.pack_start(status_bar, false, false);
         }
         


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