From f3a5ad170d73560b9515a5d55d10baa389a8e7bb Mon Sep 17 00:00:00 2001 From: Liming An Date: Thu, 24 May 2012 19:07:10 +0800 Subject: [PATCH] Hob:fixed the issue of primary button is not an 'orange hob button' In image detail page, the primary button should be an 'orange hob button', there has a primary button is not, so change it. [YOCTO #2326] (Bitbake rev: 884a0b2d927404991b7e23d5bbfab096a5b7e849) Signed-off-by: Liming An Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/imagedetailspage.py | 35 +++++++++++--------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py index 5d8549170c..9d57dc05c8 100755 --- a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py +++ b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py @@ -411,6 +411,26 @@ class ImageDetailsPage (HobPage): self.details_bottom_buttons.pack_end(run_button, expand=False, fill=False) created = True + name = "Save as template" + if name in buttonlist: + if created == True: + # separator + label = gtk.Label(" or ") + self.details_bottom_buttons.pack_end(label, expand=False, fill=False) + + # create button "Save as template" + save_button = HobAltButton("Save as template") + else: + save_button = HobButton("Save as template") + save_button.set_size_request(205, 49) + save_button.set_flags(gtk.CAN_DEFAULT) + packed = True + save_button.set_tooltip_text("Save the image configuration for reuse") + button_id = save_button.connect("clicked", self.save_button_clicked_cb) + self.button_ids[button_id] = save_button + self.details_bottom_buttons.pack_end(save_button, expand=False, fill=False) + create = True + if not packed: box = gtk.HBox(False, 6) box.show() @@ -420,21 +440,6 @@ class ImageDetailsPage (HobPage): box.add(subbox) self.details_bottom_buttons.pack_end(box, False, False) - name = "Save as template" - if name in buttonlist: - if created == True: - # separator - label = gtk.Label(" or ") - self.details_bottom_buttons.pack_end(label, expand=False, fill=False) - - # create button "Save as template" - save_button = HobAltButton("Save as template") - save_button.set_tooltip_text("Save the image configuration for reuse") - button_id = save_button.connect("clicked", self.save_button_clicked_cb) - self.button_ids[button_id] = save_button - self.details_bottom_buttons.pack_end(save_button, expand=False, fill=False) - create = True - name = "Build new image" if name in buttonlist: # create button "Build new image"