summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index e4c66060bf..8da28617e8 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -35,7 +35,8 @@ from bb.ui.crumbs.hobpages import HobPage
35class ImageConfigurationPage (HobPage): 35class ImageConfigurationPage (HobPage):
36 36
37 __dummy_machine__ = "--select a machine--" 37 __dummy_machine__ = "--select a machine--"
38 __dummy_image__ = "Select from my image recipes" 38 __dummy_image__ = "--select an image recipe--"
39 __custom_image__ = "Select from my image recipes"
39 40
40 def __init__(self, builder): 41 def __init__(self, builder):
41 super(ImageConfigurationPage, self).__init__(builder, "Image configuration") 42 super(ImageConfigurationPage, self).__init__(builder, "Image configuration")
@@ -238,6 +239,7 @@ class ImageConfigurationPage (HobPage):
238 self.image_title_desc.set_markup(mark) 239 self.image_title_desc.set_markup(mark)
239 240
240 self.image_combo = gtk.combo_box_new_text() 241 self.image_combo = gtk.combo_box_new_text()
242 self.image_combo.set_row_separator_func(self.combo_separator_func, None)
241 self.image_combo_id = self.image_combo.connect("changed", self.image_combo_changed_cb) 243 self.image_combo_id = self.image_combo.connect("changed", self.image_combo_changed_cb)
242 244
243 self.image_desc = gtk.Label() 245 self.image_desc = gtk.Label()
@@ -256,6 +258,11 @@ class ImageConfigurationPage (HobPage):
256 258
257 self.image_separator = gtk.HSeparator() 259 self.image_separator = gtk.HSeparator()
258 260
261 def combo_separator_func(self, model, iter, user_data):
262 name = model.get_value(iter, 0)
263 if name == "--Separator--":
264 return True
265
259 def set_config_baseimg_layout(self): 266 def set_config_baseimg_layout(self):
260 self.gtable.attach(self.image_title, 0, 40, 15+self.warning_shift, 17+self.warning_shift) 267 self.gtable.attach(self.image_title, 0, 40, 15+self.warning_shift, 17+self.warning_shift)
261 self.gtable.attach(self.image_title_desc, 0, 40, 18+self.warning_shift, 22+self.warning_shift) 268 self.gtable.attach(self.image_title_desc, 0, 40, 18+self.warning_shift, 22+self.warning_shift)
@@ -358,6 +365,8 @@ class ImageConfigurationPage (HobPage):
358 def image_combo_changed_cb(self, combo): 365 def image_combo_changed_cb(self, combo):
359 self.builder.window_sensitive(False) 366 self.builder.window_sensitive(False)
360 selected_image = self.image_combo.get_active_text() 367 selected_image = self.image_combo.get_active_text()
368 if selected_image == self.__custom_image__:
369 return
361 if not selected_image or (selected_image == self.__dummy_image__): 370 if not selected_image or (selected_image == self.__dummy_image__):
362 return 371 return
363 372
@@ -424,6 +433,10 @@ class ImageConfigurationPage (HobPage):
424 self.image_combo.append_text(self.__dummy_image__) 433 self.image_combo.append_text(self.__dummy_image__)
425 cnt = cnt + 1 434 cnt = cnt + 1
426 435
436 self.image_combo.append_text(self.__custom_image__)
437 self.image_combo.append_text(self.builder.recipe_model.__custom_image__)
438 self.image_combo.append_text("--Separator--")
439
427 # append and set active 440 # append and set active
428 while it: 441 while it:
429 path = image_model.get_path(it) 442 path = image_model.get_path(it)
@@ -453,7 +466,6 @@ class ImageConfigurationPage (HobPage):
453 active = cnt 466 active = cnt
454 cnt = cnt + 1 467 cnt = cnt + 1
455 468
456 self.image_combo.append_text(self.builder.recipe_model.__custom_image__)
457 if selected_image == self.builder.recipe_model.__custom_image__: 469 if selected_image == self.builder.recipe_model.__custom_image__:
458 active = cnt 470 active = cnt
459 471