[bitbake-devel] [PATCH 06/10] ui/hob: Force the 'Base image combo' to be drawn correctly

Joshua Lock josh at linux.intel.com
Tue Jul 26 18:46:40 UTC 2011


As the combo is created before its backing model it's common for the combo to
be drawn at its minimum size and then grow the first time the user activates
it. This slight ugly patch forces the combo to be resized as soon as the
model is associated so that by the time the user interacts with the widget it
is less likely to change size.

Signed-off-by: Joshua Lock <josh at linux.intel.com>
---
 lib/bb/ui/hob.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index df0ebe2..865933c 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -155,6 +155,10 @@ class MainWindow (gtk.Window):
     def data_generated(self, handler):
         self.generating = False
         self.image_combo.set_model(self.model.images_model())
+        # Without this the image combo is incorrectly sized on first load of the GUI
+        self.image_combo.set_active(0)
+        self.image_combo.set_active(-1)
+
         if not self.image_combo_id:
             self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
         self.enable_widgets()
-- 
1.7.6





More information about the bitbake-devel mailing list