summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorValentin Popa <valentin.popa@intel.com>2012-09-06 10:58:32 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-14 09:50:36 +0100
commitb3ba9eb7e220b395b91db4520f7321f30ea37cec (patch)
treed7f7d7748e41b0e7a10edf58a39542a1bda9fb31 /bitbake
parent149c121209a5469435f7e8ae248f744ece33b88e (diff)
downloadast2050-yocto-poky-b3ba9eb7e220b395b91db4520f7321f30ea37cec.zip
ast2050-yocto-poky-b3ba9eb7e220b395b91db4520f7321f30ea37cec.tar.gz
bitbake: Implement 'settings' dialog as designed
[YOCTO #2162] (Bitbake rev: ac75b06744e73399ca1fbda322ef851ae5754b0a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py32
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig.py376
-rw-r--r--bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py23
3 files changed, 293 insertions, 138 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 4440d29..6df1ca4 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -38,8 +38,8 @@ from bb.ui.crumbs.builddetailspage import BuildDetailsPage
from bb.ui.crumbs.imagedetailspage import ImageDetailsPage
from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton
from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \
- AdvancedSettingDialog, LayerSelectionDialog, \
- DeployImageDialog
+ AdvancedSettingDialog, SimpleSettingsDialog, \
+ LayerSelectionDialog, DeployImageDialog
from bb.ui.crumbs.persistenttooltip import PersistentTooltip
import bb.ui.crumbs.utils
@@ -800,6 +800,7 @@ class Builder(gtk.Window):
self.image_configuration_page.layer_button.set_sensitive(sensitive)
self.image_configuration_page.layer_info_icon.set_sensitive(sensitive)
self.image_configuration_page.toolbar.set_sensitive(sensitive)
+ self.image_configuration_page.view_adv_configuration_button.set_sensitive(sensitive)
self.image_configuration_page.config_build_button.set_sensitive(sensitive)
self.recipe_details_page.set_sensitive(sensitive)
@@ -1164,7 +1165,32 @@ class Builder(gtk.Window):
dialog.destroy()
def show_adv_settings_dialog(self):
- dialog = AdvancedSettingDialog(title = "Settings",
+ dialog = AdvancedSettingDialog(title = "Advanced configuration",
+ configuration = copy.deepcopy(self.configuration),
+ all_image_types = self.parameters.image_types,
+ all_package_formats = self.parameters.all_package_formats,
+ all_distros = self.parameters.all_distros,
+ all_sdk_machines = self.parameters.all_sdk_machines,
+ max_threads = self.parameters.max_threads,
+ parent = self,
+ flags = gtk.DIALOG_MODAL
+ | gtk.DIALOG_DESTROY_WITH_PARENT
+ | gtk.DIALOG_NO_SEPARATOR)
+ button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
+ HobAltButton.style_button(button)
+ button = dialog.add_button("Save", gtk.RESPONSE_YES)
+ HobButton.style_button(button)
+ response = dialog.run()
+ settings_changed = False
+ if response == gtk.RESPONSE_YES:
+ self.configuration = dialog.configuration
+ self.save_defaults() # remember settings
+ settings_changed = dialog.settings_changed
+ dialog.destroy()
+ return response == gtk.RESPONSE_YES, settings_changed
+
+ def show_simple_settings_dialog(self):
+ dialog = SimpleSettingsDialog(title = "Settings",
configuration = copy.deepcopy(self.configuration),
all_image_types = self.parameters.image_types,
all_package_formats = self.parameters.all_package_formats,
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index fb0f05b..ff0ad17 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -41,62 +41,8 @@ BitBake GUI's
In summary: spacing = 12px, border-width = 6px
"""
-#
-# CrumbsDialog
-#
-class CrumbsDialog(gtk.Dialog):
- """
- A GNOME HIG compliant dialog widget.
- Add buttons with gtk.Dialog.add_button or gtk.Dialog.add_buttons
- """
- def __init__(self, title="", parent=None, flags=0, buttons=None):
- super(CrumbsDialog, self).__init__(title, parent, flags, buttons)
-
- self.set_property("has-separator", False) # note: deprecated in 2.22
-
- self.set_border_width(6)
- self.vbox.set_property("spacing", 12)
- self.action_area.set_property("spacing", 12)
- self.action_area.set_property("border-width", 6)
-
-class CrumbsMessageDialog(CrumbsDialog):
- """
- A GNOME HIG compliant dialog widget.
- Add buttons with gtk.Dialog.add_button or gtk.Dialog.add_buttons
- """
- def __init__(self, parent=None, label="", icon=gtk.STOCK_INFO):
- super(CrumbsMessageDialog, self).__init__("", parent, gtk.DIALOG_DESTROY_WITH_PARENT)
-
- self.set_border_width(6)
- self.vbox.set_property("spacing", 12)
- self.action_area.set_property("spacing", 12)
- self.action_area.set_property("border-width", 6)
-
- first_row = gtk.HBox(spacing=12)
- first_row.set_property("border-width", 6)
- first_row.show()
- self.vbox.add(first_row)
- self.icon = gtk.Image()
- # We have our own Info icon which should be used in preference of the stock icon
- self.icon_chk = HobIconChecker()
- self.icon.set_from_stock(self.icon_chk.check_stock_icon(icon), gtk.ICON_SIZE_DIALOG)
- self.icon.set_property("yalign", 0.00)
- self.icon.show()
- first_row.add(self.icon)
-
- self.label = gtk.Label()
- self.label.set_use_markup(True)
- self.label.set_line_wrap(True)
- self.label.set_markup(label)
- self.label.set_property("yalign", 0.00)
- self.label.show()
- first_row.add(self.label)
-
-#
-# AdvancedSettings Dialog
-#
-class AdvancedSettingDialog (CrumbsDialog):
+class SettingsUIHelper():
def gen_label_widget(self, content):
label = gtk.Label()
@@ -177,6 +123,119 @@ class AdvancedSettingDialog (CrumbsDialog):
hbox.show_all()
return hbox, entry
+#
+# CrumbsDialog
+#
+class CrumbsDialog(gtk.Dialog):
+ """
+ A GNOME HIG compliant dialog widget.
+ Add buttons with gtk.Dialog.add_button or gtk.Dialog.add_buttons
+ """
+ def __init__(self, title="", parent=None, flags=0, buttons=None):
+ super(CrumbsDialog, self).__init__(title, parent, flags, buttons)
+
+ self.set_property("has-separator", False) # note: deprecated in 2.22
+
+ self.set_border_width(6)
+ self.vbox.set_property("spacing", 12)
+ self.action_area.set_property("spacing", 12)
+ self.action_area.set_property("border-width", 6)
+
+class CrumbsMessageDialog(CrumbsDialog):
+ """
+ A GNOME HIG compliant dialog widget.
+ Add buttons with gtk.Dialog.add_button or gtk.Dialog.add_buttons
+ """
+ def __init__(self, parent=None, label="", icon=gtk.STOCK_INFO):
+ super(CrumbsMessageDialog, self).__init__("", parent, gtk.DIALOG_DESTROY_WITH_PARENT)
+
+ self.set_border_width(6)
+ self.vbox.set_property("spacing", 12)
+ self.action_area.set_property("spacing", 12)
+ self.action_area.set_property("border-width", 6)
+
+ first_row = gtk.HBox(spacing=12)
+ first_row.set_property("border-width", 6)
+ first_row.show()
+ self.vbox.add(first_row)
+
+ self.icon = gtk.Image()
+ # We have our own Info icon which should be used in preference of the stock icon
+ self.icon_chk = HobIconChecker()
+ self.icon.set_from_stock(self.icon_chk.check_stock_icon(icon), gtk.ICON_SIZE_DIALOG)
+ self.icon.set_property("yalign", 0.00)
+ self.icon.show()
+ first_row.add(self.icon)
+
+ self.label = gtk.Label()
+ self.label.set_use_markup(True)
+ self.label.set_line_wrap(True)
+ self.label.set_markup(label)
+ self.label.set_property("yalign", 0.00)
+ self.label.show()
+ first_row.add(self.label)
+
+#
+# SimpleSettings Dialog
+#
+class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
+
+ def __init__(self, title, configuration, all_image_types,
+ all_package_formats, all_distros, all_sdk_machines,
+ max_threads, parent, flags, buttons=None):
+ super(SimpleSettingsDialog, self).__init__(title, parent, flags, buttons)
+
+ # class members from other objects
+ # bitbake settings from Builder.Configuration
+ self.configuration = configuration
+ self.image_types = all_image_types
+ self.all_package_formats = all_package_formats
+ self.all_distros = all_distros
+ self.all_sdk_machines = all_sdk_machines
+ self.max_threads = max_threads
+
+ # class members for internal use
+ self.distro_combo = None
+ self.dldir_text = None
+ self.sstatedir_text = None
+ self.sstatemirror_text = None
+ self.bb_spinner = None
+ self.pmake_spinner = None
+ self.rootfs_size_spinner = None
+ self.extra_size_spinner = None
+ self.gplv3_checkbox = None
+ self.toolchain_checkbox = None
+ self.setting_store = None
+ self.image_types_checkbuttons = {}
+
+ self.md5 = self.config_md5()
+ self.settings_changed = False
+
+ # create visual elements on the dialog
+ self.create_visual_elements()
+ self.connect("response", self.response_cb)
+
+ def _get_sorted_value(self, var):
+ return " ".join(sorted(str(var).split())) + "\n"
+
+ def config_md5(self):
+ data = ""
+ data += ("PACKAGE_CLASSES: " + self.configuration.curr_package_format + '\n')
+ data += ("DISTRO: " + self._get_sorted_value(self.configuration.curr_distro))
+ data += ("IMAGE_ROOTFS_SIZE: " + self._get_sorted_value(self.configuration.image_rootfs_size))
+ data += ("IMAGE_EXTRA_SIZE: " + self._get_sorted_value(self.configuration.image_extra_size))
+ data += ("INCOMPATIBLE_LICENSE: " + self._get_sorted_value(self.configuration.incompat_license))
+ data += ("SDK_MACHINE: " + self._get_sorted_value(self.configuration.curr_sdk_machine))
+ data += ("TOOLCHAIN_BUILD: " + self._get_sorted_value(self.configuration.toolchain_build))
+ data += ("IMAGE_FSTYPES: " + self._get_sorted_value(self.configuration.image_fstypes))
+ data += ("ENABLE_PROXY: " + self._get_sorted_value(self.configuration.enable_proxy))
+ if self.configuration.enable_proxy:
+ for protocol in self.configuration.proxies.keys():
+ data += (protocol + ": " + self._get_sorted_value(self.configuration.combine_proxy(protocol)))
+ for key in self.configuration.extra_setting.keys():
+ data += (key + ": " + self._get_sorted_value(self.configuration.extra_setting[key]))
+ return hashlib.md5(data).hexdigest()
+
def details_cb(self, button, parent, protocol):
dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",
user = self.configuration.proxies[protocol][1],
@@ -216,6 +275,117 @@ class AdvancedSettingDialog (CrumbsDialog):
hbox.show_all()
return hbox, proxy_entry, port_entry, details_button
+ def refresh_proxy_components(self):
+ self.same_checkbox.set_sensitive(self.configuration.enable_proxy)
+
+ self.http_proxy.set_text(self.configuration.combine_host_only("http"))
+ self.http_proxy.set_editable(self.configuration.enable_proxy)
+ self.http_proxy.set_sensitive(self.configuration.enable_proxy)
+ self.http_proxy_port.set_text(self.configuration.combine_port_only("http"))
+ self.http_proxy_port.set_editable(self.configuration.enable_proxy)
+ self.http_proxy_port.set_sensitive(self.configuration.enable_proxy)
+ self.http_proxy_details.set_sensitive(self.configuration.enable_proxy)
+
+ self.https_proxy.set_text(self.configuration.combine_host_only("https"))
+ self.https_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.https_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.https_proxy_port.set_text(self.configuration.combine_port_only("https"))
+ self.https_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.https_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.https_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+
+ self.ftp_proxy.set_text(self.configuration.combine_host_only("ftp"))
+ self.ftp_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.ftp_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.ftp_proxy_port.set_text(self.configuration.combine_port_only("ftp"))
+ self.ftp_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.ftp_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.ftp_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+
+ self.git_proxy.set_text(self.configuration.combine_host_only("git"))
+ self.git_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.git_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.git_proxy_port.set_text(self.configuration.combine_port_only("git"))
+ self.git_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.git_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.git_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+
+ self.cvs_proxy.set_text(self.configuration.combine_host_only("cvs"))
+ self.cvs_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.cvs_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.cvs_proxy_port.set_text(self.configuration.combine_port_only("cvs"))
+ self.cvs_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.cvs_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+ self.cvs_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
+
+ def proxy_checkbox_toggled_cb(self, button):
+ self.configuration.enable_proxy = self.proxy_checkbox.get_active()
+ if not self.configuration.enable_proxy:
+ self.configuration.same_proxy = False
+ self.same_checkbox.set_active(self.configuration.same_proxy)
+ self.refresh_proxy_components()
+
+ def same_checkbox_toggled_cb(self, button):
+ self.configuration.same_proxy = self.same_checkbox.get_active()
+ self.refresh_proxy_components()
+
+ def response_cb(self, dialog, response_id):
+ #self.configuration.curr_distro = self.distro_combo.get_active_text()
+ self.configuration.dldir = self.dldir_text.get_text()
+ self.configuration.sstatedir = self.sstatedir_text.get_text()
+ self.configuration.sstatemirror = self.sstatemirror_text.get_text()
+ self.configuration.bbthread = self.bb_spinner.get_value_as_int()
+ self.configuration.pmake = self.pmake_spinner.get_value_as_int()
+
+ self.configuration.split_proxy("http", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
+ if self.configuration.same_proxy:
+ self.configuration.split_proxy("https", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
+ self.configuration.split_proxy("ftp", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
+ self.configuration.split_proxy("git", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
+ self.configuration.split_proxy("cvs", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
+ else:
+ self.configuration.split_proxy("https", self.https_proxy.get_text() + ":" + self.https_proxy_port.get_text())
+ self.configuration.split_proxy("ftp", self.ftp_proxy.get_text() + ":" + self.ftp_proxy_port.get_text())
+ self.configuration.split_proxy("git", self.git_proxy.get_text() + ":" + self.git_proxy_port.get_text())
+ self.configuration.split_proxy("cvs", self.cvs_proxy.get_text() + ":" + self.cvs_proxy_port.get_text())
+
+ md5 = self.config_md5()
+ self.settings_changed = (self.md5 != md5)
+
+ def create_visual_elements(self):
+ self.nb = gtk.Notebook()
+ self.nb.set_show_tabs(True)
+ self.nb.append_page(self.create_build_environment_page(), gtk.Label("Build environment"))
+ self.nb.append_page(self.create_proxy_page(), gtk.Label("Proxies"))
+ self.nb.set_current_page(0)
+ self.vbox.pack_start(self.nb, expand=True, fill=True)
+ self.vbox.pack_end(gtk.HSeparator(), expand=True, fill=True)
+
+ self.show_all()
+
+
+
+#
+# AdvancedSettings Dialog
+#
+class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
+
+ def details_cb(self, button, parent, protocol):
+ dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",
+ user = self.configuration.proxies[protocol][1],
+ passwd = self.configuration.proxies[protocol][2],
+ parent = parent,
+ flags = gtk.DIALOG_MODAL
+ | gtk.DIALOG_DESTROY_WITH_PARENT
+ | gtk.DIALOG_NO_SEPARATOR)
+ dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_OK)
+ response = dialog.run()
+ if response == gtk.RESPONSE_OK:
+ self.configuration.proxies[protocol][1] = dialog.user
+ self.configuration.proxies[protocol][2] = dialog.passwd
+ self.refresh_proxy_components()
+ dialog.destroy()
+
def rootfs_combo_changed_cb(self, rootfs_combo, all_package_format, check_hbox):
combo_item = self.rootfs_combo.get_active_text()
for child in check_hbox.get_children():
@@ -412,8 +582,6 @@ class AdvancedSettingDialog (CrumbsDialog):
self.nb.set_show_tabs(True)
self.nb.append_page(self.create_image_types_page(), gtk.Label("Image types"))
self.nb.append_page(self.create_output_page(), gtk.Label("Output"))
- self.nb.append_page(self.create_build_environment_page(), gtk.Label("Build environment"))
- self.nb.append_page(self.create_proxy_page(), gtk.Label("Proxies"))
self.nb.append_page(self.create_others_page(), gtk.Label("Others"))
self.nb.set_current_page(0)
self.vbox.pack_start(self.nb, expand=True, fill=True)
@@ -422,10 +590,22 @@ class AdvancedSettingDialog (CrumbsDialog):
self.show_all()
def create_image_types_page(self):
+ main_vbox = gtk.VBox(False, 16)
+ main_vbox.set_border_width(6)
+
advanced_vbox = gtk.VBox(False, 6)
advanced_vbox.set_border_width(6)
- rows = (len(self.image_types)+1)/2
+ distro_vbox = gtk.VBox(False, 6)
+ label = self.gen_label_widget("<span weight=\"bold\">Distro:</span>")
+ tooltip = "Selects the Yocto Project distribution you want"
+ distro_widget, self.distro_combo = self.gen_combo_widget(self.configuration.curr_distro, self.all_distros, tooltip)
+ distro_vbox.pack_start(label, expand=False, fill=False)
+ distro_vbox.pack_start(distro_widget, expand=False, fill=False)
+ main_vbox.pack_start(distro_vbox, expand=False, fill=False)
+
+
+ rows = (len(self.image_types)+1)/3
table = gtk.Table(rows + 1, 10, True)
advanced_vbox.pack_start(table, expand=False, fill=False)
@@ -451,7 +631,9 @@ class AdvancedSettingDialog (CrumbsDialog):
i = 1
j = j + 4
- return advanced_vbox
+ main_vbox.pack_start(advanced_vbox, expand=False, fill=False)
+
+ return main_vbox
def create_output_page(self):
advanced_vbox = gtk.VBox(False, 6)
@@ -633,60 +815,7 @@ class AdvancedSettingDialog (CrumbsDialog):
return advanced_vbox
- def refresh_proxy_components(self):
- self.same_checkbox.set_sensitive(self.configuration.enable_proxy)
-
- self.http_proxy.set_text(self.configuration.combine_host_only("http"))
- self.http_proxy.set_editable(self.configuration.enable_proxy)
- self.http_proxy.set_sensitive(self.configuration.enable_proxy)
- self.http_proxy_port.set_text(self.configuration.combine_port_only("http"))
- self.http_proxy_port.set_editable(self.configuration.enable_proxy)
- self.http_proxy_port.set_sensitive(self.configuration.enable_proxy)
- self.http_proxy_details.set_sensitive(self.configuration.enable_proxy)
-
- self.https_proxy.set_text(self.configuration.combine_host_only("https"))
- self.https_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.https_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.https_proxy_port.set_text(self.configuration.combine_port_only("https"))
- self.https_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.https_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.https_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-
- self.ftp_proxy.set_text(self.configuration.combine_host_only("ftp"))
- self.ftp_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.ftp_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.ftp_proxy_port.set_text(self.configuration.combine_port_only("ftp"))
- self.ftp_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.ftp_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.ftp_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-
- self.git_proxy.set_text(self.configuration.combine_host_only("git"))
- self.git_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.git_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.git_proxy_port.set_text(self.configuration.combine_port_only("git"))
- self.git_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.git_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.git_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-
- self.cvs_proxy.set_text(self.configuration.combine_host_only("cvs"))
- self.cvs_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.cvs_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.cvs_proxy_port.set_text(self.configuration.combine_port_only("cvs"))
- self.cvs_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.cvs_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
- self.cvs_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-
- def proxy_checkbox_toggled_cb(self, button):
- self.configuration.enable_proxy = self.proxy_checkbox.get_active()
- if not self.configuration.enable_proxy:
- self.configuration.same_proxy = False
- self.same_checkbox.set_active(self.configuration.same_proxy)
- self.refresh_proxy_components()
-
- def same_checkbox_toggled_cb(self, button):
- self.configuration.same_proxy = self.same_checkbox.get_active()
- self.refresh_proxy_components()
-
+
def response_cb(self, dialog, response_id):
package_format = []
package_format.append(self.rootfs_combo.get_active_text())
@@ -695,12 +824,7 @@ class AdvancedSettingDialog (CrumbsDialog):
package_format.append(child.get_label())
self.configuration.curr_package_format = " ".join(package_format)
- self.configuration.curr_distro = self.distro_combo.get_active_text()
- self.configuration.dldir = self.dldir_text.get_text()
- self.configuration.sstatedir = self.sstatedir_text.get_text()
- self.configuration.sstatemirror = self.sstatemirror_text.get_text()
- self.configuration.bbthread = self.bb_spinner.get_value_as_int()
- self.configuration.pmake = self.pmake_spinner.get_value_as_int()
+ self.configuration.curr_distro = self.distro_combo.get_active_text()
self.configuration.image_rootfs_size = self.rootfs_size_spinner.get_value_as_int() * 1024
self.configuration.image_extra_size = self.extra_size_spinner.get_value_as_int() * 1024
@@ -727,19 +851,7 @@ class AdvancedSettingDialog (CrumbsDialog):
key = self.setting_store.get_value(it, 0)
value = self.setting_store.get_value(it, 1)
self.configuration.extra_setting[key] = value
- it = self.setting_store.iter_next(it)
-
- self.configuration.split_proxy("http", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
- if self.configuration.same_proxy:
- self.configuration.split_proxy("https", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
- self.configuration.split_proxy("ftp", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
- self.configuration.split_proxy("git", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
- self.configuration.split_proxy("cvs", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
- else:
- self.configuration.split_proxy("https", self.https_proxy.get_text() + ":" + self.https_proxy_port.get_text())
- self.configuration.split_proxy("ftp", self.ftp_proxy.get_text() + ":" + self.ftp_proxy_port.get_text())
- self.configuration.split_proxy("git", self.git_proxy.get_text() + ":" + self.git_proxy_port.get_text())
- self.configuration.split_proxy("cvs", self.cvs_proxy.get_text() + ":" + self.cvs_proxy_port.get_text())
+ it = self.setting_store.iter_next(it)
self.configuration.curr_sdk_machine = self.sdk_machine_combo.get_active_text()
md5 = self.config_md5()
diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index 0cf9ebe..cf7af2b 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -204,17 +204,26 @@ class ImageConfigurationPage (HobPage):
self.image_desc = gtk.Label()
self.image_desc.set_alignment(0.0, 0.5)
- self.image_desc.set_size_request(360, -1)
+ self.image_desc.set_size_request(256, -1)
self.image_desc.set_justify(gtk.JUSTIFY_LEFT)
self.image_desc.set_line_wrap(True)
+ # button to view recipes
+ icon_file = hic.ICON_RCIPE_DISPLAY_FILE
+ hover_file = hic.ICON_RCIPE_HOVER_FILE
+ self.view_adv_configuration_button = HobImageButton("Advanced configuration",
+ "Select image types, package formats, etc",
+ icon_file, hover_file)
+ self.view_adv_configuration_button.connect("clicked", self.view_adv_configuration_button_clicked_cb)
+
self.image_separator = gtk.HSeparator()
def set_config_baseimg_layout(self):
self.gtable.attach(self.image_title, 0, 40, 15, 17)
self.gtable.attach(self.image_title_desc, 0, 40, 18, 22)
self.gtable.attach(self.image_combo, 0, 12, 23, 26)
- self.gtable.attach(self.image_desc, 13, 38, 23, 28)
+ self.gtable.attach(self.image_desc, 0, 12, 27, 33)
+ self.gtable.attach(self.view_adv_configuration_button, 14, 36, 23, 28)
self.gtable.attach(self.image_separator, 0, 40, 35, 36)
def create_config_build_button(self):
@@ -408,6 +417,14 @@ class ImageConfigurationPage (HobPage):
def layer_button_clicked_cb(self, button):
# Create a layer selection dialog
self.builder.show_layer_selection_dialog()
+
+ def view_adv_configuration_button_clicked_cb(self, button):
+ # Create an advanced settings dialog
+ response, settings_changed = self.builder.show_adv_settings_dialog()
+ if not response:
+ return
+ if settings_changed:
+ self.builder.reparse_post_adv_settings()
def just_bake_button_clicked_cb(self, button):
self.builder.just_bake()
@@ -427,7 +444,7 @@ class ImageConfigurationPage (HobPage):
def settings_button_clicked_cb(self, button):
# Create an advanced settings dialog
- response, settings_changed = self.builder.show_adv_settings_dialog()
+ response, settings_changed = self.builder.show_simple_settings_dialog()
if not response:
return
if settings_changed:
OpenPOWER on IntegriCloud