summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-08-03 12:38:41 -0700
committerJoshua Lock <josh@linux.intel.com>2011-08-03 12:39:30 -0700
commitbb2609ba00db11b445e0af1921744b725fe96065 (patch)
treea18d79e4ce935fbda0a59b9888590b149ef744fc /lib
parent110d507c69c756657393809f57443b88841ad091 (diff)
downloadbitbake-contrib-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')
-rw-r--r--lib/bb/ui/hob.py11
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()