summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiming An <limingx.l.an@intel.com>2012-05-30 20:01:11 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 17:18:32 +0100
commitd848af637e9a14b627533bee65bf16f680dff854 (patch)
treeef542ead7438e5e5ee7a827f742e9c8b97bf390e
parente58ba1ad944ea1ba95a5ada80d4c88f0165bd1ca (diff)
downloadbitbake-d848af637e9a14b627533bee65bf16f680dff854.tar.gz
Hob: add the 'build new' be as the primary action for 'Image detail' page
As ui design, we should set at least one primary action for 'My Image' and 'Image detail' screen as the differnt selected image. if no 'run image' or no 'save as template' or no 'deploy image' we should set 'build new image' [YOCTO #2326] Signed-off-by: Liming An <limingx.l.an@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xlib/bb/ui/crumbs/imagedetailspage.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/bb/ui/crumbs/imagedetailspage.py b/lib/bb/ui/crumbs/imagedetailspage.py
index 9d57dc05c..deb053c4c 100755
--- a/lib/bb/ui/crumbs/imagedetailspage.py
+++ b/lib/bb/ui/crumbs/imagedetailspage.py
@@ -431,23 +431,20 @@ class ImageDetailsPage (HobPage):
self.details_bottom_buttons.pack_end(save_button, expand=False, fill=False)
create = True
- if not packed:
- box = gtk.HBox(False, 6)
- box.show()
- subbox = gtk.HBox(False, 0)
- subbox.set_size_request(205, 49)
- subbox.show()
- box.add(subbox)
- self.details_bottom_buttons.pack_end(box, False, False)
-
name = "Build new image"
if name in buttonlist:
# create button "Build new image"
- build_new_button = HobAltButton("Build new image")
+ if packed:
+ build_new_button = HobAltButton("Build new image")
+ self.details_bottom_buttons.pack_start(build_new_button, expand=False, fill=False)
+ else:
+ build_new_button = HobButton("Build new image")
+ build_new_button.set_size_request(205, 49)
+ build_new_button.set_flags(gtk.CAN_DEFAULT)
+ self.details_bottom_buttons.pack_end(build_new_button, expand=False, fill=False)
build_new_button.set_tooltip_text("Create a new image from scratch")
button_id = build_new_button.connect("clicked", self.build_new_button_clicked_cb)
self.button_ids[button_id] = build_new_button
- self.details_bottom_buttons.pack_start(build_new_button, expand=False, fill=False)
def get_kernel_file_name(self, image_name):
name_list = []