diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/builder.py')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 108 |
1 files changed, 69 insertions, 39 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 | |||
32 | from bb.ui.crumbs.packageselectionpage import PackageSelectionPage | 32 | from bb.ui.crumbs.packageselectionpage import PackageSelectionPage |
33 | from bb.ui.crumbs.builddetailspage import BuildDetailsPage | 33 | from bb.ui.crumbs.builddetailspage import BuildDetailsPage |
34 | from bb.ui.crumbs.imagedetailspage import ImageDetailsPage | 34 | from bb.ui.crumbs.imagedetailspage import ImageDetailsPage |
35 | from bb.ui.crumbs.hobwidget import hwc | 35 | from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton |
36 | from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ | 36 | from 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: |