[balsa] Remember geometry when maximized



commit 942761b3e0369d04c2d09d011ad4809723963ca3
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sat Mar 4 21:07:52 2017 -0500

    Remember geometry when maximized
    
        * src/main-window.c (bw_master_position_cb),
        (bw_slave_position_cb), (bw_size_allocate_cb): remember the new
        position even if maximized.

 ChangeLog         |    6 ++++++
 src/main-window.c |   14 ++++++--------
 2 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 72794ab..fd055d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-03-04  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       * src/main-window.c (bw_master_position_cb),
+       (bw_slave_position_cb), (bw_size_allocate_cb): remember the new
+       position even if maximized.
+
 2017-03-03  Peter Bloomfield  <pbloomfield bellsouth net>
 
 Use dialog buttons more consistently
diff --git a/src/main-window.c b/src/main-window.c
index c0ba925..67406da 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -288,7 +288,7 @@ bw_master_position_cb(GtkPaned   * paned_master,
                       GParamSpec * pspec,
                       gpointer     user_data)
 {
-    if (balsa_app.show_mblist && !balsa_app.mw_maximized)
+    if (balsa_app.show_mblist)
         balsa_app.mblist_width = /* FIXME: this makes some assumptions... */
             gtk_paned_get_position(paned_master);
 }
@@ -4345,19 +4345,17 @@ bw_slave_position_cb(GtkPaned   * paned_slave,
                      GParamSpec * pspec,
                      gpointer     user_data)
 {
-    if (balsa_app.previewpane && !balsa_app.mw_maximized)
+    if (balsa_app.previewpane)
         balsa_app.notebook_height =
             gtk_paned_get_position(paned_slave);
 }
 
-static void
+    static void
 bw_size_allocate_cb(GtkWidget * window, GtkAllocation * alloc)
 {
-    if (!balsa_app.mw_maximized) {
-        gtk_window_get_size(GTK_WINDOW(window),
-                            & balsa_app.mw_width,
-                            & balsa_app.mw_height);
-    }
+    gtk_window_get_size(GTK_WINDOW(window),
+                        & balsa_app.mw_width,
+                        & balsa_app.mw_height);
 }
 
 /* When page is switched we change the preview window and the selected


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