Patchwork [bitbake-devel,06/12] Hob: Remove the indication in machine/base image combobox

login
register
mail settings
Submitter Dongxiao Xu
Date March 15, 2012, 8:29 a.m.
Message ID <ac36d218ed6793d6fbf3edfadaf193629ea1e46d.1331796806.git.dongxiao.xu@intel.com>
Download mbox | patch
Permalink /patch/23401/
State New
Headers show

Comments

Dongxiao Xu - March 15, 2012, 8:29 a.m.
Remove the "--select a machine--" prompt in machine selection.
Also change "--select a base image--" to "Start from scratch" for
base image selection.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/hoblistmodel.py           |    2 +-
 lib/bb/ui/crumbs/imageconfigurationpage.py |   20 +++++++-------------
 2 files changed, 8 insertions(+), 14 deletions(-)

Patch

diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
index 0378828..c19aaa8 100644
--- a/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/lib/bb/ui/crumbs/hoblistmodel.py
@@ -422,7 +422,7 @@  class RecipeListModel(gtk.ListStore):
     """
     (COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_INSTALL, COL_PN) = range(11)
 
-    __dummy_image__ = "--select a base image--"
+    __dummy_image__ = "Start from scratch"
 
     __gsignals__ = {
         "recipelist-populated" : (gobject.SIGNAL_RUN_LAST,
diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index f029bf8..3b1201e 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -33,8 +33,6 @@  from bb.ui.crumbs.hobpages import HobPage
 #
 class ImageConfigurationPage (HobPage):
 
-    __dummy_machine__ = "--select a machine--"
-
     def __init__(self, builder):
         super(ImageConfigurationPage, self).__init__(builder, "Image configuration")
 
@@ -236,22 +234,18 @@  class ImageConfigurationPage (HobPage):
 
     def machine_combo_changed_cb(self, machine_combo):
         combo_item = machine_combo.get_active_text()
-        if not combo_item or combo_item == self.__dummy_machine__:
-            self.builder.configuration.curr_mach = ""
-            self.builder.switch_page(self.builder.MACHINE_SELECTION)
-        else:
-            self.builder.configuration.curr_mach = combo_item
-            # Do reparse recipes
-            self.builder.switch_page(self.builder.RCPPKGINFO_POPULATING)
+        self.builder.configuration.curr_mach = combo_item
+        # Do reparse recipes
+        self.builder.switch_page(self.builder.RCPPKGINFO_POPULATING)
 
     def update_machine_combo(self):
-        all_machines = [self.__dummy_machine__] + self.builder.parameters.all_machines
+        all_machines = self.builder.parameters.all_machines
 
         model = self.machine_combo.get_model()
         model.clear()
         for machine in all_machines:
             self.machine_combo.append_text(machine)
-        self.machine_combo.set_active(0)
+        self.machine_combo.set_active(-1)
 
     def switch_machine_combo(self):
         model = self.machine_combo.get_model()
@@ -261,7 +255,7 @@  class ImageConfigurationPage (HobPage):
                 self.machine_combo.set_active(active)
                 return
             active += 1
-        self.machine_combo.set_active(0)
+        self.machine_combo.set_active(-1)
 
     def image_combo_changed_idle_cb(self, selected_image, selected_recipes, selected_packages):
         self.builder.update_recipe_model(selected_image, selected_recipes)
@@ -302,7 +296,7 @@  class ImageConfigurationPage (HobPage):
         # populate image combo
         filter = {RecipeListModel.COL_TYPE : ['image']}
         image_model = recipe_model.tree_model(filter)
-        active = 0
+        active = -1
         cnt = 0
 
         it = image_model.get_iter_first()