diff options
author | Valentin Popa <valentin.popa@intel.com> | 2012-09-06 10:58:32 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-14 09:50:36 +0100 |
commit | b3ba9eb7e220b395b91db4520f7321f30ea37cec (patch) | |
tree | d7f7d7748e41b0e7a10edf58a39542a1bda9fb31 /bitbake/lib/bb/ui/crumbs/builder.py | |
parent | 149c121209a5469435f7e8ae248f744ece33b88e (diff) | |
download | poky-b3ba9eb7e220b395b91db4520f7321f30ea37cec.tar.gz |
bitbake: Implement 'settings' dialog as designed
[YOCTO #2162]
(Bitbake rev: ac75b06744e73399ca1fbda322ef851ae5754b0a)
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 | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 4440d295a3..6df1ca41bd 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
@@ -38,8 +38,8 @@ from bb.ui.crumbs.builddetailspage import BuildDetailsPage | |||
38 | from bb.ui.crumbs.imagedetailspage import ImageDetailsPage | 38 | from bb.ui.crumbs.imagedetailspage import ImageDetailsPage |
39 | from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton | 39 | from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton |
40 | from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ | 40 | from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ |
41 | AdvancedSettingDialog, LayerSelectionDialog, \ | 41 | AdvancedSettingDialog, SimpleSettingsDialog, \ |
42 | DeployImageDialog | 42 | LayerSelectionDialog, DeployImageDialog |
43 | from bb.ui.crumbs.persistenttooltip import PersistentTooltip | 43 | from bb.ui.crumbs.persistenttooltip import PersistentTooltip |
44 | import bb.ui.crumbs.utils | 44 | import bb.ui.crumbs.utils |
45 | 45 | ||
@@ -800,6 +800,7 @@ class Builder(gtk.Window): | |||
800 | self.image_configuration_page.layer_button.set_sensitive(sensitive) | 800 | self.image_configuration_page.layer_button.set_sensitive(sensitive) |
801 | self.image_configuration_page.layer_info_icon.set_sensitive(sensitive) | 801 | self.image_configuration_page.layer_info_icon.set_sensitive(sensitive) |
802 | self.image_configuration_page.toolbar.set_sensitive(sensitive) | 802 | self.image_configuration_page.toolbar.set_sensitive(sensitive) |
803 | self.image_configuration_page.view_adv_configuration_button.set_sensitive(sensitive) | ||
803 | self.image_configuration_page.config_build_button.set_sensitive(sensitive) | 804 | self.image_configuration_page.config_build_button.set_sensitive(sensitive) |
804 | 805 | ||
805 | self.recipe_details_page.set_sensitive(sensitive) | 806 | self.recipe_details_page.set_sensitive(sensitive) |
@@ -1164,7 +1165,32 @@ class Builder(gtk.Window): | |||
1164 | dialog.destroy() | 1165 | dialog.destroy() |
1165 | 1166 | ||
1166 | def show_adv_settings_dialog(self): | 1167 | def show_adv_settings_dialog(self): |
1167 | dialog = AdvancedSettingDialog(title = "Settings", | 1168 | dialog = AdvancedSettingDialog(title = "Advanced configuration", |
1169 | configuration = copy.deepcopy(self.configuration), | ||
1170 | all_image_types = self.parameters.image_types, | ||
1171 | all_package_formats = self.parameters.all_package_formats, | ||
1172 | all_distros = self.parameters.all_distros, | ||
1173 | all_sdk_machines = self.parameters.all_sdk_machines, | ||
1174 | max_threads = self.parameters.max_threads, | ||
1175 | parent = self, | ||
1176 | flags = gtk.DIALOG_MODAL | ||
1177 | | gtk.DIALOG_DESTROY_WITH_PARENT | ||
1178 | | gtk.DIALOG_NO_SEPARATOR) | ||
1179 | button = dialog.add_button("Cancel", gtk.RESPONSE_NO) | ||
1180 | HobAltButton.style_button(button) | ||
1181 | button = dialog.add_button("Save", gtk.RESPONSE_YES) | ||
1182 | HobButton.style_button(button) | ||
1183 | response = dialog.run() | ||
1184 | settings_changed = False | ||
1185 | if response == gtk.RESPONSE_YES: | ||
1186 | self.configuration = dialog.configuration | ||
1187 | self.save_defaults() # remember settings | ||
1188 | settings_changed = dialog.settings_changed | ||
1189 | dialog.destroy() | ||
1190 | return response == gtk.RESPONSE_YES, settings_changed | ||
1191 | |||
1192 | def show_simple_settings_dialog(self): | ||
1193 | dialog = SimpleSettingsDialog(title = "Settings", | ||
1168 | configuration = copy.deepcopy(self.configuration), | 1194 | configuration = copy.deepcopy(self.configuration), |
1169 | all_image_types = self.parameters.image_types, | 1195 | all_image_types = self.parameters.image_types, |
1170 | all_package_formats = self.parameters.all_package_formats, | 1196 | all_package_formats = self.parameters.all_package_formats, |