Patchwork [bitbake-devel,12/17] Hob: Move "Create your own image" to the bottom of image list

login
register
mail settings
Submitter Dongxiao Xu
Date March 21, 2012, 12:55 p.m.
Message ID <933fba7835d0fe5fa3b76bc62327d6b09b44240e.1332334068.git.dongxiao.xu@intel.com>
Download mbox | patch
Permalink /patch/23995/
State Accepted
Commit 7e00723a6508023ffbefed2c2de1bc9c55564faa
Headers show

Comments

Dongxiao Xu - March 21, 2012, 12:55 p.m.
Move "Create your own image" item to the bottom of base image list.
Besides, remove an un-used hob list entry.

This fixes [YOCTO #2104]

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

Patch

diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
index 74b2a17..61f2911 100644
--- a/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/lib/bb/ui/crumbs/hoblistmodel.py
@@ -412,7 +412,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__ = "Start from scratch"
+    __dummy_image__ = "Create your own image"
 
     __gsignals__ = {
         "recipe-selection-changed" : (gobject.SIGNAL_RUN_LAST,
@@ -434,7 +434,6 @@  class RecipeListModel(gtk.ListStore):
                                 gobject.TYPE_BOOLEAN,
                                 gobject.TYPE_BOOLEAN,
                                 gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
                                 gobject.TYPE_STRING)
 
     """
diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index 076b2c0..b0f0213 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -330,12 +330,15 @@  class ImageConfigurationPage (HobPage):
         # append and set active
         while it:
             path = image_model.get_path(it)
+            it = image_model.iter_next(it)
             image_name = image_model[path][recipe_model.COL_NAME]
+            if image_name == self.builder.recipe_model.__dummy_image__:
+                continue
             self.image_combo.append_text(image_name)
             if image_name == selected_image:
                 active = cnt
-            it = image_model.iter_next(it)
             cnt = cnt + 1
+        self.image_combo.append_text(self.builder.recipe_model.__dummy_image__)
         self._image_combo_connect_signal()
 
         self.image_combo.set_active(-1)