summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorBogdan Marinescu <bogdan.a.marinescu@intel.com>2012-09-27 17:13:45 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-27 16:45:27 +0100
commit5c1345c75d248d7e18cb1c3be1e70f42c3c3f701 (patch)
tree2764dfc3ba11967038597f66c73a5eaeb5349397 /bitbake/lib
parent87a1f631ad4d86313784efe83679f45ca66daa39 (diff)
downloadpoky-5c1345c75d248d7e18cb1c3be1e70f42c3c3f701.tar.gz
bitbake: Multiple user interface fixes in settings
1. Move the "Others" tab from advanced settings to simple settings 2. Organize content of tabs into headings 3. Match various labels in the settings with the design 4. Clean up config_md5 in both simple and advanced settings This patch implements a part of the changes requested by Belen in the settings dialogs. The second version of the patch addresses all the UI changes requested by Belen (more details are in the bug description): alphabetical ordering of the image types and warnings if no image type is selected. [YOCTO #2162] (Bitbake rev: b45438555ecf2e25ebb99324a18d31c812a2738a) Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py1
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig.py203
2 files changed, 150 insertions, 54 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 357089d7cb..b847165030 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -1283,6 +1283,7 @@ class Builder(gtk.Window):
1283 HobAltButton.style_button(button) 1283 HobAltButton.style_button(button)
1284 button = dialog.add_button("Save", gtk.RESPONSE_YES) 1284 button = dialog.add_button("Save", gtk.RESPONSE_YES)
1285 HobButton.style_button(button) 1285 HobButton.style_button(button)
1286 dialog.set_save_button(button)
1286 response = dialog.run() 1287 response = dialog.run()
1287 settings_changed = False 1288 settings_changed = False
1288 if response == gtk.RESPONSE_YES: 1289 if response == gtk.RESPONSE_YES:
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index f52510c552..bdb3702e29 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -313,14 +313,6 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
313 313
314 def config_md5(self): 314 def config_md5(self):
315 data = "" 315 data = ""
316 data += ("PACKAGE_CLASSES: " + self.configuration.curr_package_format + '\n')
317 data += ("DISTRO: " + self._get_sorted_value(self.configuration.curr_distro))
318 data += ("IMAGE_ROOTFS_SIZE: " + self._get_sorted_value(self.configuration.image_rootfs_size))
319 data += ("IMAGE_EXTRA_SIZE: " + self._get_sorted_value(self.configuration.image_extra_size))
320 data += ("INCOMPATIBLE_LICENSE: " + self._get_sorted_value(self.configuration.incompat_license))
321 data += ("SDK_MACHINE: " + self._get_sorted_value(self.configuration.curr_sdk_machine))
322 data += ("TOOLCHAIN_BUILD: " + self._get_sorted_value(self.configuration.toolchain_build))
323 data += ("IMAGE_FSTYPES: " + self._get_sorted_value(self.configuration.image_fstypes))
324 data += ("ENABLE_PROXY: " + self._get_sorted_value(self.configuration.enable_proxy)) 316 data += ("ENABLE_PROXY: " + self._get_sorted_value(self.configuration.enable_proxy))
325 if self.configuration.enable_proxy: 317 if self.configuration.enable_proxy:
326 for protocol in self.configuration.proxies.keys(): 318 for protocol in self.configuration.proxies.keys():
@@ -448,6 +440,14 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
448 self.configuration.split_proxy("git", self.git_proxy.get_text() + ":" + self.git_proxy_port.get_text()) 440 self.configuration.split_proxy("git", self.git_proxy.get_text() + ":" + self.git_proxy_port.get_text())
449 self.configuration.split_proxy("cvs", self.cvs_proxy.get_text() + ":" + self.cvs_proxy_port.get_text()) 441 self.configuration.split_proxy("cvs", self.cvs_proxy.get_text() + ":" + self.cvs_proxy_port.get_text())
450 442
443 self.configuration.extra_setting = {}
444 it = self.setting_store.get_iter_first()
445 while it:
446 key = self.setting_store.get_value(it, 0)
447 value = self.setting_store.get_value(it, 1)
448 self.configuration.extra_setting[key] = value
449 it = self.setting_store.iter_next(it)
450
451 md5 = self.config_md5() 451 md5 = self.config_md5()
452 self.settings_changed = (self.md5 != md5) 452 self.settings_changed = (self.md5 != md5)
453 453
@@ -455,9 +455,10 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
455 advanced_vbox = gtk.VBox(False, 6) 455 advanced_vbox = gtk.VBox(False, 6)
456 advanced_vbox.set_border_width(6) 456 advanced_vbox.set_border_width(6)
457 457
458 advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Parallel threads</span>'), expand=False, fill=False)
458 sub_vbox = gtk.VBox(False, 6) 459 sub_vbox = gtk.VBox(False, 6)
459 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False) 460 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
460 label = self.gen_label_widget("<span weight=\"bold\">BB number threads:</span>") 461 label = self.gen_label_widget("BitBake parallel threads")
461 tooltip = "Sets the number of threads that BitBake tasks can simultaneously run. See the <a href=\"" 462 tooltip = "Sets the number of threads that BitBake tasks can simultaneously run. See the <a href=\""
462 tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/" 463 tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
463 tooltip += "poky-ref-manual.html#var-BB_NUMBER_THREADS\">Poky reference manual</a> for information" 464 tooltip += "poky-ref-manual.html#var-BB_NUMBER_THREADS\">Poky reference manual</a> for information"
@@ -467,7 +468,7 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
467 468
468 sub_vbox = gtk.VBox(False, 6) 469 sub_vbox = gtk.VBox(False, 6)
469 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False) 470 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
470 label = self.gen_label_widget("<span weight=\"bold\">Parallel make:</span>") 471 label = self.gen_label_widget("Make parallel threads")
471 tooltip = "Sets the maximum number of threads the host can use during the build. See the <a href=\"" 472 tooltip = "Sets the maximum number of threads the host can use during the build. See the <a href=\""
472 tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/" 473 tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
473 tooltip += "poky-ref-manual.html#var-PARALLEL_MAKE\">Poky reference manual</a> for information" 474 tooltip += "poky-ref-manual.html#var-PARALLEL_MAKE\">Poky reference manual</a> for information"
@@ -475,9 +476,10 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
475 sub_vbox.pack_start(label, expand=False, fill=False) 476 sub_vbox.pack_start(label, expand=False, fill=False)
476 sub_vbox.pack_start(pmake_widget, expand=False, fill=False) 477 sub_vbox.pack_start(pmake_widget, expand=False, fill=False)
477 478
479 advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Cache directories and mirror</span>'), expand=False, fill=False)
478 sub_vbox = gtk.VBox(False, 6) 480 sub_vbox = gtk.VBox(False, 6)
479 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False) 481 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
480 label = self.gen_label_widget("<span weight=\"bold\">Select download directory:</span>") 482 label = self.gen_label_widget("Download directory")
481 tooltip = "Select a folder that caches the upstream project source code" 483 tooltip = "Select a folder that caches the upstream project source code"
482 dldir_widget, self.dldir_text = self.gen_entry_widget(self.configuration.dldir, self, tooltip) 484 dldir_widget, self.dldir_text = self.gen_entry_widget(self.configuration.dldir, self, tooltip)
483 sub_vbox.pack_start(label, expand=False, fill=False) 485 sub_vbox.pack_start(label, expand=False, fill=False)
@@ -723,7 +725,7 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
723 if iter: 725 if iter:
724 path = model.get_path(iter)[0] 726 path = model.get_path(iter)[0]
725 model.remove(iter) 727 model.remove(iter)
726 728
727 def gen_editable_settings(self, setting, tooltip=""): 729 def gen_editable_settings(self, setting, tooltip=""):
728 setting_hbox = gtk.HBox(False, 12) 730 setting_hbox = gtk.HBox(False, 12)
729 731
@@ -786,6 +788,102 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
786 788
787 return setting_hbox, setting_store 789 return setting_hbox, setting_store
788 790
791 def create_others_page(self):
792 advanced_vbox = gtk.VBox(False, 6)
793 advanced_vbox.set_border_width(6)
794
795 sub_vbox = gtk.VBox(False, 6)
796 advanced_vbox.pack_start(sub_vbox, expand=True, fill=True)
797 label = self.gen_label_widget("<span weight=\"bold\">Add your own variables:</span>")
798 tooltip = "These are key/value pairs for your extra settings. Click \'Add\' and then directly edit the key and the value"
799 setting_widget, self.setting_store = self.gen_editable_settings(self.configuration.extra_setting, tooltip)
800 sub_vbox.pack_start(label, expand=False, fill=False)
801 sub_vbox.pack_start(setting_widget, expand=True, fill=True)
802
803 return advanced_vbox
804
805 def create_visual_elements(self):
806 self.nb = gtk.Notebook()
807 self.nb.set_show_tabs(True)
808 self.nb.append_page(self.create_build_environment_page(), gtk.Label("Build environment"))
809 self.nb.append_page(self.create_proxy_page(), gtk.Label("Proxies"))
810 self.nb.append_page(self.create_others_page(), gtk.Label("Others"))
811 self.nb.set_current_page(0)
812 self.vbox.pack_start(self.nb, expand=True, fill=True)
813 self.vbox.pack_end(gtk.HSeparator(), expand=True, fill=True)
814
815 self.show_all()
816
817
818#
819# AdvancedSettings Dialog
820#
821class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
822
823 def details_cb(self, button, parent, protocol):
824 dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",
825 user = self.configuration.proxies[protocol][1],
826 passwd = self.configuration.proxies[protocol][2],
827 parent = parent,
828 flags = gtk.DIALOG_MODAL
829 | gtk.DIALOG_DESTROY_WITH_PARENT
830 | gtk.DIALOG_NO_SEPARATOR)
831 dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_OK)
832 response = dialog.run()
833 if response == gtk.RESPONSE_OK:
834 self.configuration.proxies[protocol][1] = dialog.user
835 self.configuration.proxies[protocol][2] = dialog.passwd
836 self.refresh_proxy_components()
837 dialog.destroy()
838
839 def set_save_button(self, button):
840 self.save_button = button
841
842 def rootfs_combo_changed_cb(self, rootfs_combo, all_package_format, check_hbox):
843 combo_item = self.rootfs_combo.get_active_text()
844 for child in check_hbox.get_children():
845 if isinstance(child, gtk.CheckButton):
846 check_hbox.remove(child)
847 for format in all_package_format:
848 if format != combo_item:
849 check_button = gtk.CheckButton(format)
850 check_hbox.pack_start(check_button, expand=False, fill=False)
851 check_hbox.show_all()
852
853 def gen_pkgfmt_widget(self, curr_package_format, all_package_format, tooltip_combo="", tooltip_extra=""):
854 pkgfmt_vbox = gtk.VBox(False, 6)
855
856 label = self.gen_label_widget("Root file system package format")
857 pkgfmt_vbox.pack_start(label, expand=False, fill=False)
858
859 rootfs_format = ""
860 if curr_package_format:
861 rootfs_format = curr_package_format.split()[0]
862
863 rootfs_format_widget, rootfs_combo = self.gen_combo_widget(rootfs_format, all_package_format, tooltip_combo)
864 pkgfmt_vbox.pack_start(rootfs_format_widget, expand=False, fill=False)
865
866 label = self.gen_label_widget("Additional package formats")
867 pkgfmt_vbox.pack_start(label, expand=False, fill=False)
868
869 check_hbox = gtk.HBox(False, 12)
870 pkgfmt_vbox.pack_start(check_hbox, expand=False, fill=False)
871 for format in all_package_format:
872 if format != rootfs_format:
873 check_button = gtk.CheckButton(format)
874 is_active = (format in curr_package_format.split())
875 check_button.set_active(is_active)
876 check_hbox.pack_start(check_button, expand=False, fill=False)
877
878 info = HobInfoButton(tooltip_extra, self)
879 check_hbox.pack_start(info, expand=False, fill=False)
880
881 rootfs_combo.connect("changed", self.rootfs_combo_changed_cb, all_package_format, check_hbox)
882
883 pkgfmt_vbox.show_all()
884
885 return pkgfmt_vbox, rootfs_combo, check_hbox
886
789 def __init__(self, title, configuration, all_image_types, 887 def __init__(self, title, configuration, all_image_types,
790 all_package_formats, all_distros, all_sdk_machines, 888 all_package_formats, all_distros, all_sdk_machines,
791 max_threads, parent, flags, buttons=None): 889 max_threads, parent, flags, buttons=None):
@@ -811,13 +909,13 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
811 self.extra_size_spinner = None 909 self.extra_size_spinner = None
812 self.gplv3_checkbox = None 910 self.gplv3_checkbox = None
813 self.toolchain_checkbox = None 911 self.toolchain_checkbox = None
814 self.setting_store = None
815 self.image_types_checkbuttons = {} 912 self.image_types_checkbuttons = {}
816 913
817 self.md5 = self.config_md5() 914 self.md5 = self.config_md5()
818 self.settings_changed = False 915 self.settings_changed = False
819 916
820 # create visual elements on the dialog 917 # create visual elements on the dialog
918 self.save_button = None
821 self.create_visual_elements() 919 self.create_visual_elements()
822 self.connect("response", self.response_cb) 920 self.connect("response", self.response_cb)
823 921
@@ -834,12 +932,6 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
834 data += ("SDK_MACHINE: " + self._get_sorted_value(self.configuration.curr_sdk_machine)) 932 data += ("SDK_MACHINE: " + self._get_sorted_value(self.configuration.curr_sdk_machine))
835 data += ("TOOLCHAIN_BUILD: " + self._get_sorted_value(self.configuration.toolchain_build)) 933 data += ("TOOLCHAIN_BUILD: " + self._get_sorted_value(self.configuration.toolchain_build))
836 data += ("IMAGE_FSTYPES: " + self._get_sorted_value(self.configuration.image_fstypes)) 934 data += ("IMAGE_FSTYPES: " + self._get_sorted_value(self.configuration.image_fstypes))
837 data += ("ENABLE_PROXY: " + self._get_sorted_value(self.configuration.enable_proxy))
838 if self.configuration.enable_proxy:
839 for protocol in self.configuration.proxies.keys():
840 data += (protocol + ": " + self._get_sorted_value(self.configuration.combine_proxy(protocol)))
841 for key in self.configuration.extra_setting.keys():
842 data += (key + ": " + self._get_sorted_value(self.configuration.extra_setting[key]))
843 return hashlib.md5(data).hexdigest() 935 return hashlib.md5(data).hexdigest()
844 936
845 def create_visual_elements(self): 937 def create_visual_elements(self):
@@ -847,13 +939,34 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
847 self.nb.set_show_tabs(True) 939 self.nb.set_show_tabs(True)
848 self.nb.append_page(self.create_image_types_page(), gtk.Label("Image types")) 940 self.nb.append_page(self.create_image_types_page(), gtk.Label("Image types"))
849 self.nb.append_page(self.create_output_page(), gtk.Label("Output")) 941 self.nb.append_page(self.create_output_page(), gtk.Label("Output"))
850 self.nb.append_page(self.create_others_page(), gtk.Label("Others"))
851 self.nb.set_current_page(0) 942 self.nb.set_current_page(0)
852 self.vbox.pack_start(self.nb, expand=True, fill=True) 943 self.vbox.pack_start(self.nb, expand=True, fill=True)
853 self.vbox.pack_end(gtk.HSeparator(), expand=True, fill=True) 944 self.vbox.pack_end(gtk.HSeparator(), expand=True, fill=True)
854 945
855 self.show_all() 946 self.show_all()
856 947
948 def get_num_checked_image_types(self):
949 total = 0
950 for b in self.image_types_checkbuttons.values():
951 if b.get_active():
952 total = total + 1
953 return total
954
955 def set_save_button_state(self):
956 if self.save_button:
957 self.save_button.set_sensitive(self.get_num_checked_image_types() > 0)
958
959 def image_type_checkbutton_clicked_cb(self, button):
960 self.set_save_button_state()
961 if self.get_num_checked_image_types() == 0:
962 # Show an error dialog
963 lbl = "<b>Select an image type</b>\n\nYou need to select at least one image type."
964 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
965 button = dialog.add_button("OK", gtk.RESPONSE_OK)
966 HobButton.style_button(button)
967 response = dialog.run()
968 dialog.destroy()
969
857 def create_image_types_page(self): 970 def create_image_types_page(self):
858 main_vbox = gtk.VBox(False, 16) 971 main_vbox = gtk.VBox(False, 16)
859 main_vbox.set_border_width(6) 972 main_vbox.set_border_width(6)
@@ -862,7 +975,7 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
862 advanced_vbox.set_border_width(6) 975 advanced_vbox.set_border_width(6)
863 976
864 distro_vbox = gtk.VBox(False, 6) 977 distro_vbox = gtk.VBox(False, 6)
865 label = self.gen_label_widget("<span weight=\"bold\">Distro:</span>") 978 label = self.gen_label_widget("Distro:")
866 tooltip = "Selects the Yocto Project distribution you want" 979 tooltip = "Selects the Yocto Project distribution you want"
867 distro_widget, self.distro_combo = self.gen_combo_widget(self.configuration.curr_distro, self.all_distros, tooltip) 980 distro_widget, self.distro_combo = self.gen_combo_widget(self.configuration.curr_distro, self.all_distros, tooltip)
868 distro_vbox.pack_start(label, expand=False, fill=False) 981 distro_vbox.pack_start(label, expand=False, fill=False)
@@ -876,19 +989,22 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
876 989
877 tooltip = "Image file system types you want." 990 tooltip = "Image file system types you want."
878 info = HobInfoButton(tooltip, self) 991 info = HobInfoButton(tooltip, self)
879 label = self.gen_label_widget("<span weight=\"bold\">Select image types:</span>") 992 label = self.gen_label_widget("Image types:")
880 table.attach(label, 0, 9, 0, 1) 993 align = gtk.Alignment(0, 0.5, 0, 0)
881 table.attach(info, 9, 10, 0, 1) 994 table.attach(align, 0, 4, 0, 1)
995 align.add(label)
996 table.attach(info, 4, 5, 0, 1)
882 997
883 i = 1 998 i = 1
884 j = 1 999 j = 1
885 for image_type in self.image_types: 1000 for image_type in sorted(self.image_types):
886 self.image_types_checkbuttons[image_type] = gtk.CheckButton(image_type) 1001 self.image_types_checkbuttons[image_type] = gtk.CheckButton(image_type)
1002 self.image_types_checkbuttons[image_type].connect("toggled", self.image_type_checkbutton_clicked_cb)
887 article = "" 1003 article = ""
888 if image_type.startswith(("a", "e", "i", "o", "u")): 1004 if image_type.startswith(("a", "e", "i", "o", "u")):
889 article = "n" 1005 article = "n"
890 self.image_types_checkbuttons[image_type].set_tooltip_text("Build a%s %s image" % (article, image_type)) 1006 self.image_types_checkbuttons[image_type].set_tooltip_text("Build a%s %s image" % (article, image_type))
891 table.attach(self.image_types_checkbuttons[image_type], j, j + 4, i, i + 1) 1007 table.attach(self.image_types_checkbuttons[image_type], j - 1, j + 3, i, i + 1)
892 if image_type in self.configuration.image_fstypes.split(): 1008 if image_type in self.configuration.image_fstypes.split():
893 self.image_types_checkbuttons[image_type].set_active(True) 1009 self.image_types_checkbuttons[image_type].set_active(True)
894 i += 1 1010 i += 1
@@ -897,6 +1013,7 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
897 j = j + 4 1013 j = j + 4
898 1014
899 main_vbox.pack_start(advanced_vbox, expand=False, fill=False) 1015 main_vbox.pack_start(advanced_vbox, expand=False, fill=False)
1016 self.set_save_button_state()
900 1017
901 return main_vbox 1018 return main_vbox
902 1019
@@ -904,18 +1021,18 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
904 advanced_vbox = gtk.VBox(False, 6) 1021 advanced_vbox = gtk.VBox(False, 6)
905 advanced_vbox.set_border_width(6) 1022 advanced_vbox.set_border_width(6)
906 1023
1024 advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Package format</span>'), expand=False, fill=False)
907 sub_vbox = gtk.VBox(False, 6) 1025 sub_vbox = gtk.VBox(False, 6)
908 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False) 1026 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
909 label = self.gen_label_widget("<span weight=\"bold\">Packaging format:</span>")
910 tooltip_combo = "Selects the package format used to generate rootfs." 1027 tooltip_combo = "Selects the package format used to generate rootfs."
911 tooltip_extra = "Selects extra package formats to build" 1028 tooltip_extra = "Selects extra package formats to build"
912 pkgfmt_widget, self.rootfs_combo, self.check_hbox = self.gen_pkgfmt_widget(self.configuration.curr_package_format, self.all_package_formats, tooltip_combo, tooltip_extra) 1029 pkgfmt_widget, self.rootfs_combo, self.check_hbox = self.gen_pkgfmt_widget(self.configuration.curr_package_format, self.all_package_formats, tooltip_combo, tooltip_extra)
913 sub_vbox.pack_start(label, expand=False, fill=False)
914 sub_vbox.pack_start(pkgfmt_widget, expand=False, fill=False) 1030 sub_vbox.pack_start(pkgfmt_widget, expand=False, fill=False)
915 1031
1032 advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Image size</span>'), expand=False, fill=False)
916 sub_vbox = gtk.VBox(False, 6) 1033 sub_vbox = gtk.VBox(False, 6)
917 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False) 1034 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
918 label = self.gen_label_widget("<span weight=\"bold\">Image rootfs size: (MB)</span>") 1035 label = self.gen_label_widget("Image basic size (in MB)")
919 tooltip = "Sets the basic size of your target image.\nThis is the basic size of your target image unless your selected package size exceeds this value or you select \'Image Extra Size\'." 1036 tooltip = "Sets the basic size of your target image.\nThis is the basic size of your target image unless your selected package size exceeds this value or you select \'Image Extra Size\'."
920 rootfs_size_widget, self.rootfs_size_spinner = self.gen_spinner_widget(int(self.configuration.image_rootfs_size*1.0/1024), 0, 65536, tooltip) 1037 rootfs_size_widget, self.rootfs_size_spinner = self.gen_spinner_widget(int(self.configuration.image_rootfs_size*1.0/1024), 0, 65536, tooltip)
921 sub_vbox.pack_start(label, expand=False, fill=False) 1038 sub_vbox.pack_start(label, expand=False, fill=False)
@@ -923,12 +1040,13 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
923 1040
924 sub_vbox = gtk.VBox(False, 6) 1041 sub_vbox = gtk.VBox(False, 6)
925 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False) 1042 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
926 label = self.gen_label_widget("<span weight=\"bold\">Image extra size: (MB)</span>") 1043 label = self.gen_label_widget("Additional free space (in MB)")
927 tooltip = "Sets the extra free space of your target image.\nBy default, the system reserves 30% of your image size as free space. If your image contains zypper, it brings in 50MB more space. The maximum free space is 64GB." 1044 tooltip = "Sets the extra free space of your target image.\nBy default, the system reserves 30% of your image size as free space. If your image contains zypper, it brings in 50MB more space. The maximum free space is 64GB."
928 extra_size_widget, self.extra_size_spinner = self.gen_spinner_widget(int(self.configuration.image_extra_size*1.0/1024), 0, 65536, tooltip) 1045 extra_size_widget, self.extra_size_spinner = self.gen_spinner_widget(int(self.configuration.image_extra_size*1.0/1024), 0, 65536, tooltip)
929 sub_vbox.pack_start(label, expand=False, fill=False) 1046 sub_vbox.pack_start(label, expand=False, fill=False)
930 sub_vbox.pack_start(extra_size_widget, expand=False, fill=False) 1047 sub_vbox.pack_start(extra_size_widget, expand=False, fill=False)
931 1048
1049 advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Licensing</span>'), expand=False, fill=False)
932 self.gplv3_checkbox = gtk.CheckButton("Exclude GPLv3 packages") 1050 self.gplv3_checkbox = gtk.CheckButton("Exclude GPLv3 packages")
933 self.gplv3_checkbox.set_tooltip_text("Check this box to prevent GPLv3 packages from being included in your image") 1051 self.gplv3_checkbox.set_tooltip_text("Check this box to prevent GPLv3 packages from being included in your image")
934 if "GPLv3" in self.configuration.incompat_license.split(): 1052 if "GPLv3" in self.configuration.incompat_license.split():
@@ -937,6 +1055,7 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
937 self.gplv3_checkbox.set_active(False) 1055 self.gplv3_checkbox.set_active(False)
938 advanced_vbox.pack_start(self.gplv3_checkbox, expand=False, fill=False) 1056 advanced_vbox.pack_start(self.gplv3_checkbox, expand=False, fill=False)
939 1057
1058 advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Toolchain</span>'), expand=False, fill=False)
940 sub_hbox = gtk.HBox(False, 6) 1059 sub_hbox = gtk.HBox(False, 6)
941 advanced_vbox.pack_start(sub_hbox, expand=False, fill=False) 1060 advanced_vbox.pack_start(sub_hbox, expand=False, fill=False)
942 self.toolchain_checkbox = gtk.CheckButton("Build toolchain") 1061 self.toolchain_checkbox = gtk.CheckButton("Build toolchain")
@@ -950,21 +1069,6 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
950 1069
951 return advanced_vbox 1070 return advanced_vbox
952 1071
953 def create_others_page(self):
954 advanced_vbox = gtk.VBox(False, 6)
955 advanced_vbox.set_border_width(6)
956
957 sub_vbox = gtk.VBox(False, 6)
958 advanced_vbox.pack_start(sub_vbox, expand=True, fill=True)
959 label = self.gen_label_widget("<span weight=\"bold\">Add your own variables:</span>")
960 tooltip = "These are key/value pairs for your extra settings. Click \'Add\' and then directly edit the key and the value"
961 setting_widget, self.setting_store = self.gen_editable_settings(self.configuration.extra_setting, tooltip)
962 sub_vbox.pack_start(label, expand=False, fill=False)
963 sub_vbox.pack_start(setting_widget, expand=True, fill=True)
964
965 return advanced_vbox
966
967
968 def response_cb(self, dialog, response_id): 1072 def response_cb(self, dialog, response_id):
969 package_format = [] 1073 package_format = []
970 package_format.append(self.rootfs_combo.get_active_text()) 1074 package_format.append(self.rootfs_combo.get_active_text())
@@ -993,15 +1097,6 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
993 self.configuration.incompat_license = self.configuration.incompat_license.strip() 1097 self.configuration.incompat_license = self.configuration.incompat_license.strip()
994 1098
995 self.configuration.toolchain_build = self.toolchain_checkbox.get_active() 1099 self.configuration.toolchain_build = self.toolchain_checkbox.get_active()
996
997 self.configuration.extra_setting = {}
998 it = self.setting_store.get_iter_first()
999 while it:
1000 key = self.setting_store.get_value(it, 0)
1001 value = self.setting_store.get_value(it, 1)
1002 self.configuration.extra_setting[key] = value
1003 it = self.setting_store.iter_next(it)
1004
1005 self.configuration.curr_sdk_machine = self.sdk_machine_combo.get_active_text() 1100 self.configuration.curr_sdk_machine = self.sdk_machine_combo.get_active_text()
1006 md5 = self.config_md5() 1101 md5 = self.config_md5()
1007 self.settings_changed = (self.md5 != md5) 1102 self.settings_changed = (self.md5 != md5)