gui: Make AGGREGATE dialog initially show all of the right pane.
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 13 May 2011 05:10:07 +0000 (22:10 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 13 May 2011 15:01:47 +0000 (08:01 -0700)
The AGGREGATE dialog initially had a very narrow left pane, so
commit 2e6cffa44ef5 "Aggregate dialog: Initialize HPane widget width
on opening" added a callback function to adjust the position of the
divider between the panes to half the window's width.  But this
happens after the window has been laid out, which means that unless
the window is very wide to begin with, it will cause part of the
right pane to disappear.

I was able to get more consistently good results by forcing a minimum
width for the left pane with a width_request, and making the right
pane shrinkable below the minimum size needed to show all of it.  A
final tweak was to make the left pane automatically grow with the
window.

If you've already used the Aggregate dialog then your preferences for
the window size have been saved, so for testing this it is best to
remove $HOME/.config/psppire before each experiment.

Bug #31126.

src/ui/gui/aggregate-dialog.c
src/ui/gui/aggregate.ui

index 7414c4df46c2c5f6f5ba272a7ecb6577bd841e17..207bbd4d8d884826e08464a73d6524504aaeb0b3 100644 (file)
@@ -456,7 +456,7 @@ set_initial_pos (GtkPaned *pane)
                "max-position", &max_pos,
                NULL);
 
-  gtk_paned_set_position (pane, max_pos / 2);
+  gtk_paned_set_position (pane, max_pos);
 }
 
 
index 193d112d699da3222f4c5674aa0ea28172b89fdb..8cbcf2af8ebc64892ef2888edacc46142b13ba78 100644 (file)
@@ -17,6 +17,7 @@
             <property name="visible">True</property>
             <child>
               <object class="GtkScrolledWindow" id="scrolledwindow1">
+                <property name="width_request">200</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="hscrollbar_policy">automatic</property>
@@ -34,7 +35,7 @@
                 </child>
               </object>
               <packing>
-                <property name="resize">False</property>
+                <property name="resize">True</property>
                 <property name="shrink">True</property>
               </packing>
             </child>
               </object>
               <packing>
                 <property name="resize">True</property>
-                <property name="shrink">True</property>
+                <property name="shrink">False</property>
               </packing>
             </child>
           </object>