From b004d8ef0f06cbf302a55b73b20b7ee7dac645f7 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Tue, 26 Jul 2011 17:44:34 -0700 Subject: hob: fix loading customised image recipe The signal handler of the 'Base image' combo was still connected during load such that updating the UI to reflect the loaded base image triggered a change of the model. Fix this by disconnecting the signal handler when updating the displayed 'Base image'. Fixes [YOCTO #1282] (Bitbake rev: 58036a79cb79d1dff307e2cfed0e684493178507) Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/tasklistmodel.py | 2 +- bitbake/lib/bb/ui/hob.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py index d7dff3c053..e190f969a4 100644 --- a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py +++ b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py @@ -281,7 +281,7 @@ class TaskListModel(gtk.ListStore): path = self.get_path(it) name = self[path][self.COL_NAME] if name in packages: - self.include_item(path) + self.include_item(path, binb="User Selected") packages.remove(name) it = self.iter_next(it) diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index d3442c518c..90d5c5aa90 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/lib/bb/ui/hob.py @@ -122,6 +122,10 @@ class MainWindow (gtk.Window): self.build_succeeded = False def image_changed_string_cb(self, model, new_image): + # disconnect the image combo's signal handler + if self.image_combo_id: + self.image_combo.disconnect(self.image_combo_id) + self.image_combo_id = None cnt = 0 it = self.model.images.get_iter_first() while it: @@ -131,6 +135,8 @@ class MainWindow (gtk.Window): break it = self.model.images.iter_next(it) cnt = cnt + 1 + # Reconnect the signal handler + self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb) def image_changed_cb(self, combo): model = self.image_combo.get_model() -- cgit v1.2.3-54-g00ecf