diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hig.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig.py | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py index 6ae682bb76..a30e7d9205 100644 --- a/bitbake/lib/bb/ui/crumbs/hig.py +++ b/bitbake/lib/bb/ui/crumbs/hig.py | |||
@@ -28,7 +28,7 @@ import re | |||
28 | import subprocess | 28 | import subprocess |
29 | import shlex | 29 | import shlex |
30 | from bb.ui.crumbs.hobcolor import HobColors | 30 | from bb.ui.crumbs.hobcolor import HobColors |
31 | from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton | 31 | from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton |
32 | from bb.ui.crumbs.progressbar import HobProgressBar | 32 | from bb.ui.crumbs.progressbar import HobProgressBar |
33 | 33 | ||
34 | """ | 34 | """ |
@@ -137,9 +137,11 @@ class AdvancedSettingDialog (CrumbsDialog): | |||
137 | 137 | ||
138 | def entry_widget_select_path_cb(self, action, parent, entry): | 138 | def entry_widget_select_path_cb(self, action, parent, entry): |
139 | dialog = gtk.FileChooserDialog("", parent, | 139 | dialog = gtk.FileChooserDialog("", parent, |
140 | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, | 140 | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) |
141 | (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, | 141 | button = dialog.add_button("Cancel", gtk.RESPONSE_NO) |
142 | gtk.STOCK_OPEN, gtk.RESPONSE_YES)) | 142 | HobAltButton.style_button(button) |
143 | button = dialog.add_button("Open", gtk.RESPONSE_YES) | ||
144 | HobButton.style_button(button) | ||
143 | response = dialog.run() | 145 | response = dialog.run() |
144 | if response == gtk.RESPONSE_YES: | 146 | if response == gtk.RESPONSE_YES: |
145 | path = dialog.get_filename() | 147 | path = dialog.get_filename() |
@@ -307,7 +309,7 @@ class AdvancedSettingDialog (CrumbsDialog): | |||
307 | 309 | ||
308 | def __init__(self, title, configuration, all_image_types, | 310 | def __init__(self, title, configuration, all_image_types, |
309 | all_package_formats, all_distros, all_sdk_machines, | 311 | all_package_formats, all_distros, all_sdk_machines, |
310 | max_threads, parent, flags, buttons): | 312 | max_threads, parent, flags, buttons=None): |
311 | super(AdvancedSettingDialog, self).__init__(title, parent, flags, buttons) | 313 | super(AdvancedSettingDialog, self).__init__(title, parent, flags, buttons) |
312 | 314 | ||
313 | # class members from other objects | 315 | # class members from other objects |
@@ -563,7 +565,7 @@ class DeployImageDialog (CrumbsDialog): | |||
563 | 565 | ||
564 | __dummy_usb__ = "--select a usb drive--" | 566 | __dummy_usb__ = "--select a usb drive--" |
565 | 567 | ||
566 | def __init__(self, title, image_path, parent, flags, buttons): | 568 | def __init__(self, title, image_path, parent, flags, buttons=None): |
567 | super(DeployImageDialog, self).__init__(title, parent, flags, buttons) | 569 | super(DeployImageDialog, self).__init__(title, parent, flags, buttons) |
568 | 570 | ||
569 | self.image_path = image_path | 571 | self.image_path = image_path |
@@ -713,9 +715,11 @@ class LayerSelectionDialog (CrumbsDialog): | |||
713 | 715 | ||
714 | def layer_widget_add_clicked_cb(self, action, layer_store, parent): | 716 | def layer_widget_add_clicked_cb(self, action, layer_store, parent): |
715 | dialog = gtk.FileChooserDialog("Add new layer", parent, | 717 | dialog = gtk.FileChooserDialog("Add new layer", parent, |
716 | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, | 718 | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) |
717 | (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, | 719 | button = dialog.add_button("Cancel", gtk.RESPONSE_NO) |
718 | gtk.STOCK_OPEN, gtk.RESPONSE_YES)) | 720 | HobAltButton.style_button(button) |
721 | button = dialog.add_button("Open", gtk.RESPONSE_YES) | ||
722 | HobButton.style_button(button) | ||
719 | label = gtk.Label("Select the layer you wish to add") | 723 | label = gtk.Label("Select the layer you wish to add") |
720 | label.show() | 724 | label.show() |
721 | dialog.set_extra_widget(label) | 725 | dialog.set_extra_widget(label) |
@@ -827,7 +831,7 @@ class LayerSelectionDialog (CrumbsDialog): | |||
827 | def add_leave_cb(self, button, event): | 831 | def add_leave_cb(self, button, event): |
828 | self.im.set_from_file(hic.ICON_INDI_ADD_FILE) | 832 | self.im.set_from_file(hic.ICON_INDI_ADD_FILE) |
829 | 833 | ||
830 | def __init__(self, title, layers, all_layers, parent, flags, buttons): | 834 | def __init__(self, title, layers, all_layers, parent, flags, buttons=None): |
831 | super(LayerSelectionDialog, self).__init__(title, parent, flags, buttons) | 835 | super(LayerSelectionDialog, self).__init__(title, parent, flags, buttons) |
832 | 836 | ||
833 | # class members from other objects | 837 | # class members from other objects |
@@ -921,7 +925,7 @@ class ImageSelectionDialog (CrumbsDialog): | |||
921 | }] | 925 | }] |
922 | 926 | ||
923 | 927 | ||
924 | def __init__(self, image_folder, image_types, title, parent, flags, buttons): | 928 | def __init__(self, image_folder, image_types, title, parent, flags, buttons=None): |
925 | super(ImageSelectionDialog, self).__init__(title, parent, flags, buttons) | 929 | super(ImageSelectionDialog, self).__init__(title, parent, flags, buttons) |
926 | self.connect("response", self.response_cb) | 930 | self.connect("response", self.response_cb) |
927 | 931 | ||
@@ -975,9 +979,11 @@ class ImageSelectionDialog (CrumbsDialog): | |||
975 | 979 | ||
976 | def select_path_cb(self, action, parent, entry): | 980 | def select_path_cb(self, action, parent, entry): |
977 | dialog = gtk.FileChooserDialog("", parent, | 981 | dialog = gtk.FileChooserDialog("", parent, |
978 | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, | 982 | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) |
979 | (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, | 983 | button = dialog.add_button("Cancel", gtk.RESPONSE_NO) |
980 | gtk.STOCK_OPEN, gtk.RESPONSE_YES)) | 984 | HobAltButton.style_button(button) |
985 | button = dialog.add_button("Open", gtk.RESPONSE_YES) | ||
986 | HobButton.style_button(button) | ||
981 | response = dialog.run() | 987 | response = dialog.run() |
982 | if response == gtk.RESPONSE_YES: | 988 | if response == gtk.RESPONSE_YES: |
983 | path = dialog.get_filename() | 989 | path = dialog.get_filename() |