Set expand property on tree view columns to fix window resizing.
authorTim Potter <tpot@hp.com>
Wed, 9 Apr 2008 05:39:55 +0000 (15:39 +1000)
committerTim Potter <tpot@hp.com>
Wed, 9 Apr 2008 05:39:55 +0000 (15:39 +1000)
The default is for expand to be false which has the effect of window
resizing adding all the extra space to the last column in the tree view.

gbuildbotclient

index e30a2f4..3a69d1b 100755 (executable)
@@ -74,6 +74,7 @@ class App(pb.Referenceable):
             c.set_clickable(True)
             c.set_resizable(True)
             c.set_sort_column_id(text)
+            c.set_expand(True)
             return c
 
         view.append_column(
@@ -86,11 +87,14 @@ class App(pb.Referenceable):
             SortableTreeViewColumn(
                 'Build Status', self.COL_BUILDER_BUILD_STATUS))
 
-        view.append_column(
-            gtk.TreeViewColumn('Build ETA',
-                               gtk.CellRendererProgress(), 
-                               text = self.COL_BUILDER_BUILD_ETA_TEXT,
-                               value = self.COL_BUILDER_BUILD_ETA_PERCENT))
+        col = gtk.TreeViewColumn('Build ETA',
+                                 gtk.CellRendererProgress(), 
+                                 text = self.COL_BUILDER_BUILD_ETA_TEXT,
+                                 value = self.COL_BUILDER_BUILD_ETA_PERCENT)
+
+        col.set_property('expand', True)
+
+        view.append_column(col)
 
         view.show()