summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-03-29 00:10:30 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-29 21:12:56 +0100
commitff4387370667cdb5a7ac0c94732fa7e7e022b893 (patch)
treea721bb0e9eaec664911191201036649795650c28 /bitbake/lib/bb/ui/crumbs/imagedetailspage.py
parent3038c0c65d87ebeddd009f1929752585b83cb2c1 (diff)
downloadpoky-ff4387370667cdb5a7ac0c94732fa7e7e022b893.tar.gz
Hob: add Templates and Settings on image details screen
This patch is to add Templates and Settings tool buttons on the image details screen, which makes things easier and simplier. In order to fulfill that, the code splits the functions show_load_template_dialog() and show_adv_settings_dialog() in builder.py because they will possibly be called from different screens later. [Yocto #2163] (Bitbake rev: 29bea7b7076a7b74d36237da86a4eff6605d17ec) Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/imagedetailspage.py')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/imagedetailspage.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
index 7d06124048..f15aad30a5 100755
--- a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
@@ -122,12 +122,24 @@ class ImageDetailsPage (HobPage):
122 self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL) 122 self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
123 self.toolbar.set_style(gtk.TOOLBAR_BOTH) 123 self.toolbar.set_style(gtk.TOOLBAR_BOTH)
124 124
125 template_button = self.append_toolbar_button(self.toolbar,
126 "Templates",
127 hic.ICON_TEMPLATES_DISPLAY_FILE,
128 hic.ICON_TEMPLATES_HOVER_FILE,
129 "Load a hob building template saved before",
130 self.template_button_clicked_cb)
125 my_images_button = self.append_toolbar_button(self.toolbar, 131 my_images_button = self.append_toolbar_button(self.toolbar,
126 "My images", 132 "My images",
127 hic.ICON_IMAGES_DISPLAY_FILE, 133 hic.ICON_IMAGES_DISPLAY_FILE,
128 hic.ICON_IMAGES_HOVER_FILE, 134 hic.ICON_IMAGES_HOVER_FILE,
129 "Open images built out previously for running or deployment", 135 "Open images built out previously for running or deployment",
130 self.my_images_button_clicked_cb) 136 self.my_images_button_clicked_cb)
137 settings_button = self.append_toolbar_button(self.toolbar,
138 "Settings",
139 hic.ICON_SETTINGS_DISPLAY_FILE,
140 hic.ICON_SETTINGS_HOVER_FILE,
141 "Other advanced settings for build",
142 self.settings_button_clicked_cb)
131 143
132 self.details_top_buttons = self.add_onto_top_bar(self.toolbar) 144 self.details_top_buttons = self.add_onto_top_bar(self.toolbar)
133 145
@@ -386,5 +398,22 @@ class ImageDetailsPage (HobPage):
386 def edit_packages_button_clicked_cb(self, button): 398 def edit_packages_button_clicked_cb(self, button):
387 self.builder.show_packages(ask=False) 399 self.builder.show_packages(ask=False)
388 400
401 def template_button_clicked_cb(self, button):
402 response, path = self.builder.show_load_template_dialog()
403 if not response:
404 return
405 self.builder.initiate_new_build()
406 if path:
407 self.builder.load_template(path)
408
389 def my_images_button_clicked_cb(self, button): 409 def my_images_button_clicked_cb(self, button):
390 self.builder.show_load_my_images_dialog() 410 self.builder.show_load_my_images_dialog()
411
412 def settings_button_clicked_cb(self, button):
413 # Create an advanced settings dialog
414 response, settings_changed = self.builder.show_adv_settings_dialog()
415 if not response:
416 return
417 self.builder.initiate_new_build()
418 if settings_changed:
419 self.builder.reparse_post_adv_settings()