diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-08-03 12:38:41 -0700 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2011-08-03 12:39:30 -0700 |
commit | bb2609ba00db11b445e0af1921744b725fe96065 (patch) | |
tree | a18d79e4ce935fbda0a59b9888590b149ef744fc /lib/bb/ui/hob.py | |
parent | 110d507c69c756657393809f57443b88841ad091 (diff) | |
download | bitbake-bb2609ba00db11b445e0af1921744b725fe96065.tar.gz |
bb/ui/hob: only connect to the changed signal of image_combo once
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'lib/bb/ui/hob.py')
-rw-r--r-- | lib/bb/ui/hob.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py index b8842a9b0..5a4ac7850 100644 --- a/lib/bb/ui/hob.py +++ b/lib/bb/ui/hob.py @@ -158,7 +158,8 @@ class MainWindow (gtk.Window): 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) + if not self.image_combo_id: + 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() @@ -321,11 +322,13 @@ class MainWindow (gtk.Window): return def reset_build(self): - self.image_combo.disconnect(self.image_combo_id) - self.image_combo_id = None + if self.image_combo_id: + self.image_combo.disconnect(self.image_combo_id) + self.image_combo_id = None self.image_combo.set_active(-1) - self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb) self.model.reset() + if not self.image_combo_id: + self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb) def layers_cb(self, action): resp = self.layers.run() |