All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dongxiao Xu <dongxiao.xu@intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: [PATCH 2/2] Hob: Get image name internally when updating the image description
Date: Tue, 15 May 2012 13:52:15 +0800	[thread overview]
Message-ID: <4b9586b3c5cc41489fb4ec027debedade5b032ae.1337060999.git.dongxiao.xu@intel.com> (raw)
In-Reply-To: <cover.1337060999.git.dongxiao.xu@intel.com>
In-Reply-To: <cover.1337060999.git.dongxiao.xu@intel.com>

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(-)

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()
-- 
1.7.4.1




  parent reply	other threads:[~2012-05-15  6:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-15  5:52 [PATCH 0/2][PULL] Hob: Add white/black pattern to filter images Dongxiao Xu
2012-05-15  5:52 ` [PATCH 1/2] Hob: Add filter for images listed in image combo Dongxiao Xu
2012-05-21  7:55   ` Richard Purdie
2012-05-15  5:52 ` Dongxiao Xu [this message]
2012-05-21  0:47 ` [PATCH 0/2][PULL] Hob: Add white/black pattern to filter images Xu, Dongxiao
2012-05-22  3:08 [PATCH 0/2 v2][PULL] " Dongxiao Xu
2012-05-22  3:08 ` [PATCH 2/2] Hob: Get image name internally when updating the image description Dongxiao Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4b9586b3c5cc41489fb4ec027debedade5b032ae.1337060999.git.dongxiao.xu@intel.com \
    --to=dongxiao.xu@intel.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.