Sorry for the double post. The two patches in my messages are exactly the same.<div><br></div><div>Thanks,</div><div>Bogdan<br><br><div class="gmail_quote">On Mon, Sep 3, 2012 at 5:36 PM, Bogdan Marinescu <span dir="ltr"><<a href="mailto:bogdan.a.marinescu@intel.com" target="_blank">bogdan.a.marinescu@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Valentin Popa <<a href="mailto:valentin.popa@intel.com">valentin.popa@intel.com</a>><br>
<br>
[YOCTO #2162]<br>
---<br>
bitbake/lib/bb/ui/crumbs/builder.py | 34 +-<br>
bitbake/lib/bb/ui/crumbs/hig.py | 664 ++++++++++++--------<br>
bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py | 23 +-<br>
3 files changed, 435 insertions(+), 286 deletions(-)<br>
<br>
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py<br>
index 7de4798..e3bc9df 100755<br>
--- a/bitbake/lib/bb/ui/crumbs/builder.py<br>
+++ b/bitbake/lib/bb/ui/crumbs/builder.py<br>
@@ -36,8 +36,8 @@ from bb.ui.crumbs.builddetailspage import BuildDetailsPage<br>
from bb.ui.crumbs.imagedetailspage import ImageDetailsPage<br>
from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton, hcc<br>
from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \<br>
- AdvancedSettingDialog, LayerSelectionDialog, \<br>
- DeployImageDialog<br>
+ AdvancedSettingDialog, SimpleSettingsDialog, \<br>
+ LayerSelectionDialog, DeployImageDialog<br>
from bb.ui.crumbs.persistenttooltip import PersistentTooltip<br>
import bb.ui.crumbs.utils<br>
<br>
@@ -793,6 +793,7 @@ class Builder(gtk.Window):<br>
self.image_configuration_page.layer_button.set_sensitive(sensitive)<br>
self.image_configuration_page.layer_info_icon.set_sensitive(sensitive)<br>
self.image_configuration_page.toolbar.set_sensitive(sensitive)<br>
+ self.image_configuration_page.view_adv_configuration_button.set_sensitive(sensitive)<br>
self.image_configuration_page.config_build_button.set_sensitive(sensitive)<br>
<br>
self.recipe_details_page.set_sensitive(sensitive)<br>
@@ -1141,7 +1142,32 @@ class Builder(gtk.Window):<br>
dialog.destroy()<br>
<br>
def show_adv_settings_dialog(self):<br>
- dialog = AdvancedSettingDialog(title = "Settings",<br>
+ dialog = AdvancedSettingDialog(title = "Advanced configuration",<br>
+ configuration = copy.deepcopy(self.configuration),<br>
+ all_image_types = self.parameters.image_types,<br>
+ all_package_formats = self.parameters.all_package_formats,<br>
+ all_distros = self.parameters.all_distros,<br>
+ all_sdk_machines = self.parameters.all_sdk_machines,<br>
+ max_threads = self.parameters.max_threads,<br>
+ parent = self,<br>
+ flags = gtk.DIALOG_MODAL<br>
+ | gtk.DIALOG_DESTROY_WITH_PARENT<br>
+ | gtk.DIALOG_NO_SEPARATOR)<br>
+ button = dialog.add_button("Cancel", gtk.RESPONSE_NO)<br>
+ HobAltButton.style_button(button)<br>
+ button = dialog.add_button("Save", gtk.RESPONSE_YES)<br>
+ HobButton.style_button(button)<br>
+ response = dialog.run()<br>
+ settings_changed = False<br>
+ if response == gtk.RESPONSE_YES:<br>
+ self.configuration = dialog.configuration<br>
+ self.save_defaults() # remember settings<br>
+ settings_changed = dialog.settings_changed<br>
+ dialog.destroy()<br>
+ return response == gtk.RESPONSE_YES, settings_changed<br>
+<br>
+ def show_simple_settings_dialog(self):<br>
+ dialog = SimpleSettingsDialog(title = "Settings",<br>
configuration = copy.deepcopy(self.configuration),<br>
all_image_types = self.parameters.image_types,<br>
all_package_formats = self.parameters.all_package_formats,<br>
@@ -1334,4 +1360,4 @@ class Builder(gtk.Window):<br>
format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")<br>
self.consolelog.setFormatter(format)<br>
<br>
- self.logger.addHandler(self.consolelog)<br>
\ No newline at end of file<br>
+ self.logger.addHandler(self.consolelog)<br>
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py<br>
index 2001ff4..2c77bf7 100644<br>
--- a/bitbake/lib/bb/ui/crumbs/hig.py<br>
+++ b/bitbake/lib/bb/ui/crumbs/hig.py<br>
@@ -41,6 +41,88 @@ BitBake GUI's<br>
In summary: spacing = 12px, border-width = 6px<br>
"""<br>
<br>
+<br>
+class SettingsUIHelper():<br>
+<br>
+ def gen_label_widget(self, content):<br>
+ label = gtk.Label()<br>
+ label.set_alignment(0, 0)<br>
+ label.set_markup(content)<br>
+ label.show()<br>
+ return label<br>
+<br>
+ def gen_spinner_widget(self, content, lower, upper, tooltip=""):<br>
+ hbox = gtk.HBox(False, 12)<br>
+ adjust = gtk.Adjustment(value=content, lower=lower, upper=upper, step_incr=1)<br>
+ spinner = gtk.SpinButton(adjustment=adjust, climb_rate=1, digits=0)<br>
+<br>
+ spinner.set_value(content)<br>
+ hbox.pack_start(spinner, expand=False, fill=False)<br>
+<br>
+ info = HobInfoButton(tooltip, self)<br>
+ hbox.pack_start(info, expand=False, fill=False)<br>
+<br>
+ hbox.show_all()<br>
+ return hbox, spinner<br>
+<br>
+ def gen_combo_widget(self, curr_item, all_item, tooltip=""):<br>
+ hbox = gtk.HBox(False, 12)<br>
+ combo = gtk.combo_box_new_text()<br>
+ hbox.pack_start(combo, expand=False, fill=False)<br>
+<br>
+ index = 0<br>
+ for item in all_item or []:<br>
+ combo.append_text(item)<br>
+ if item == curr_item:<br>
+ combo.set_active(index)<br>
+ index += 1<br>
+<br>
+ info = HobInfoButton(tooltip, self)<br>
+ hbox.pack_start(info, expand=False, fill=False)<br>
+<br>
+ hbox.show_all()<br>
+ return hbox, combo<br>
+<br>
+ def entry_widget_select_path_cb(self, action, parent, entry):<br>
+ dialog = gtk.FileChooserDialog("", parent,<br>
+ gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER)<br>
+ text = entry.get_text()<br>
+ dialog.set_current_folder(text if len(text) > 0 else os.getcwd())<br>
+ button = dialog.add_button("Cancel", gtk.RESPONSE_NO)<br>
+ HobAltButton.style_button(button)<br>
+ button = dialog.add_button("Open", gtk.RESPONSE_YES)<br>
+ HobButton.style_button(button)<br>
+ response = dialog.run()<br>
+ if response == gtk.RESPONSE_YES:<br>
+ path = dialog.get_filename()<br>
+ entry.set_text(path)<br>
+<br>
+ dialog.destroy()<br>
+<br>
+ def gen_entry_widget(self, content, parent, tooltip="", need_button=True):<br>
+ hbox = gtk.HBox(False, 12)<br>
+ entry = gtk.Entry()<br>
+ entry.set_text(content)<br>
+<br>
+ if need_button:<br>
+ table = gtk.Table(1, 10, True)<br>
+ hbox.pack_start(table, expand=True, fill=True)<br>
+ table.attach(entry, 0, 9, 0, 1)<br>
+ image = gtk.Image()<br>
+ image.set_from_stock(gtk.STOCK_OPEN,gtk.ICON_SIZE_BUTTON)<br>
+ open_button = gtk.Button()<br>
+ open_button.set_image(image)<br>
+ open_button.connect("clicked", self.entry_widget_select_path_cb, parent, entry)<br>
+ table.attach(open_button, 9, 10, 0, 1)<br>
+ else:<br>
+ hbox.pack_start(entry, expand=True, fill=True)<br>
+<br>
+ info = HobInfoButton(tooltip, self)<br>
+ hbox.pack_start(info, expand=False, fill=False)<br>
+<br>
+ hbox.show_all()<br>
+ return hbox, entry<br>
+<br>
#<br>
# CrumbsDialog<br>
#<br>
@@ -94,89 +176,309 @@ class CrumbsMessageDialog(CrumbsDialog):<br>
first_row.add(self.label)<br>
<br>
#<br>
-# AdvancedSettings Dialog<br>
+# SimpleSettings Dialog<br>
#<br>
-class AdvancedSettingDialog (CrumbsDialog):<br>
+class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):<br>
<br>
- def gen_label_widget(self, content):<br>
- label = gtk.Label()<br>
- label.set_alignment(0, 0)<br>
- label.set_markup(content)<br>
- label.show()<br>
- return label<br>
+ def __init__(self, title, configuration, all_image_types,<br>
+ all_package_formats, all_distros, all_sdk_machines,<br>
+ max_threads, parent, flags, buttons=None):<br>
+ super(SimpleSettingsDialog, self).__init__(title, parent, flags, buttons)<br>
<br>
- def gen_spinner_widget(self, content, lower, upper, tooltip=""):<br>
+ # class members from other objects<br>
+ # bitbake settings from Builder.Configuration<br>
+ self.configuration = configuration<br>
+ self.image_types = all_image_types<br>
+ self.all_package_formats = all_package_formats<br>
+ self.all_distros = all_distros<br>
+ self.all_sdk_machines = all_sdk_machines<br>
+ self.max_threads = max_threads<br>
+<br>
+ # class members for internal use<br>
+ self.distro_combo = None<br>
+ self.dldir_text = None<br>
+ self.sstatedir_text = None<br>
+ self.sstatemirror_text = None<br>
+ self.bb_spinner = None<br>
+ self.pmake_spinner = None<br>
+ self.rootfs_size_spinner = None<br>
+ self.extra_size_spinner = None<br>
+ self.gplv3_checkbox = None<br>
+ self.toolchain_checkbox = None<br>
+ self.setting_store = None<br>
+ self.image_types_checkbuttons = {}<br>
+<br>
+ self.md5 = self.config_md5()<br>
+ self.settings_changed = False<br>
+<br>
+ # create visual elements on the dialog<br>
+ self.create_visual_elements()<br>
+ self.connect("response", self.response_cb)<br>
+<br>
+ def _get_sorted_value(self, var):<br>
+ return " ".join(sorted(str(var).split())) + "\n"<br>
+<br>
+ def config_md5(self):<br>
+ data = ""<br>
+ data += ("PACKAGE_CLASSES: " + self.configuration.curr_package_format + '\n')<br>
+ data += ("DISTRO: " + self._get_sorted_value(self.configuration.curr_distro))<br>
+ data += ("IMAGE_ROOTFS_SIZE: " + self._get_sorted_value(self.configuration.image_rootfs_size))<br>
+ data += ("IMAGE_EXTRA_SIZE: " + self._get_sorted_value(self.configuration.image_extra_size))<br>
+ data += ("INCOMPATIBLE_LICENSE: " + self._get_sorted_value(self.configuration.incompat_license))<br>
+ data += ("SDK_MACHINE: " + self._get_sorted_value(self.configuration.curr_sdk_machine))<br>
+ data += ("TOOLCHAIN_BUILD: " + self._get_sorted_value(self.configuration.toolchain_build))<br>
+ data += ("IMAGE_FSTYPES: " + self._get_sorted_value(self.configuration.image_fstypes))<br>
+ data += ("ENABLE_PROXY: " + self._get_sorted_value(self.configuration.enable_proxy))<br>
+ if self.configuration.enable_proxy:<br>
+ for protocol in self.configuration.proxies.keys():<br>
+ data += (protocol + ": " + self._get_sorted_value(self.configuration.combine_proxy(protocol)))<br>
+ for key in self.configuration.extra_setting.keys():<br>
+ data += (key + ": " + self._get_sorted_value(self.configuration.extra_setting[key]))<br>
+ return hashlib.md5(data).hexdigest()<br>
+<br>
+ def details_cb(self, button, parent, protocol):<br>
+ dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",<br>
+ user = self.configuration.proxies[protocol][1],<br>
+ passwd = self.configuration.proxies[protocol][2],<br>
+ parent = parent,<br>
+ flags = gtk.DIALOG_MODAL<br>
+ | gtk.DIALOG_DESTROY_WITH_PARENT<br>
+ | gtk.DIALOG_NO_SEPARATOR)<br>
+ dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_OK)<br>
+ response = dialog.run()<br>
+ if response == gtk.RESPONSE_OK:<br>
+ self.configuration.proxies[protocol][1] = dialog.user<br>
+ self.configuration.proxies[protocol][2] = dialog.passwd<br>
+ self.refresh_proxy_components()<br>
+ dialog.destroy()<br>
+<br>
+ def gen_proxy_entry_widget(self, protocol, parent, need_button=True):<br>
hbox = gtk.HBox(False, 12)<br>
- adjust = gtk.Adjustment(value=content, lower=lower, upper=upper, step_incr=1)<br>
- spinner = gtk.SpinButton(adjustment=adjust, climb_rate=1, digits=0)<br>
<br>
- spinner.set_value(content)<br>
- hbox.pack_start(spinner, expand=False, fill=False)<br>
+ label = gtk.Label(protocol.upper() + " proxy")<br>
+ hbox.pack_start(label, expand=True, fill=False, padding=24)<br>
<br>
- info = HobInfoButton(tooltip, self)<br>
- hbox.pack_start(info, expand=False, fill=False)<br>
+ proxy_entry = gtk.Entry()<br>
+ proxy_entry.set_size_request(300, -1)<br>
+ hbox.pack_start(proxy_entry, expand=False, fill=False)<br>
+<br>
+ hbox.pack_start(gtk.Label(":"), expand=False, fill=False)<br>
+<br>
+ port_entry = gtk.Entry()<br>
+ port_entry.set_size_request(60, -1)<br>
+ hbox.pack_start(port_entry, expand=False, fill=False)<br>
+<br>
+ details_button = HobAltButton("Details")<br>
+ details_button.connect("clicked", self.details_cb, parent, protocol)<br>
+ hbox.pack_start(details_button, expand=False, fill=False)<br>
<br>
hbox.show_all()<br>
- return hbox, spinner<br>
+ return hbox, proxy_entry, port_entry, details_button<br>
<br>
- def gen_combo_widget(self, curr_item, all_item, tooltip=""):<br>
- hbox = gtk.HBox(False, 12)<br>
- combo = gtk.combo_box_new_text()<br>
- hbox.pack_start(combo, expand=False, fill=False)<br>
+ def refresh_proxy_components(self):<br>
+ self.same_checkbox.set_sensitive(self.configuration.enable_proxy)<br>
<br>
- index = 0<br>
- for item in all_item or []:<br>
- combo.append_text(item)<br>
- if item == curr_item:<br>
- combo.set_active(index)<br>
- index += 1<br>
+ self.http_proxy.set_text(self.configuration.combine_host_only("http"))<br>
+ self.http_proxy.set_editable(self.configuration.enable_proxy)<br>
+ self.http_proxy.set_sensitive(self.configuration.enable_proxy)<br>
+ self.http_proxy_port.set_text(self.configuration.combine_port_only("http"))<br>
+ self.http_proxy_port.set_editable(self.configuration.enable_proxy)<br>
+ self.http_proxy_port.set_sensitive(self.configuration.enable_proxy)<br>
+ self.http_proxy_details.set_sensitive(self.configuration.enable_proxy)<br>
+<br>
+ self.https_proxy.set_text(self.configuration.combine_host_only("https"))<br>
+ self.https_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.https_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.https_proxy_port.set_text(self.configuration.combine_port_only("https"))<br>
+ self.https_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.https_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.https_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+<br>
+ self.ftp_proxy.set_text(self.configuration.combine_host_only("ftp"))<br>
+ self.ftp_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.ftp_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.ftp_proxy_port.set_text(self.configuration.combine_port_only("ftp"))<br>
+ self.ftp_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.ftp_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.ftp_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+<br>
+ self.git_proxy.set_text(self.configuration.combine_host_only("git"))<br>
+ self.git_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.git_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.git_proxy_port.set_text(self.configuration.combine_port_only("git"))<br>
+ self.git_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.git_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.git_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+<br>
+ self.cvs_proxy.set_text(self.configuration.combine_host_only("cvs"))<br>
+ self.cvs_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.cvs_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.cvs_proxy_port.set_text(self.configuration.combine_port_only("cvs"))<br>
+ self.cvs_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.cvs_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
+ self.cvs_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
<br>
+ def proxy_checkbox_toggled_cb(self, button):<br>
+ self.configuration.enable_proxy = self.proxy_checkbox.get_active()<br>
+ if not self.configuration.enable_proxy:<br>
+ self.configuration.same_proxy = False<br>
+ self.same_checkbox.set_active(self.configuration.same_proxy)<br>
+ self.refresh_proxy_components()<br>
+<br>
+ def same_checkbox_toggled_cb(self, button):<br>
+ self.configuration.same_proxy = self.same_checkbox.get_active()<br>
+ self.refresh_proxy_components()<br>
+<br>
+ def response_cb(self, dialog, response_id):<br>
+ #self.configuration.curr_distro = self.distro_combo.get_active_text()<br>
+ self.configuration.dldir = self.dldir_text.get_text()<br>
+ self.configuration.sstatedir = self.sstatedir_text.get_text()<br>
+ self.configuration.sstatemirror = self.sstatemirror_text.get_text()<br>
+ self.configuration.bbthread = self.bb_spinner.get_value_as_int()<br>
+ self.configuration.pmake = self.pmake_spinner.get_value_as_int()<br>
+<br>
+ self.configuration.split_proxy("http", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())<br>
+ if self.configuration.same_proxy:<br>
+ self.configuration.split_proxy("https", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())<br>
+ self.configuration.split_proxy("ftp", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())<br>
+ self.configuration.split_proxy("git", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())<br>
+ self.configuration.split_proxy("cvs", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())<br>
+ else:<br>
+ self.configuration.split_proxy("https", self.https_proxy.get_text() + ":" + self.https_proxy_port.get_text())<br>
+ self.configuration.split_proxy("ftp", self.ftp_proxy.get_text() + ":" + self.ftp_proxy_port.get_text())<br>
+ self.configuration.split_proxy("git", self.git_proxy.get_text() + ":" + self.git_proxy_port.get_text())<br>
+ self.configuration.split_proxy("cvs", self.cvs_proxy.get_text() + ":" + self.cvs_proxy_port.get_text())<br>
+<br>
+ md5 = self.config_md5()<br>
+ self.settings_changed = (self.md5 != md5)<br>
+<br>
+ def create_build_environment_page(self):<br>
+ advanced_vbox = gtk.VBox(False, 6)<br>
+ advanced_vbox.set_border_width(6)<br>
+<br>
+ sub_vbox = gtk.VBox(False, 6)<br>
+ advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
+ label = self.gen_label_widget("<span weight=\"bold\">BB number threads:</span>")<br>
+ tooltip = "Sets the number of threads that BitBake tasks can simultaneously run. See the <a href=\""<br>
+ tooltip += "<a href="http://www.yoctoproject.org/docs/current/poky-ref-manual/" target="_blank">http://www.yoctoproject.org/docs/current/poky-ref-manual/</a>"<br>
+ tooltip += "poky-ref-manual.html#var-BB_NUMBER_THREADS\">Poky reference manual</a> for information"<br>
+ bbthread_widget, self.bb_spinner = self.gen_spinner_widget(self.configuration.bbthread, 1, self.max_threads, tooltip)<br>
+ sub_vbox.pack_start(label, expand=False, fill=False)<br>
+ sub_vbox.pack_start(bbthread_widget, expand=False, fill=False)<br>
+<br>
+ sub_vbox = gtk.VBox(False, 6)<br>
+ advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
+ label = self.gen_label_widget("<span weight=\"bold\">Parallel make:</span>")<br>
+ tooltip = "Sets the maximum number of threads the host can use during the build. See the <a href=\""<br>
+ tooltip += "<a href="http://www.yoctoproject.org/docs/current/poky-ref-manual/" target="_blank">http://www.yoctoproject.org/docs/current/poky-ref-manual/</a>"<br>
+ tooltip += "poky-ref-manual.html#var-PARALLEL_MAKE\">Poky reference manual</a> for information"<br>
+ pmake_widget, self.pmake_spinner = self.gen_spinner_widget(self.configuration.pmake, 1, self.max_threads, tooltip)<br>
+ sub_vbox.pack_start(label, expand=False, fill=False)<br>
+ sub_vbox.pack_start(pmake_widget, expand=False, fill=False)<br>
+<br>
+ sub_vbox = gtk.VBox(False, 6)<br>
+ advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
+ label = self.gen_label_widget("<span weight=\"bold\">Select download directory:</span>")<br>
+ tooltip = "Select a folder that caches the upstream project source code"<br>
+ dldir_widget, self.dldir_text = self.gen_entry_widget(self.configuration.dldir, self, tooltip)<br>
+ sub_vbox.pack_start(label, expand=False, fill=False)<br>
+ sub_vbox.pack_start(dldir_widget, expand=False, fill=False)<br>
+<br>
+ sub_vbox = gtk.VBox(False, 6)<br>
+ advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
+ label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE directory:</span>")<br>
+ tooltip = "Select a folder that caches your prebuilt results"<br>
+ sstatedir_widget, self.sstatedir_text = self.gen_entry_widget(self.configuration.sstatedir, self, tooltip)<br>
+ sub_vbox.pack_start(label, expand=False, fill=False)<br>
+ sub_vbox.pack_start(sstatedir_widget, expand=False, fill=False)<br>
+<br>
+ sub_vbox = gtk.VBox(False, 6)<br>
+ advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
+ label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE mirror:</span>")<br>
+ tooltip = "Select the pre-built mirror that will speed your build"<br>
+ sstatemirror_widget, self.sstatemirror_text = self.gen_entry_widget(self.configuration.sstatemirror, self, tooltip)<br>
+ sub_vbox.pack_start(label, expand=False, fill=False)<br>
+ sub_vbox.pack_start(sstatemirror_widget, expand=False, fill=False)<br>
+<br>
+ return advanced_vbox<br>
+<br>
+ def create_proxy_page(self):<br>
+ advanced_vbox = gtk.VBox(False, 6)<br>
+ advanced_vbox.set_border_width(6)<br>
+<br>
+ sub_vbox = gtk.VBox(False, 6)<br>
+ advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
+ label = self.gen_label_widget("<span weight=\"bold\">Set the proxies that will be used during fetching source code</span>")<br>
+ tooltip = "Set the proxies that will be used during fetching source code or set none for direct the Internet connection"<br>
info = HobInfoButton(tooltip, self)<br>
+ hbox = gtk.HBox(False, 12)<br>
+ hbox.pack_start(label, expand=True, fill=True)<br>
hbox.pack_start(info, expand=False, fill=False)<br>
+ sub_vbox.pack_start(hbox, expand=False, fill=False)<br>
<br>
- hbox.show_all()<br>
- return hbox, combo<br>
+ self.direct_checkbox = gtk.RadioButton(None, "Direct internet connection")<br>
+ self.direct_checkbox.set_tooltip_text("Check this box to connect the Internet directly without any proxy")<br>
+ self.direct_checkbox.set_active(not self.configuration.enable_proxy)<br>
+ sub_vbox.pack_start(self.direct_checkbox, expand=False, fill=False)<br>
<br>
- def entry_widget_select_path_cb(self, action, parent, entry):<br>
- dialog = gtk.FileChooserDialog("", parent,<br>
- gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER)<br>
- text = entry.get_text()<br>
- dialog.set_current_folder(text if len(text) > 0 else os.getcwd())<br>
- button = dialog.add_button("Cancel", gtk.RESPONSE_NO)<br>
- HobAltButton.style_button(button)<br>
- button = dialog.add_button("Open", gtk.RESPONSE_YES)<br>
- HobButton.style_button(button)<br>
- response = dialog.run()<br>
- if response == gtk.RESPONSE_YES:<br>
- path = dialog.get_filename()<br>
- entry.set_text(path)<br>
+ self.proxy_checkbox = gtk.RadioButton(self.direct_checkbox, "Manual proxy configuration")<br>
+ self.proxy_checkbox.set_tooltip_text("Check this box to setup the proxy you specified")<br>
+ self.proxy_checkbox.set_active(self.configuration.enable_proxy)<br>
+ sub_vbox.pack_start(self.proxy_checkbox, expand=False, fill=False)<br>
+<br>
+ self.same_checkbox = gtk.CheckButton("Use the same proxy for all protocols")<br>
+ self.same_checkbox.set_tooltip_text("Use the same proxy as the first proxy i.e. http proxy for all protocols")<br>
+ self.same_checkbox.set_active(self.configuration.same_proxy)<br>
+ hbox = gtk.HBox(False, 12)<br>
+ hbox.pack_start(self.same_checkbox, expand=False, fill=False, padding=24)<br>
+ sub_vbox.pack_start(hbox, expand=False, fill=False)<br>
+<br>
+ proxy_widget, self.http_proxy, self.http_proxy_port, self.http_proxy_details = self.gen_proxy_entry_widget(<br>
+ "http", self, True)<br>
+ sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
+<br>
+ proxy_widget, self.https_proxy, self.https_proxy_port, self.https_proxy_details = self.gen_proxy_entry_widget(<br>
+ "https", self, True)<br>
+ sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
+<br>
+ proxy_widget, self.ftp_proxy, self.ftp_proxy_port, self.ftp_proxy_details = self.gen_proxy_entry_widget(<br>
+ "ftp", self, True)<br>
+ sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
+<br>
+ proxy_widget, self.git_proxy, self.git_proxy_port, self.git_proxy_details = self.gen_proxy_entry_widget(<br>
+ "git", self, True)<br>
+ sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
+<br>
+ proxy_widget, self.cvs_proxy, self.cvs_proxy_port, self.cvs_proxy_details = self.gen_proxy_entry_widget(<br>
+ "cvs", self, True)<br>
+ sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
<br>
- dialog.destroy()<br>
+ self.direct_checkbox.connect("toggled", self.proxy_checkbox_toggled_cb)<br>
+ self.proxy_checkbox.connect("toggled", self.proxy_checkbox_toggled_cb)<br>
+ self.same_checkbox.connect("toggled", self.same_checkbox_toggled_cb)<br>
<br>
- def gen_entry_widget(self, content, parent, tooltip="", need_button=True):<br>
- hbox = gtk.HBox(False, 12)<br>
- entry = gtk.Entry()<br>
- entry.set_text(content)<br>
+ self.refresh_proxy_components()<br>
+ return advanced_vbox<br>
<br>
- if need_button:<br>
- table = gtk.Table(1, 10, True)<br>
- hbox.pack_start(table, expand=True, fill=True)<br>
- table.attach(entry, 0, 9, 0, 1)<br>
- image = gtk.Image()<br>
- image.set_from_stock(gtk.STOCK_OPEN,gtk.ICON_SIZE_BUTTON)<br>
- open_button = gtk.Button()<br>
- open_button.set_image(image)<br>
- open_button.connect("clicked", self.entry_widget_select_path_cb, parent, entry)<br>
- table.attach(open_button, 9, 10, 0, 1)<br>
- else:<br>
- hbox.pack_start(entry, expand=True, fill=True)<br>
<br>
- info = HobInfoButton(tooltip, self)<br>
- hbox.pack_start(info, expand=False, fill=False)<br>
+ def create_visual_elements(self):<br>
+ self.nb = gtk.Notebook()<br>
+ self.nb.set_show_tabs(True)<br>
+ self.nb.append_page(self.create_build_environment_page(), gtk.Label("Build environment"))<br>
+ self.nb.append_page(self.create_proxy_page(), gtk.Label("Proxies"))<br>
+ self.nb.set_current_page(0)<br>
+ self.vbox.pack_start(self.nb, expand=True, fill=True)<br>
+ self.vbox.pack_end(gtk.HSeparator(), expand=True, fill=True)<br>
+<br>
+ self.show_all()<br>
<br>
- hbox.show_all()<br>
- return hbox, entry<br>
<br>
+<br>
+#<br>
+# AdvancedSettings Dialog<br>
+#<br>
+class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):<br>
+<br>
def details_cb(self, button, parent, protocol):<br>
dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",<br>
user = self.configuration.proxies[protocol][1],<br>
@@ -191,30 +493,7 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
self.configuration.proxies[protocol][1] = dialog.user<br>
self.configuration.proxies[protocol][2] = dialog.passwd<br>
self.refresh_proxy_components()<br>
- dialog.destroy()<br>
-<br>
- def gen_proxy_entry_widget(self, protocol, parent, need_button=True):<br>
- hbox = gtk.HBox(False, 12)<br>
-<br>
- label = gtk.Label(protocol.upper() + " proxy")<br>
- hbox.pack_start(label, expand=True, fill=False, padding=24)<br>
-<br>
- proxy_entry = gtk.Entry()<br>
- proxy_entry.set_size_request(300, -1)<br>
- hbox.pack_start(proxy_entry, expand=False, fill=False)<br>
-<br>
- hbox.pack_start(gtk.Label(":"), expand=False, fill=False)<br>
-<br>
- port_entry = gtk.Entry()<br>
- port_entry.set_size_request(60, -1)<br>
- hbox.pack_start(port_entry, expand=False, fill=False)<br>
-<br>
- details_button = HobAltButton("Details")<br>
- details_button.connect("clicked", self.details_cb, parent, protocol)<br>
- hbox.pack_start(details_button, expand=False, fill=False)<br>
-<br>
- hbox.show_all()<br>
- return hbox, proxy_entry, port_entry, details_button<br>
+ dialog.destroy()<br>
<br>
def rootfs_combo_changed_cb(self, rootfs_combo, all_package_format, check_hbox):<br>
combo_item = self.rootfs_combo.get_active_text()<br>
@@ -412,8 +691,6 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
self.nb.set_show_tabs(True)<br>
self.nb.append_page(self.create_image_types_page(), gtk.Label("Image types"))<br>
self.nb.append_page(self.create_output_page(), gtk.Label("Output"))<br>
- self.nb.append_page(self.create_build_environment_page(), gtk.Label("Build environment"))<br>
- self.nb.append_page(self.create_proxy_page(), gtk.Label("Proxies"))<br>
self.nb.append_page(self.create_others_page(), gtk.Label("Others"))<br>
self.nb.set_current_page(0)<br>
self.vbox.pack_start(self.nb, expand=True, fill=True)<br>
@@ -422,10 +699,22 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
self.show_all()<br>
<br>
def create_image_types_page(self):<br>
+ main_vbox = gtk.VBox(False, 16)<br>
+ main_vbox.set_border_width(6)<br>
+<br>
advanced_vbox = gtk.VBox(False, 6)<br>
advanced_vbox.set_border_width(6)<br>
<br>
- rows = (len(self.image_types)+1)/2<br>
+ distro_vbox = gtk.VBox(False, 6)<br>
+ label = self.gen_label_widget("<span weight=\"bold\">Distro:</span>")<br>
+ tooltip = "Selects the Yocto Project distribution you want"<br>
+ distro_widget, self.distro_combo = self.gen_combo_widget(self.configuration.curr_distro, self.all_distros, tooltip)<br>
+ distro_vbox.pack_start(label, expand=False, fill=False)<br>
+ distro_vbox.pack_start(distro_widget, expand=False, fill=False)<br>
+ main_vbox.pack_start(distro_vbox, expand=False, fill=False)<br>
+<br>
+<br>
+ rows = (len(self.image_types)+1)/3<br>
table = gtk.Table(rows + 1, 10, True)<br>
advanced_vbox.pack_start(table, expand=False, fill=False)<br>
<br>
@@ -451,7 +740,9 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
i = 1<br>
j = j + 4<br>
<br>
- return advanced_vbox<br>
+ main_vbox.pack_start(advanced_vbox, expand=False, fill=False)<br>
+<br>
+ return main_vbox<br>
<br>
def create_output_page(self):<br>
advanced_vbox = gtk.VBox(False, 6)<br>
@@ -503,122 +794,7 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
<br>
return advanced_vbox<br>
<br>
- def create_build_environment_page(self):<br>
- advanced_vbox = gtk.VBox(False, 6)<br>
- advanced_vbox.set_border_width(6)<br>
-<br>
- sub_vbox = gtk.VBox(False, 6)<br>
- advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
- label = self.gen_label_widget("<span weight=\"bold\">Select distro:</span>")<br>
- tooltip = "Selects the Yocto Project distribution you want"<br>
- distro_widget, self.distro_combo = self.gen_combo_widget(self.configuration.curr_distro, self.all_distros, tooltip)<br>
- sub_vbox.pack_start(label, expand=False, fill=False)<br>
- sub_vbox.pack_start(distro_widget, expand=False, fill=False)<br>
-<br>
- sub_vbox = gtk.VBox(False, 6)<br>
- advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
- label = self.gen_label_widget("<span weight=\"bold\">BB number threads:</span>")<br>
- tooltip = "Sets the number of threads that BitBake tasks can simultaneously run. See the <a href=\""<br>
- tooltip += "<a href="http://www.yoctoproject.org/docs/current/poky-ref-manual/" target="_blank">http://www.yoctoproject.org/docs/current/poky-ref-manual/</a>"<br>
- tooltip += "poky-ref-manual.html#var-BB_NUMBER_THREADS\">Poky reference manual</a> for information"<br>
- bbthread_widget, self.bb_spinner = self.gen_spinner_widget(self.configuration.bbthread, 1, self.max_threads, tooltip)<br>
- sub_vbox.pack_start(label, expand=False, fill=False)<br>
- sub_vbox.pack_start(bbthread_widget, expand=False, fill=False)<br>
-<br>
- sub_vbox = gtk.VBox(False, 6)<br>
- advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
- label = self.gen_label_widget("<span weight=\"bold\">Parallel make:</span>")<br>
- tooltip = "Sets the maximum number of threads the host can use during the build. See the <a href=\""<br>
- tooltip += "<a href="http://www.yoctoproject.org/docs/current/poky-ref-manual/" target="_blank">http://www.yoctoproject.org/docs/current/poky-ref-manual/</a>"<br>
- tooltip += "poky-ref-manual.html#var-PARALLEL_MAKE\">Poky reference manual</a> for information"<br>
- pmake_widget, self.pmake_spinner = self.gen_spinner_widget(self.configuration.pmake, 1, self.max_threads, tooltip)<br>
- sub_vbox.pack_start(label, expand=False, fill=False)<br>
- sub_vbox.pack_start(pmake_widget, expand=False, fill=False)<br>
-<br>
- sub_vbox = gtk.VBox(False, 6)<br>
- advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
- label = self.gen_label_widget("<span weight=\"bold\">Select download directory:</span>")<br>
- tooltip = "Select a folder that caches the upstream project source code"<br>
- dldir_widget, self.dldir_text = self.gen_entry_widget(self.configuration.dldir, self, tooltip)<br>
- sub_vbox.pack_start(label, expand=False, fill=False)<br>
- sub_vbox.pack_start(dldir_widget, expand=False, fill=False)<br>
-<br>
- sub_vbox = gtk.VBox(False, 6)<br>
- advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
- label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE directory:</span>")<br>
- tooltip = "Select a folder that caches your prebuilt results"<br>
- sstatedir_widget, self.sstatedir_text = self.gen_entry_widget(self.configuration.sstatedir, self, tooltip)<br>
- sub_vbox.pack_start(label, expand=False, fill=False)<br>
- sub_vbox.pack_start(sstatedir_widget, expand=False, fill=False)<br>
-<br>
- sub_vbox = gtk.VBox(False, 6)<br>
- advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
- label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE mirror:</span>")<br>
- tooltip = "Select the pre-built mirror that will speed your build"<br>
- sstatemirror_widget, self.sstatemirror_text = self.gen_entry_widget(self.configuration.sstatemirror, self, tooltip)<br>
- sub_vbox.pack_start(label, expand=False, fill=False)<br>
- sub_vbox.pack_start(sstatemirror_widget, expand=False, fill=False)<br>
-<br>
- return advanced_vbox<br>
-<br>
- def create_proxy_page(self):<br>
- advanced_vbox = gtk.VBox(False, 6)<br>
- advanced_vbox.set_border_width(6)<br>
-<br>
- sub_vbox = gtk.VBox(False, 6)<br>
- advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
- label = self.gen_label_widget("<span weight=\"bold\">Set the proxies that will be used during fetching source code</span>")<br>
- tooltip = "Set the proxies that will be used during fetching source code or set none for direct the Internet connection"<br>
- info = HobInfoButton(tooltip, self)<br>
- hbox = gtk.HBox(False, 12)<br>
- hbox.pack_start(label, expand=True, fill=True)<br>
- hbox.pack_start(info, expand=False, fill=False)<br>
- sub_vbox.pack_start(hbox, expand=False, fill=False)<br>
-<br>
- self.direct_checkbox = gtk.RadioButton(None, "Direct internet connection")<br>
- self.direct_checkbox.set_tooltip_text("Check this box to connect the Internet directly without any proxy")<br>
- self.direct_checkbox.set_active(not self.configuration.enable_proxy)<br>
- sub_vbox.pack_start(self.direct_checkbox, expand=False, fill=False)<br>
-<br>
- self.proxy_checkbox = gtk.RadioButton(self.direct_checkbox, "Manual proxy configuration")<br>
- self.proxy_checkbox.set_tooltip_text("Check this box to setup the proxy you specified")<br>
- self.proxy_checkbox.set_active(self.configuration.enable_proxy)<br>
- sub_vbox.pack_start(self.proxy_checkbox, expand=False, fill=False)<br>
-<br>
- self.same_checkbox = gtk.CheckButton("Use the same proxy for all protocols")<br>
- self.same_checkbox.set_tooltip_text("Use the same proxy as the first proxy i.e. http proxy for all protocols")<br>
- self.same_checkbox.set_active(self.configuration.same_proxy)<br>
- hbox = gtk.HBox(False, 12)<br>
- hbox.pack_start(self.same_checkbox, expand=False, fill=False, padding=24)<br>
- sub_vbox.pack_start(hbox, expand=False, fill=False)<br>
-<br>
- proxy_widget, self.http_proxy, self.http_proxy_port, self.http_proxy_details = self.gen_proxy_entry_widget(<br>
- "http", self, True)<br>
- sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
-<br>
- proxy_widget, self.https_proxy, self.https_proxy_port, self.https_proxy_details = self.gen_proxy_entry_widget(<br>
- "https", self, True)<br>
- sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
-<br>
- proxy_widget, self.ftp_proxy, self.ftp_proxy_port, self.ftp_proxy_details = self.gen_proxy_entry_widget(<br>
- "ftp", self, True)<br>
- sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
-<br>
- proxy_widget, self.git_proxy, self.git_proxy_port, self.git_proxy_details = self.gen_proxy_entry_widget(<br>
- "git", self, True)<br>
- sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
-<br>
- proxy_widget, self.cvs_proxy, self.cvs_proxy_port, self.cvs_proxy_details = self.gen_proxy_entry_widget(<br>
- "cvs", self, True)<br>
- sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
-<br>
- self.direct_checkbox.connect("toggled", self.proxy_checkbox_toggled_cb)<br>
- self.proxy_checkbox.connect("toggled", self.proxy_checkbox_toggled_cb)<br>
- self.same_checkbox.connect("toggled", self.same_checkbox_toggled_cb)<br>
-<br>
- self.refresh_proxy_components()<br>
- return advanced_vbox<br>
-<br>
+<br>
def create_others_page(self):<br>
advanced_vbox = gtk.VBox(False, 6)<br>
advanced_vbox.set_border_width(6)<br>
@@ -633,60 +809,7 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
<br>
return advanced_vbox<br>
<br>
- def refresh_proxy_components(self):<br>
- self.same_checkbox.set_sensitive(self.configuration.enable_proxy)<br>
-<br>
- self.http_proxy.set_text(self.configuration.combine_host_only("http"))<br>
- self.http_proxy.set_editable(self.configuration.enable_proxy)<br>
- self.http_proxy.set_sensitive(self.configuration.enable_proxy)<br>
- self.http_proxy_port.set_text(self.configuration.combine_port_only("http"))<br>
- self.http_proxy_port.set_editable(self.configuration.enable_proxy)<br>
- self.http_proxy_port.set_sensitive(self.configuration.enable_proxy)<br>
- self.http_proxy_details.set_sensitive(self.configuration.enable_proxy)<br>
-<br>
- self.https_proxy.set_text(self.configuration.combine_host_only("https"))<br>
- self.https_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.https_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.https_proxy_port.set_text(self.configuration.combine_port_only("https"))<br>
- self.https_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.https_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.https_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
-<br>
- self.ftp_proxy.set_text(self.configuration.combine_host_only("ftp"))<br>
- self.ftp_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.ftp_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.ftp_proxy_port.set_text(self.configuration.combine_port_only("ftp"))<br>
- self.ftp_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.ftp_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.ftp_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
-<br>
- self.git_proxy.set_text(self.configuration.combine_host_only("git"))<br>
- self.git_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.git_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.git_proxy_port.set_text(self.configuration.combine_port_only("git"))<br>
- self.git_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.git_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.git_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
-<br>
- self.cvs_proxy.set_text(self.configuration.combine_host_only("cvs"))<br>
- self.cvs_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.cvs_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.cvs_proxy_port.set_text(self.configuration.combine_port_only("cvs"))<br>
- self.cvs_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.cvs_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
- self.cvs_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))<br>
-<br>
- def proxy_checkbox_toggled_cb(self, button):<br>
- self.configuration.enable_proxy = self.proxy_checkbox.get_active()<br>
- if not self.configuration.enable_proxy:<br>
- self.configuration.same_proxy = False<br>
- self.same_checkbox.set_active(self.configuration.same_proxy)<br>
- self.refresh_proxy_components()<br>
-<br>
- def same_checkbox_toggled_cb(self, button):<br>
- self.configuration.same_proxy = self.same_checkbox.get_active()<br>
- self.refresh_proxy_components()<br>
-<br>
+<br>
def response_cb(self, dialog, response_id):<br>
package_format = []<br>
package_format.append(self.rootfs_combo.get_active_text())<br>
@@ -695,12 +818,7 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
package_format.append(child.get_label())<br>
self.configuration.curr_package_format = " ".join(package_format)<br>
<br>
- self.configuration.curr_distro = self.distro_combo.get_active_text()<br>
- self.configuration.dldir = self.dldir_text.get_text()<br>
- self.configuration.sstatedir = self.sstatedir_text.get_text()<br>
- self.configuration.sstatemirror = self.sstatemirror_text.get_text()<br>
- self.configuration.bbthread = self.bb_spinner.get_value_as_int()<br>
- self.configuration.pmake = self.pmake_spinner.get_value_as_int()<br>
+ self.configuration.curr_distro = self.distro_combo.get_active_text()<br>
self.configuration.image_rootfs_size = self.rootfs_size_spinner.get_value_as_int() * 1024<br>
self.configuration.image_extra_size = self.extra_size_spinner.get_value_as_int() * 1024<br>
<br>
@@ -727,19 +845,7 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
key = self.setting_store.get_value(it, 0)<br>
value = self.setting_store.get_value(it, 1)<br>
self.configuration.extra_setting[key] = value<br>
- it = self.setting_store.iter_next(it)<br>
-<br>
- self.configuration.split_proxy("http", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())<br>
- if self.configuration.same_proxy:<br>
- self.configuration.split_proxy("https", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())<br>
- self.configuration.split_proxy("ftp", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())<br>
- self.configuration.split_proxy("git", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())<br>
- self.configuration.split_proxy("cvs", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())<br>
- else:<br>
- self.configuration.split_proxy("https", self.https_proxy.get_text() + ":" + self.https_proxy_port.get_text())<br>
- self.configuration.split_proxy("ftp", self.ftp_proxy.get_text() + ":" + self.ftp_proxy_port.get_text())<br>
- self.configuration.split_proxy("git", self.git_proxy.get_text() + ":" + self.git_proxy_port.get_text())<br>
- self.configuration.split_proxy("cvs", self.cvs_proxy.get_text() + ":" + self.cvs_proxy_port.get_text())<br>
+ it = self.setting_store.iter_next(it)<br>
<br>
md5 = self.config_md5()<br>
self.settings_changed = (self.md5 != md5)<br>
diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py<br>
index 6aeb6dc..e665f38 100644<br>
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py<br>
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py<br>
@@ -205,17 +205,26 @@ class ImageConfigurationPage (HobPage):<br>
<br>
self.image_desc = gtk.Label()<br>
self.image_desc.set_alignment(0.0, 0.5)<br>
- self.image_desc.set_size_request(360, -1)<br>
+ self.image_desc.set_size_request(256, -1)<br>
self.image_desc.set_justify(gtk.JUSTIFY_LEFT)<br>
self.image_desc.set_line_wrap(True)<br>
<br>
+ # button to view recipes<br>
+ icon_file = hic.ICON_RCIPE_DISPLAY_FILE<br>
+ hover_file = hic.ICON_RCIPE_HOVER_FILE<br>
+ self.view_adv_configuration_button = HobImageButton("Advanced configuration",<br>
+ "Select image types, package formats, etc",<br>
+ icon_file, hover_file)<br>
+ self.view_adv_configuration_button.connect("clicked", self.view_adv_configuration_button_clicked_cb)<br>
+<br>
self.image_separator = gtk.HSeparator()<br>
<br>
def set_config_baseimg_layout(self):<br>
self.gtable.attach(self.image_title, 0, 40, 15, 17)<br>
self.gtable.attach(self.image_title_desc, 0, 40, 18, 22)<br>
self.gtable.attach(self.image_combo, 0, 12, 23, 26)<br>
- self.gtable.attach(self.image_desc, 13, 38, 23, 28)<br>
+ self.gtable.attach(self.image_desc, 0, 12, 27, 33)<br>
+ self.gtable.attach(self.view_adv_configuration_button, 14, 36, 23, 28)<br>
self.gtable.attach(self.image_separator, 0, 40, 35, 36)<br>
<br>
def create_config_build_button(self):<br>
@@ -413,6 +422,14 @@ class ImageConfigurationPage (HobPage):<br>
def layer_button_clicked_cb(self, button):<br>
# Create a layer selection dialog<br>
self.builder.show_layer_selection_dialog()<br>
+<br>
+ def view_adv_configuration_button_clicked_cb(self, button):<br>
+ # Create an advanced settings dialog<br>
+ response, settings_changed = self.builder.show_adv_settings_dialog()<br>
+ if not response:<br>
+ return<br>
+ if settings_changed:<br>
+ self.builder.reparse_post_adv_settings()<br>
<br>
def just_bake_button_clicked_cb(self, button):<br>
self.builder.just_bake()<br>
@@ -432,7 +449,7 @@ class ImageConfigurationPage (HobPage):<br>
<br>
def settings_button_clicked_cb(self, button):<br>
# Create an advanced settings dialog<br>
- response, settings_changed = self.builder.show_adv_settings_dialog()<br>
+ response, settings_changed = self.builder.show_simple_settings_dialog()<br>
if not response:<br>
return<br>
if settings_changed:<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
<br>
_______________________________________________<br>
bitbake-devel mailing list<br>
<a href="mailto:bitbake-devel@lists.openembedded.org">bitbake-devel@lists.openembedded.org</a><br>
<a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel" target="_blank">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel</a><br>
</font></span></blockquote></div><br></div>