[balsa/gtk3] Try better default size for mblist widget



commit 4cd7840d50d38db8c9b0173a321b53f982c59498
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Sep 6 21:51:22 2011 -0400

    Try better default size for mblist widget
    
    	* src/balsa-mblist.c (bmbl_mru_show_tree): try better default
    	size for mblist widget.

 ChangeLog          |    5 +++++
 src/balsa-mblist.c |    6 ++----
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d2ca8aa..8c8b6ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-06  Peter Bloomfield
+
+	* src/balsa-mblist.c (bmbl_mru_show_tree): try better default
+	size for mblist widget.
+
 2011-09-01  Peter Bloomfield
 
 	* libbalsa/misc.c (lb_text_attr): add gssize len argument;
diff --git a/src/balsa-mblist.c b/src/balsa-mblist.c
index 8f2b2c0..b837493 100644
--- a/src/balsa-mblist.c
+++ b/src/balsa-mblist.c
@@ -1868,10 +1868,8 @@ bmbl_mru_show_tree(GtkWidget * widget, gpointer data)
     gtk_widget_get_preferred_size(mblist, NULL, &req);
     /* FIXME: Magic numbers to avoid showing scrollbars;
      * probably theme-dependent: */
-    req.width += 25;
-    req.height += 50;
-    if (req.height > balsa_app.mw_height)
-        req.height = balsa_app.mw_height;
+    req.width = MIN(req.width + 25, balsa_app.mblist_width);
+    req.height = MIN(req.height + 50, balsa_app.mw_height);
     gtk_window_set_default_size(GTK_WINDOW(dialog), req.width, req.height);
 
     gtk_dialog_run(GTK_DIALOG(dialog));



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