diff options
author | Shane Wang <shane.wang@intel.com> | 2012-03-29 00:10:30 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-29 21:12:56 +0100 |
commit | ff4387370667cdb5a7ac0c94732fa7e7e022b893 (patch) | |
tree | a721bb0e9eaec664911191201036649795650c28 /bitbake/lib/bb/ui/crumbs/builder.py | |
parent | 3038c0c65d87ebeddd009f1929752585b83cb2c1 (diff) | |
download | poky-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/builder.py')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 2af14dc6ef..1a06dd741a 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
@@ -757,10 +757,11 @@ class Builder(gtk.Window): | |||
757 | dialog.add_filter(filter) | 757 | dialog.add_filter(filter) |
758 | 758 | ||
759 | response = dialog.run() | 759 | response = dialog.run() |
760 | path = None | ||
760 | if response == gtk.RESPONSE_YES: | 761 | if response == gtk.RESPONSE_YES: |
761 | path = dialog.get_filename() | 762 | path = dialog.get_filename() |
762 | self.load_template(path) | ||
763 | dialog.destroy() | 763 | dialog.destroy() |
764 | return response == gtk.RESPONSE_YES, path | ||
764 | 765 | ||
765 | def show_save_template_dialog(self): | 766 | def show_save_template_dialog(self): |
766 | dialog = gtk.FileChooserDialog("Save Template Files", self, | 767 | dialog = gtk.FileChooserDialog("Save Template Files", self, |
@@ -820,16 +821,20 @@ class Builder(gtk.Window): | |||
820 | button = dialog.add_button("Save", gtk.RESPONSE_YES) | 821 | button = dialog.add_button("Save", gtk.RESPONSE_YES) |
821 | HobButton.style_button(button) | 822 | HobButton.style_button(button) |
822 | response = dialog.run() | 823 | response = dialog.run() |
824 | settings_changed = False | ||
823 | if response == gtk.RESPONSE_YES: | 825 | if response == gtk.RESPONSE_YES: |
824 | self.parameters.enable_proxy = dialog.enable_proxy | 826 | self.parameters.enable_proxy = dialog.enable_proxy |
825 | self.configuration = dialog.configuration | 827 | self.configuration = dialog.configuration |
826 | # DO reparse recipes | 828 | settings_changed = dialog.settings_changed |
827 | if dialog.settings_changed: | ||
828 | if self.configuration.curr_mach == "": | ||
829 | self.switch_page(self.MACHINE_SELECTION) | ||
830 | else: | ||
831 | self.switch_page(self.RCPPKGINFO_POPULATING) | ||
832 | dialog.destroy() | 829 | dialog.destroy() |
830 | return response == gtk.RESPONSE_YES, settings_changed | ||
831 | |||
832 | def reparse_post_adv_settings(self): | ||
833 | # DO reparse recipes | ||
834 | if self.configuration.curr_mach == "": | ||
835 | self.switch_page(self.MACHINE_SELECTION) | ||
836 | else: | ||
837 | self.switch_page(self.RCPPKGINFO_POPULATING) | ||
833 | 838 | ||
834 | def deploy_image(self, image_name): | 839 | def deploy_image(self, image_name): |
835 | if not image_name: | 840 | if not image_name: |