summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2012-03-26 13:11:02 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-28 16:49:17 +0100
commiteba155d4d5b845f74ef44ffa0dc200d1606faa3c (patch)
tree1be790accfdb0d995f55452ed248d9741242d014 /bitbake
parent265903bdffb10c95ceaf7a892151a50b67939c71 (diff)
downloadpoky-eba155d4d5b845f74ef44ffa0dc200d1606faa3c.tar.gz
lib/bb/ui/crumbs: apply primary/secondary dialogue button styling
The design calls for primary buttons which are orange and large and secondary buttons which are subtle with pale blue text. This is so that the user is drawn towards the primary action and their use of the application is more guided. This patch uses HobButton and HobAltButton classes to style all dialogue buttons accordingly. Fixes [YOCTO #2125] (From Poky rev: 1a52fe9f9e79f33686bd92613fc93eb97daacab8) (Bitbake rev: 723ad434d427398b202b70f27762878315ffb22c) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py108
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig.py34
2 files changed, 89 insertions, 53 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index f32a0661e8..f57a85501b 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -32,7 +32,7 @@ from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage
32from bb.ui.crumbs.packageselectionpage import PackageSelectionPage 32from bb.ui.crumbs.packageselectionpage import PackageSelectionPage
33from bb.ui.crumbs.builddetailspage import BuildDetailsPage 33from bb.ui.crumbs.builddetailspage import BuildDetailsPage
34from bb.ui.crumbs.imagedetailspage import ImageDetailsPage 34from bb.ui.crumbs.imagedetailspage import ImageDetailsPage
35from bb.ui.crumbs.hobwidget import hwc 35from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton
36from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ 36from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \
37 AdvancedSettingDialog, LayerSelectionDialog, \ 37 AdvancedSettingDialog, LayerSelectionDialog, \
38 DeployImageDialog 38 DeployImageDialog
@@ -444,7 +444,8 @@ class Builder(gtk.Window):
444 lbl = "<b>Error</b>\n" 444 lbl = "<b>Error</b>\n"
445 lbl = lbl + "%s\n\n" % msg 445 lbl = lbl + "%s\n\n" % msg
446 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) 446 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
447 dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) 447 button = dialog.add_button("Close", gtk.RESPONSE_OK)
448 HobButton.style_button(button)
448 response = dialog.run() 449 response = dialog.run()
449 dialog.destroy() 450 dialog.destroy()
450 self.handler.clear_busy() 451 self.handler.clear_busy()
@@ -620,8 +621,10 @@ class Builder(gtk.Window):
620 def destroy_window_cb(self, widget, event): 621 def destroy_window_cb(self, widget, event):
621 lbl = "<b>Do you really want to exit the Hob image creator?</b>" 622 lbl = "<b>Do you really want to exit the Hob image creator?</b>"
622 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) 623 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
623 dialog.add_button("Keep using Hob", gtk.RESPONSE_NO) 624 button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
624 dialog.add_button("Exit Hob", gtk.RESPONSE_YES) 625 HobAltButton.style_button(button)
626 button = dialog.add_button("Exit Hob", gtk.RESPONSE_YES)
627 HobButton.style_button(button)
625 dialog.set_default_response(gtk.RESPONSE_YES) 628 dialog.set_default_response(gtk.RESPONSE_YES)
626 response = dialog.run() 629 response = dialog.run()
627 dialog.destroy() 630 dialog.destroy()
@@ -637,7 +640,8 @@ class Builder(gtk.Window):
637 lbl = "<b>No selections made</b>\nYou have not made any selections" 640 lbl = "<b>No selections made</b>\nYou have not made any selections"
638 lbl = lbl + " so there isn't anything to bake at this time." 641 lbl = lbl + " so there isn't anything to bake at this time."
639 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) 642 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
640 dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) 643 button = dialog.add_button("Close", gtk.RESPONSE_OK)
644 HobButton.style_button(button)
641 dialog.run() 645 dialog.run()
642 dialog.destroy() 646 dialog.destroy()
643 return 647 return
@@ -649,7 +653,8 @@ class Builder(gtk.Window):
649 lbl = "<b>No selections made</b>\nYou have not made any selections" 653 lbl = "<b>No selections made</b>\nYou have not made any selections"
650 lbl = lbl + " so there isn't anything to bake at this time." 654 lbl = lbl + " so there isn't anything to bake at this time."
651 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) 655 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
652 dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) 656 button = dialog.add_button("Close", gtk.RESPONSE_OK)
657 HobButton.style_button(button)
653 dialog.run() 658 dialog.run()
654 dialog.destroy() 659 dialog.destroy()
655 return 660 return
@@ -664,7 +669,8 @@ class Builder(gtk.Window):
664 lbl = "<b>No selections made</b>\nYou have not made any selections" 669 lbl = "<b>No selections made</b>\nYou have not made any selections"
665 lbl = lbl + " so there isn't anything to bake at this time." 670 lbl = lbl + " so there isn't anything to bake at this time."
666 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) 671 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
667 dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) 672 button = dialog.add_button("Close", gtk.RESPONSE_OK)
673 HobButton.style_button(button)
668 dialog.run() 674 dialog.run()
669 dialog.destroy() 675 dialog.destroy()
670 return 676 return
@@ -684,8 +690,9 @@ class Builder(gtk.Window):
684 parent = self, 690 parent = self,
685 flags = gtk.DIALOG_MODAL 691 flags = gtk.DIALOG_MODAL
686 | gtk.DIALOG_DESTROY_WITH_PARENT 692 | gtk.DIALOG_DESTROY_WITH_PARENT
687 | gtk.DIALOG_NO_SEPARATOR, 693 | gtk.DIALOG_NO_SEPARATOR)
688 buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES)) 694 button = dialog.add_button("Close", gtk.RESPONSE_YES)
695 HobButton.style_button(button)
689 response = dialog.run() 696 response = dialog.run()
690 if response == gtk.RESPONSE_YES: 697 if response == gtk.RESPONSE_YES:
691 self.configuration.layers = dialog.layers 698 self.configuration.layers = dialog.layers
@@ -696,9 +703,11 @@ class Builder(gtk.Window):
696 703
697 def show_load_template_dialog(self): 704 def show_load_template_dialog(self):
698 dialog = gtk.FileChooserDialog("Load Template Files", self, 705 dialog = gtk.FileChooserDialog("Load Template Files", self,
699 gtk.FILE_CHOOSER_ACTION_OPEN, 706 gtk.FILE_CHOOSER_ACTION_OPEN)
700 (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, 707 button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
701 gtk.STOCK_OPEN, gtk.RESPONSE_YES)) 708 HobAltButton.style_button(button)
709 button = dialog.add_button("Open", gtk.RESPONSE_YES)
710 HobButton.style_button(button)
702 filter = gtk.FileFilter() 711 filter = gtk.FileFilter()
703 filter.set_name("Hob Files") 712 filter.set_name("Hob Files")
704 filter.add_pattern("*.hob") 713 filter.add_pattern("*.hob")
@@ -712,9 +721,11 @@ class Builder(gtk.Window):
712 721
713 def show_save_template_dialog(self): 722 def show_save_template_dialog(self):
714 dialog = gtk.FileChooserDialog("Save Template Files", self, 723 dialog = gtk.FileChooserDialog("Save Template Files", self,
715 gtk.FILE_CHOOSER_ACTION_SAVE, 724 gtk.FILE_CHOOSER_ACTION_SAVE)
716 (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, 725 button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
717 gtk.STOCK_SAVE, gtk.RESPONSE_YES)) 726 HobAltButton.style_button(button)
727 button = dialog.add_button("Save", gtk.RESPONSE_YES)
728 HobButton.style_button(button)
718 dialog.set_current_name("hob") 729 dialog.set_current_name("hob")
719 response = dialog.run() 730 response = dialog.run()
720 if response == gtk.RESPONSE_YES: 731 if response == gtk.RESPONSE_YES:
@@ -725,15 +736,18 @@ class Builder(gtk.Window):
725 def show_load_my_images_dialog(self): 736 def show_load_my_images_dialog(self):
726 dialog = ImageSelectionDialog(self.parameters.image_addr, self.parameters.image_types, 737 dialog = ImageSelectionDialog(self.parameters.image_addr, self.parameters.image_types,
727 "Open My Images", self, 738 "Open My Images", self,
728 gtk.FILE_CHOOSER_ACTION_SAVE, 739 gtk.FILE_CHOOSER_ACTION_SAVE)
729 (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, 740 button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
730 gtk.STOCK_OPEN, gtk.RESPONSE_YES)) 741 HobAltButton.style_button(button)
742 button = dialog.add_button("Open", gtk.RESPONSE_YES)
743 HobButton.style_button(button)
731 response = dialog.run() 744 response = dialog.run()
732 if response == gtk.RESPONSE_YES: 745 if response == gtk.RESPONSE_YES:
733 if not dialog.image_names: 746 if not dialog.image_names:
734 lbl = "<b>No selections made</b>\nYou have not made any selections" 747 lbl = "<b>No selections made</b>\nYou have not made any selections"
735 crumbs_dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) 748 crumbs_dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
736 crumbs_dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) 749 button = crumbs_dialog.add_button("Close", gtk.RESPONSE_OK)
750 HobButton.style_button(button)
737 crumbs_dialog.run() 751 crumbs_dialog.run()
738 crumbs_dialog.destroy() 752 crumbs_dialog.destroy()
739 dialog.destroy() 753 dialog.destroy()
@@ -756,9 +770,11 @@ class Builder(gtk.Window):
756 parent = self, 770 parent = self,
757 flags = gtk.DIALOG_MODAL 771 flags = gtk.DIALOG_MODAL
758 | gtk.DIALOG_DESTROY_WITH_PARENT 772 | gtk.DIALOG_DESTROY_WITH_PARENT
759 | gtk.DIALOG_NO_SEPARATOR, 773 | gtk.DIALOG_NO_SEPARATOR)
760 buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, 774 button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
761 "Save", gtk.RESPONSE_YES)) 775 HobAltButton.style_button(button)
776 button = dialog.add_button("Save", gtk.RESPONSE_YES)
777 HobButton.style_button(button)
762 response = dialog.run() 778 response = dialog.run()
763 if response == gtk.RESPONSE_YES: 779 if response == gtk.RESPONSE_YES:
764 self.configuration = dialog.configuration 780 self.configuration = dialog.configuration
@@ -774,7 +790,8 @@ class Builder(gtk.Window):
774 if not image_name: 790 if not image_name:
775 lbl = "<b>Please select an image to deploy.</b>" 791 lbl = "<b>Please select an image to deploy.</b>"
776 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) 792 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
777 dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) 793 button = dialog.add_button("Close", gtk.RESPONSE_OK)
794 HobButton.style_button(button)
778 dialog.run() 795 dialog.run()
779 dialog.destroy() 796 dialog.destroy()
780 return 797 return
@@ -785,9 +802,11 @@ class Builder(gtk.Window):
785 parent = self, 802 parent = self,
786 flags = gtk.DIALOG_MODAL 803 flags = gtk.DIALOG_MODAL
787 | gtk.DIALOG_DESTROY_WITH_PARENT 804 | gtk.DIALOG_DESTROY_WITH_PARENT
788 | gtk.DIALOG_NO_SEPARATOR, 805 | gtk.DIALOG_NO_SEPARATOR)
789 buttons = ("Close", gtk.RESPONSE_NO, 806 button = dialog.add_button("Close", gtk.RESPONSE_NO)
790 "Make usb image", gtk.RESPONSE_YES)) 807 HobAltButton.style_button(button)
808 button = dialog.add_button("Make usb image", gtk.RESPONSE_YES)
809 HobButton.style_button(button)
791 response = dialog.run() 810 response = dialog.run()
792 dialog.destroy() 811 dialog.destroy()
793 812
@@ -795,15 +814,18 @@ class Builder(gtk.Window):
795 if not image_name: 814 if not image_name:
796 lbl = "<b>Please select an image to launch in QEMU.</b>" 815 lbl = "<b>Please select an image to launch in QEMU.</b>"
797 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) 816 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
798 dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) 817 button = dialog.add_button("Close", gtk.RESPONSE_OK)
818 HobButton.style_button(button)
799 dialog.run() 819 dialog.run()
800 dialog.destroy() 820 dialog.destroy()
801 return 821 return
802 822
803 dialog = gtk.FileChooserDialog("Load Kernel Files", self, 823 dialog = gtk.FileChooserDialog("Load Kernel Files", self,
804 gtk.FILE_CHOOSER_ACTION_SAVE, 824 gtk.FILE_CHOOSER_ACTION_SAVE)
805 (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, 825 button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
806 gtk.STOCK_OPEN, gtk.RESPONSE_YES)) 826 HobAltButton.style_button(button)
827 button = dialog.add_button("Open", gtk.RESPONSE_YES)
828 HobButton.style_button(button)
807 filter = gtk.FileFilter() 829 filter = gtk.FileFilter()
808 filter.set_name("Kernel Files") 830 filter.set_name("Kernel Files")
809 filter.add_pattern("*.bin") 831 filter.add_pattern("*.bin")
@@ -835,7 +857,8 @@ class Builder(gtk.Window):
835 lbl = lbl + "source environment path:" + source_env_path + "\n" 857 lbl = lbl + "source environment path:" + source_env_path + "\n"
836 lbl = lbl + "tmp path: " + tmp_path + "." 858 lbl = lbl + "tmp path: " + tmp_path + "."
837 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) 859 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
838 dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) 860 button = dialog.add_button("Close", gtk.RESPONSE_OK)
861 HobButton.style_button(button)
839 dialog.run() 862 dialog.run()
840 dialog.destroy() 863 dialog.destroy()
841 864
@@ -843,10 +866,12 @@ class Builder(gtk.Window):
843 _, selected_recipes = self.recipe_model.get_selected_recipes() 866 _, selected_recipes = self.recipe_model.get_selected_recipes()
844 if selected_recipes and ask: 867 if selected_recipes and ask:
845 lbl = "<b>Package list may be incomplete!</b>\nDo you want to build selected recipes" 868 lbl = "<b>Package list may be incomplete!</b>\nDo you want to build selected recipes"
846 lbl = lbl + " to get a full list (Yes) or just view the existing packages (No)?" 869 lbl = lbl + " to get a full list or just view the existing packages?"
847 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) 870 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
848 dialog.add_button(gtk.STOCK_NO, gtk.RESPONSE_NO) 871 button = dialog.add_button("View packages", gtk.RESPONSE_NO)
849 dialog.add_button(gtk.STOCK_YES, gtk.RESPONSE_YES) 872 HobAltButton.style_button(button)
873 button = dialog.add_button("Build packages", gtk.RESPONSE_YES)
874 HobButton.style_button(button)
850 dialog.set_default_response(gtk.RESPONSE_YES) 875 dialog.set_default_response(gtk.RESPONSE_YES)
851 response = dialog.run() 876 response = dialog.run()
852 dialog.destroy() 877 dialog.destroy()
@@ -879,8 +904,10 @@ class Builder(gtk.Window):
879 lbl = lbl + " well leave your build directory in an unusable state" 904 lbl = lbl + " well leave your build directory in an unusable state"
880 lbl = lbl + " that requires manual steps to fix.\n" 905 lbl = lbl + " that requires manual steps to fix.\n"
881 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) 906 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
882 dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) 907 button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL)
883 dialog.add_button("Force Stop", gtk.RESPONSE_YES) 908 HobAltButton.style_button(button)
909 button = dialog.add_button("Force Stop", gtk.RESPONSE_YES)
910 HobButton.style_button(button)
884 else: 911 else:
885 lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this" 912 lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this"
886 lbl = lbl + " build?\n\n'Force Stop' will stop the build as quickly as" 913 lbl = lbl + " build?\n\n'Force Stop' will stop the build as quickly as"
@@ -891,9 +918,12 @@ class Builder(gtk.Window):
891 lbl = lbl + " lengthy compilation phase is in progress this may take" 918 lbl = lbl + " lengthy compilation phase is in progress this may take"
892 lbl = lbl + " some time." 919 lbl = lbl + " some time."
893 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) 920 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
894 dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) 921 button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL)
895 dialog.add_button("Stop", gtk.RESPONSE_OK) 922 HobAltButton.style_button(button)
896 dialog.add_button("Force Stop", gtk.RESPONSE_YES) 923 button = dialog.add_button("Stop", gtk.RESPONSE_OK)
924 HobAltButton.style_button(button)
925 button = dialog.add_button("Force Stop", gtk.RESPONSE_YES)
926 HobButton.style_button(button)
897 response = dialog.run() 927 response = dialog.run()
898 dialog.destroy() 928 dialog.destroy()
899 if response != gtk.RESPONSE_CANCEL: 929 if response != gtk.RESPONSE_CANCEL:
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
28import subprocess 28import subprocess
29import shlex 29import shlex
30from bb.ui.crumbs.hobcolor import HobColors 30from bb.ui.crumbs.hobcolor import HobColors
31from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton 31from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton
32from bb.ui.crumbs.progressbar import HobProgressBar 32from 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()