summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-08-03 12:38:41 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-04 15:06:38 +0100
commit1c1e27a7796c31aecd04484d35786c3632156ec5 (patch)
treec64f1a13bc0722d8d7b9cbaea96a665a380d5848
parent6b9521743fa33070ac74ebc4ab1744f933e21691 (diff)
downloadpoky-1c1e27a7796c31aecd04484d35786c3632156ec5.tar.gz
bb/ui/hob: only connect to the changed signal of image_combo once
(Bitbake rev: bb2609ba00db11b445e0af1921744b725fe96065) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/ui/hob.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
index b8842a9b0c..5a4ac7850d 100644
--- a/bitbake/lib/bb/ui/hob.py
+++ b/bitbake/lib/bb/ui/hob.py
@@ -158,7 +158,8 @@ class MainWindow (gtk.Window):
158 it = self.model.images.iter_next(it) 158 it = self.model.images.iter_next(it)
159 cnt = cnt + 1 159 cnt = cnt + 1
160 # Reconnect the signal handler 160 # Reconnect the signal handler
161 self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb) 161 if not self.image_combo_id:
162 self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
162 163
163 def image_changed_cb(self, combo): 164 def image_changed_cb(self, combo):
164 model = self.image_combo.get_model() 165 model = self.image_combo.get_model()
@@ -321,11 +322,13 @@ class MainWindow (gtk.Window):
321 return 322 return
322 323
323 def reset_build(self): 324 def reset_build(self):
324 self.image_combo.disconnect(self.image_combo_id) 325 if self.image_combo_id:
325 self.image_combo_id = None 326 self.image_combo.disconnect(self.image_combo_id)
327 self.image_combo_id = None
326 self.image_combo.set_active(-1) 328 self.image_combo.set_active(-1)
327 self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
328 self.model.reset() 329 self.model.reset()
330 if not self.image_combo_id:
331 self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
329 332
330 def layers_cb(self, action): 333 def layers_cb(self, action):
331 resp = self.layers.run() 334 resp = self.layers.run()