Patchwork [bitbake-devel,2/2] Hob: Get image name internally when updating the image description

login
register
mail settings
Submitter Dongxiao Xu
Date May 15, 2012, 5:52 a.m.
Message ID <4b9586b3c5cc41489fb4ec027debedade5b032ae.1337060999.git.dongxiao.xu@intel.com>
Download mbox | patch
Permalink /patch/27753/
State Accepted
Commit 6635cd7bc2a448d1324e9344100f97613f4272b5
Headers show

Comments

Dongxiao Xu - May 15, 2012, 5:52 a.m.
The image name shouldn't be passed from outside caller, since the image
name may not in the combobox list. Getting the name from
update_image_desc() internally.

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

Patch

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index a4fb5eb..d78b17c 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -692,7 +692,7 @@  class Builder(gtk.Window):
         selected_packages = self.configuration.selected_packages[:]
 
         self.image_configuration_page.update_image_combo(self.recipe_model, selected_image)
-        self.image_configuration_page.update_image_desc(selected_image)
+        self.image_configuration_page.update_image_desc()
         self.update_recipe_model(selected_image, selected_recipes)
         self.update_package_model(selected_packages)
 
diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index 1198817..8299708 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -292,8 +292,9 @@  class ImageConfigurationPage (HobPage):
             active += 1
         self.machine_combo.set_active(-1)
 
-    def update_image_desc(self, selected_image):
+    def update_image_desc(self):
         desc = ""
+        selected_image = self.image_combo.get_active_text()
         if selected_image and selected_image in self.builder.recipe_model.pn_path.keys():
             image_path = self.builder.recipe_model.pn_path[selected_image]
             image_iter = self.builder.recipe_model.get_iter(image_path)
@@ -320,7 +321,7 @@  class ImageConfigurationPage (HobPage):
         image_path = self.builder.recipe_model.pn_path[selected_image]
         image_iter = self.builder.recipe_model.get_iter(image_path)
         selected_packages = self.builder.recipe_model.get_value(image_iter, self.builder.recipe_model.COL_INSTALL).split()
-        self.update_image_desc(selected_image)
+        self.update_image_desc()
 
         self.builder.recipe_model.reset()
         self.builder.package_model.reset()