summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig.py29
1 files changed, 23 insertions, 6 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index dc7dce3e6b..c5307dfc18 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -508,10 +508,10 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
508 sub_vbox.pack_start(label, expand=False, fill=False) 508 sub_vbox.pack_start(label, expand=False, fill=False)
509 sub_vbox.pack_start(pmake_widget, expand=False, fill=False) 509 sub_vbox.pack_start(pmake_widget, expand=False, fill=False)
510 510
511 advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Cache directories and mirror</span>'), expand=False, fill=False) 511 advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Downloaded source code</span>'), expand=False, fill=False)
512 sub_vbox = gtk.VBox(False, 6) 512 sub_vbox = gtk.VBox(False, 6)
513 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False) 513 advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
514 label = self.gen_label_widget("Download directory") 514 label = self.gen_label_widget("Downloads directory")
515 tooltip = "Select a folder that caches the upstream project source code" 515 tooltip = "Select a folder that caches the upstream project source code"
516 dldir_widget, self.dldir_text = self.gen_entry_widget(self.configuration.dldir, self, tooltip) 516 dldir_widget, self.dldir_text = self.gen_entry_widget(self.configuration.dldir, self, tooltip)
517 sub_vbox.pack_start(label, expand=False, fill=False) 517 sub_vbox.pack_start(label, expand=False, fill=False)
@@ -860,13 +860,19 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
860 860
861 def rootfs_combo_changed_cb(self, rootfs_combo, all_package_format, check_hbox): 861 def rootfs_combo_changed_cb(self, rootfs_combo, all_package_format, check_hbox):
862 combo_item = self.rootfs_combo.get_active_text() 862 combo_item = self.rootfs_combo.get_active_text()
863 modified = False
863 for child in check_hbox.get_children(): 864 for child in check_hbox.get_children():
864 if isinstance(child, gtk.CheckButton): 865 if isinstance(child, gtk.CheckButton):
865 check_hbox.remove(child) 866 check_hbox.remove(child)
867 modified = True
866 for format in all_package_format: 868 for format in all_package_format:
867 if format != combo_item: 869 if format != combo_item:
868 check_button = gtk.CheckButton(format) 870 check_button = gtk.CheckButton(format)
869 check_hbox.pack_start(check_button, expand=False, fill=False) 871 check_hbox.pack_start(check_button, expand=False, fill=False)
872 modified = True
873 if modified:
874 check_hbox.remove(self.pkgfmt_info)
875 check_hbox.pack_start(self.pkgfmt_info, expand=False, fill=False)
870 check_hbox.show_all() 876 check_hbox.show_all()
871 877
872 def gen_pkgfmt_widget(self, curr_package_format, all_package_format, tooltip_combo="", tooltip_extra=""): 878 def gen_pkgfmt_widget(self, curr_package_format, all_package_format, tooltip_combo="", tooltip_extra=""):
@@ -894,8 +900,8 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
894 check_button.set_active(is_active) 900 check_button.set_active(is_active)
895 check_hbox.pack_start(check_button, expand=False, fill=False) 901 check_hbox.pack_start(check_button, expand=False, fill=False)
896 902
897 info = HobInfoButton(tooltip_extra, self) 903 self.pkgfmt_info = HobInfoButton(tooltip_extra, self)
898 check_hbox.pack_start(info, expand=False, fill=False) 904 check_hbox.pack_start(self.pkgfmt_info, expand=False, fill=False)
899 905
900 rootfs_combo.connect("changed", self.rootfs_combo_changed_cb, all_package_format, check_hbox) 906 rootfs_combo.connect("changed", self.rootfs_combo_changed_cb, all_package_format, check_hbox)
901 907
@@ -913,7 +919,7 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
913 self.configuration = configuration 919 self.configuration = configuration
914 self.image_types = all_image_types 920 self.image_types = all_image_types
915 self.all_package_formats = all_package_formats 921 self.all_package_formats = all_package_formats
916 self.all_distros = all_distros 922 self.all_distros = all_distros[:]
917 self.all_sdk_machines = all_sdk_machines 923 self.all_sdk_machines = all_sdk_machines
918 self.max_threads = max_threads 924 self.max_threads = max_threads
919 925
@@ -996,6 +1002,14 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
996 distro_vbox = gtk.VBox(False, 6) 1002 distro_vbox = gtk.VBox(False, 6)
997 label = self.gen_label_widget("Distro:") 1003 label = self.gen_label_widget("Distro:")
998 tooltip = "Selects the Yocto Project distribution you want" 1004 tooltip = "Selects the Yocto Project distribution you want"
1005 try:
1006 i = self.all_distros.index( "defaultsetup" )
1007 except ValueError:
1008 i = -1
1009 if i != -1:
1010 self.all_distros[ i ] = "Default"
1011 if self.configuration.curr_distro == "defaultsetup":
1012 self.configuration.curr_distro = "Default"
999 distro_widget, self.distro_combo = self.gen_combo_widget(self.configuration.curr_distro, self.all_distros, tooltip) 1013 distro_widget, self.distro_combo = self.gen_combo_widget(self.configuration.curr_distro, self.all_distros, tooltip)
1000 distro_vbox.pack_start(label, expand=False, fill=False) 1014 distro_vbox.pack_start(label, expand=False, fill=False)
1001 distro_vbox.pack_start(distro_widget, expand=False, fill=False) 1015 distro_vbox.pack_start(distro_widget, expand=False, fill=False)
@@ -1096,7 +1110,10 @@ class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
1096 package_format.append(child.get_label()) 1110 package_format.append(child.get_label())
1097 self.configuration.curr_package_format = " ".join(package_format) 1111 self.configuration.curr_package_format = " ".join(package_format)
1098 1112
1099 self.configuration.curr_distro = self.distro_combo.get_active_text() 1113 distro = self.distro_combo.get_active_text()
1114 if distro == "Default":
1115 distro = "defaultsetup"
1116 self.configuration.curr_distro = distro
1100 self.configuration.image_rootfs_size = self.rootfs_size_spinner.get_value_as_int() * 1024 1117 self.configuration.image_rootfs_size = self.rootfs_size_spinner.get_value_as_int() * 1024
1101 self.configuration.image_extra_size = self.extra_size_spinner.get_value_as_int() * 1024 1118 self.configuration.image_extra_size = self.extra_size_spinner.get_value_as_int() * 1024
1102 1119