From 20101e9544fe596577bd4b407404feab65bc7767 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Tue, 19 Jul 2011 16:06:32 -0700 Subject: ui/hob: Force the 'Base image combo' to be drawn correctly 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. (Bitbake rev: 65819447ccc96ae2af8d42cf3a31769ef3d2d26e) Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/hob.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bitbake/lib/bb/ui/hob.py') diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index df0ebe2328..865933c95a 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/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() -- cgit v1.2.3-54-g00ecf