summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2013-09-17 13:51:14 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-22 12:16:31 +0100
commit10757c529fe0b4b9a39740d269831347a3aab4a0 (patch)
treea2046c20e885ead5cfa08c34379f0c1875a0fca5
parent516311946c7bd14c84947dc44c3bb0563e5a9667 (diff)
downloadbitbake-10757c529fe0b4b9a39740d269831347a3aab4a0.tar.gz
hob: populate "Save image" dialog when saving changes to a custom image recipe
If my build starts from a YP standard image recipe, the 'Save image recipe' dialog should be empty. If my build starts from a custom image recipe, the 'Save image recipe' dialog should populate the 'Name' and 'Description' fields with the values set for the custom image recipe. [YOCTO #5004] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xlib/bb/ui/crumbs/imagedetailspage.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bb/ui/crumbs/imagedetailspage.py b/lib/bb/ui/crumbs/imagedetailspage.py
index ca33e08a7..b5d966021 100755
--- a/lib/bb/ui/crumbs/imagedetailspage.py
+++ b/lib/bb/ui/crumbs/imagedetailspage.py
@@ -635,6 +635,14 @@ class ImageDetailsPage (HobPage):
images_dir = topdir + "/recipes/images/"
self.builder.ensure_dir(images_dir)
+ self.name_field_template = self.builder.image_configuration_page.custom_image_selected
+ if self.name_field_template:
+ image_path = self.builder.recipe_model.pn_path[self.name_field_template]
+ image_iter = self.builder.recipe_model.get_iter(image_path)
+ self.description_field_template = self.builder.recipe_model.get_value(image_iter, self.builder.recipe_model.COL_DESC)
+ else:
+ self.name_field_template = ""
+
dialog = SaveImageDialog(images_dir, self.name_field_template, self.description_field_template,
"Save image recipe", self.builder, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT)
response = dialog.run()