diff options
author | Cristiana Voicu <cristiana.voicu@intel.com> | 2013-07-25 07:37:34 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-06 13:02:24 +0100 |
commit | 116219ce09c63dfdbf1f57563c6d0b400bd96823 (patch) | |
tree | 9b315ffbcd00c7054eca7da3ec1a27343e63224c /bitbake/lib/bb/ui/crumbs/imagedetailspage.py | |
parent | 564c83be5ee1f69e6d097c20dbfa3a76cccc0aa0 (diff) | |
download | poky-116219ce09c63dfdbf1f57563c6d0b400bd96823.tar.gz |
bitbake: hob: make changes in order to permit from UI to edit an image after saving it
Added the image name to the list model, in order to show the image name as
the user named it.
[YOCTO #4193]
(Bitbake rev: 0aba493103d1fe50026a47db16529febbbbd77a2)
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/imagedetailspage.py')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/imagedetailspage.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py index f55d43f30d..eaa45889c3 100755 --- a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py +++ b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py | |||
@@ -189,6 +189,7 @@ class ImageDetailsPage (HobPage): | |||
189 | self.image_store = [] | 189 | self.image_store = [] |
190 | self.button_ids = {} | 190 | self.button_ids = {} |
191 | self.details_bottom_buttons = gtk.HBox(False, 6) | 191 | self.details_bottom_buttons = gtk.HBox(False, 6) |
192 | self.image_saved = False | ||
192 | self.create_visual_elements() | 193 | self.create_visual_elements() |
193 | 194 | ||
194 | def create_visual_elements(self): | 195 | def create_visual_elements(self): |
@@ -248,7 +249,7 @@ class ImageDetailsPage (HobPage): | |||
248 | self.pack_start(self.group_align, expand=True, fill=True) | 249 | self.pack_start(self.group_align, expand=True, fill=True) |
249 | 250 | ||
250 | self.build_result = None | 251 | self.build_result = None |
251 | if self.build_succeeded and self.builder.current_step == self.builder.IMAGE_GENERATING: | 252 | if self.image_saved or (self.build_succeeded and self.builder.current_step == self.builder.IMAGE_GENERATING): |
252 | # building is the previous step | 253 | # building is the previous step |
253 | icon = gtk.Image() | 254 | icon = gtk.Image() |
254 | pixmap_path = hic.ICON_INDI_CONFIRM_FILE | 255 | pixmap_path = hic.ICON_INDI_CONFIRM_FILE |
@@ -256,7 +257,10 @@ class ImageDetailsPage (HobPage): | |||
256 | pix_buffer = gtk.gdk.pixbuf_new_from_file(pixmap_path) | 257 | pix_buffer = gtk.gdk.pixbuf_new_from_file(pixmap_path) |
257 | icon.set_from_pixbuf(pix_buffer) | 258 | icon.set_from_pixbuf(pix_buffer) |
258 | varlist = [""] | 259 | varlist = [""] |
259 | vallist = ["Your image is ready"] | 260 | if self.image_saved: |
261 | vallist = ["Your image recipe has been saved"] | ||
262 | else: | ||
263 | vallist = ["Your image is ready"] | ||
260 | self.build_result = self.BuildDetailBox(varlist=varlist, vallist=vallist, icon=icon, color=color) | 264 | self.build_result = self.BuildDetailBox(varlist=varlist, vallist=vallist, icon=icon, color=color) |
261 | self.box_group_area.pack_start(self.build_result, expand=False, fill=False) | 265 | self.box_group_area.pack_start(self.build_result, expand=False, fill=False) |
262 | 266 | ||
@@ -397,6 +401,7 @@ class ImageDetailsPage (HobPage): | |||
397 | self.show_all() | 401 | self.show_all() |
398 | if self.kernel_detail and (not is_runnable): | 402 | if self.kernel_detail and (not is_runnable): |
399 | self.kernel_detail.hide() | 403 | self.kernel_detail.hide() |
404 | self.image_saved = False | ||
400 | 405 | ||
401 | def view_files_clicked_cb(self, button, image_addr): | 406 | def view_files_clicked_cb(self, button, image_addr): |
402 | subprocess.call("xdg-open /%s" % image_addr, shell=True) | 407 | subprocess.call("xdg-open /%s" % image_addr, shell=True) |
@@ -583,6 +588,7 @@ class ImageDetailsPage (HobPage): | |||
583 | name = "Save image recipe" | 588 | name = "Save image recipe" |
584 | if name in buttonlist and self.builder.recipe_model.is_custom_image(): | 589 | if name in buttonlist and self.builder.recipe_model.is_custom_image(): |
585 | save_button = HobAltButton("Save image recipe") | 590 | save_button = HobAltButton("Save image recipe") |
591 | save_button.set_sensitive(not self.image_saved) | ||
586 | button_id = save_button.connect("clicked", self.save_button_clicked_cb) | 592 | button_id = save_button.connect("clicked", self.save_button_clicked_cb) |
587 | self.button_ids[button_id] = save_button | 593 | self.button_ids[button_id] = save_button |
588 | self.details_bottom_buttons.pack_end(save_button, expand=False, fill=False) | 594 | self.details_bottom_buttons.pack_end(save_button, expand=False, fill=False) |