summaryrefslogtreecommitdiffstats
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
parent149c121209a5469435f7e8ae248f744ece33b88e (diff)
downloadpoky-b3ba9eb7e220b395b91db4520f7321f30ea37cec.tar.gz
bitbake: Implement 'settings' dialog as designed
[YOCTO #2162] (Bitbake rev: ac75b06744e73399ca1fbda322ef851ae5754b0a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 4440d295a3..6df1ca41bd 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
38from bb.ui.crumbs.imagedetailspage import ImageDetailsPage 38from bb.ui.crumbs.imagedetailspage import ImageDetailsPage
39from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton 39from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton
40from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ 40from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \
41 AdvancedSettingDialog, LayerSelectionDialog, \ 41 AdvancedSettingDialog, SimpleSettingsDialog, \
42 DeployImageDialog 42 LayerSelectionDialog, DeployImageDialog
43from bb.ui.crumbs.persistenttooltip import PersistentTooltip 43from bb.ui.crumbs.persistenttooltip import PersistentTooltip
44import bb.ui.crumbs.utils 44import bb.ui.crumbs.utils
45 45
@@ -800,6 +800,7 @@ class Builder(gtk.Window):
800 self.image_configuration_page.layer_button.set_sensitive(sensitive) 800 self.image_configuration_page.layer_button.set_sensitive(sensitive)
801 self.image_configuration_page.layer_info_icon.set_sensitive(sensitive) 801 self.image_configuration_page.layer_info_icon.set_sensitive(sensitive)
802 self.image_configuration_page.toolbar.set_sensitive(sensitive) 802 self.image_configuration_page.toolbar.set_sensitive(sensitive)
803 self.image_configuration_page.view_adv_configuration_button.set_sensitive(sensitive)
803 self.image_configuration_page.config_build_button.set_sensitive(sensitive) 804 self.image_configuration_page.config_build_button.set_sensitive(sensitive)
804 805
805 self.recipe_details_page.set_sensitive(sensitive) 806 self.recipe_details_page.set_sensitive(sensitive)
@@ -1164,7 +1165,32 @@ class Builder(gtk.Window):
1164 dialog.destroy() 1165 dialog.destroy()
1165 1166
1166 def show_adv_settings_dialog(self): 1167 def show_adv_settings_dialog(self):
1167 dialog = AdvancedSettingDialog(title = "Settings", 1168 dialog = AdvancedSettingDialog(title = "Advanced configuration",
1169 configuration = copy.deepcopy(self.configuration),
1170 all_image_types = self.parameters.image_types,
1171 all_package_formats = self.parameters.all_package_formats,
1172 all_distros = self.parameters.all_distros,
1173 all_sdk_machines = self.parameters.all_sdk_machines,
1174 max_threads = self.parameters.max_threads,
1175 parent = self,
1176 flags = gtk.DIALOG_MODAL
1177 | gtk.DIALOG_DESTROY_WITH_PARENT
1178 | gtk.DIALOG_NO_SEPARATOR)
1179 button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
1180 HobAltButton.style_button(button)
1181 button = dialog.add_button("Save", gtk.RESPONSE_YES)
1182 HobButton.style_button(button)
1183 response = dialog.run()
1184 settings_changed = False
1185 if response == gtk.RESPONSE_YES:
1186 self.configuration = dialog.configuration
1187 self.save_defaults() # remember settings
1188 settings_changed = dialog.settings_changed
1189 dialog.destroy()
1190 return response == gtk.RESPONSE_YES, settings_changed
1191
1192 def show_simple_settings_dialog(self):
1193 dialog = SimpleSettingsDialog(title = "Settings",
1168 configuration = copy.deepcopy(self.configuration), 1194 configuration = copy.deepcopy(self.configuration),
1169 all_image_types = self.parameters.image_types, 1195 all_image_types = self.parameters.image_types,
1170 all_package_formats = self.parameters.all_package_formats, 1196 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 fb0f05b91b..ff0ad17664 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -41,62 +41,8 @@ BitBake GUI's
41In summary: spacing = 12px, border-width = 6px 41In summary: spacing = 12px, border-width = 6px
42""" 42"""
43 43
44#
45# CrumbsDialog
46#
47class CrumbsDialog(gtk.Dialog):
48 """
49 A GNOME HIG compliant dialog widget.
50 Add buttons with gtk.Dialog.add_button or gtk.Dialog.add_buttons
51 """
52 def __init__(self, title="", parent=None, flags=0, buttons=None):
53 super(CrumbsDialog, self).__init__(title, parent, flags, buttons)
54
55 self.set_property("has-separator", False) # note: deprecated in 2.22
56
57 self.set_border_width(6)
58 self.vbox.set_property("spacing", 12)
59 self.action_area.set_property("spacing", 12)
60 self.action_area.set_property("border-width", 6)
61
62class CrumbsMessageDialog(CrumbsDialog):
63 """
64 A GNOME HIG compliant dialog widget.
65 Add buttons with gtk.Dialog.add_button or gtk.Dialog.add_buttons
66 """
67 def __init__(self, parent=None, label="", icon=gtk.STOCK_INFO):
68 super(CrumbsMessageDialog, self).__init__("", parent, gtk.DIALOG_DESTROY_WITH_PARENT)
69
70 self.set_border_width(6)
71 self.vbox.set_property("spacing", 12)
72 self.action_area.set_property("spacing", 12)
73 self.action_area.set_property("border-width", 6)
74
75 first_row = gtk.HBox(spacing=12)
76 first_row.set_property("border-width", 6)
77 first_row.show()
78 self.vbox.add(first_row)
79 44
80 self.icon = gtk.Image() 45class SettingsUIHelper():
81 # We have our own Info icon which should be used in preference of the stock icon
82 self.icon_chk = HobIconChecker()
83 self.icon.set_from_stock(self.icon_chk.check_stock_icon(icon), gtk.ICON_SIZE_DIALOG)
84 self.icon.set_property("yalign", 0.00)
85 self.icon.show()
86 first_row.add(self.icon)
87
88 self.label = gtk.Label()
89 self.label.set_use_markup(True)
90 self.label.set_line_wrap(True)
91 self.label.set_markup(label)
92 self.label.set_property("yalign", 0.00)
93 self.label.show()
94 first_row.add(self.label)
95
96#
97# AdvancedSettings Dialog
98#
99class AdvancedSettingDialog (CrumbsDialog):
100 46
101 def gen_label_widget(self, content): 47 def gen_label_widget(self, content):
102 label = gtk.Label() 48 label = gtk.Label()
@@ -177,6 +123,119 @@ class AdvancedSettingDialog (CrumbsDialog):
177 hbox.show_all() 123 hbox.show_all()
178 return hbox, entry 124 return hbox, entry
179 125
126#
127# CrumbsDialog
128#
129class CrumbsDialog(gtk.Dialog):
130 """
131 A GNOME HIG compliant dialog widget.
132 Add buttons with gtk.Dialog.add_button or gtk.Dialog.add_buttons
133 """
134 def __init__(self, title="", parent=None, flags=0, buttons=None):
135 super(CrumbsDialog, self).__init__(title, parent, flags, buttons)
136
137 self.set_property("has-separator", False) # note: deprecated in 2.22
138
139 self.set_border_width(6)
140 self.vbox.set_property("spacing", 12)
141 self.action_area.set_property("spacing", 12)
142 self.action_area.set_property("border-width", 6)
143
144class CrumbsMessageDialog(CrumbsDialog):
145 """
146 A GNOME HIG compliant dialog widget.
147 Add buttons with gtk.Dialog.add_button or gtk.Dialog.add_buttons
148 """
149 def __init__(self, parent=None, label="", icon=gtk.STOCK_INFO):
150 super(CrumbsMessageDialog, self).__init__("", parent, gtk.DIALOG_DESTROY_WITH_PARENT)
151
152 self.set_border_width(6)
153 self.vbox.set_property("spacing", 12)
154 self.action_area.set_property("spacing", 12)
155 self.action_area.set_property("border-width", 6)
156
157 first_row = gtk.HBox(spacing=12)
158 first_row.set_property("border-width", 6)
159 first_row.show()
160 self.vbox.add(first_row)
161
162 self.icon = gtk.Image()
163 # We have our own Info icon which should be used in preference of the stock icon
164 self.icon_chk = HobIconChecker()
165 self.icon.set_from_stock(self.icon_chk.check_stock_icon(icon), gtk.ICON_SIZE_DIALOG)
166 self.icon.set_property("yalign", 0.00)
167 self.icon.show()
168 first_row.add(self.icon)
169
170 self.label = gtk.Label()
171 self.label.set_use_markup(True)
172 self.label.set_line_wrap(True)
173 self.label.set_markup(label)
174 self.label.set_property("yalign", 0.00)
175 self.label.show()
176 first_row.add(self.label)
177
178#
179# SimpleSettings Dialog
180#
181class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
182
183 def __init__(self, title, configuration, all_image_types,
184 all_package_formats, all_distros, all_sdk_machines,
185 max_threads, parent, flags, buttons=None):
186 super(SimpleSettingsDialog, self).__init__(title, parent, flags, buttons)
187
188 # class members from other objects
189 # bitbake settings from Builder.Configuration
190 self.configuration = configuration
191 self.image_types = all_image_types
192 self.all_package_formats = all_package_formats
193 self.all_distros = all_distros
194 self.all_sdk_machines = all_sdk_machines
195 self.max_threads = max_threads
196
197 # class members for internal use
198 self.distro_combo = None
199 self.dldir_text = None
200 self.sstatedir_text = None
201 self.sstatemirror_text = None
202 self.bb_spinner = None
203 self.pmake_spinner = None
204 self.rootfs_size_spinner = None
205 self.extra_size_spinner = None
206 self.gplv3_checkbox = None
207 self.toolchain_checkbox = None
208 self.setting_store = None
209 self.image_types_checkbuttons = {}
210
211 self.md5 = self.config_md5()
212 self.settings_changed = False
213
214 # create visual elements on the dialog
215 self.create_visual_elements()
216 self.connect("response", self.response_cb)
217
218 def _get_sorted_value(self, var):
219 return " ".join(sorted(str(var).split())) + "\n"
220
221 def config_md5(self):
222 data = ""
223 data += ("PACKAGE_CLASSES: " + self.configuration.curr_package_format + '\n')
224 data += ("DISTRO: " + self._get_sorted_value(self.configuration.curr_distro))
225 data += ("IMAGE_ROOTFS_SIZE: " + self._get_sorted_value(self.configuration.image_rootfs_size))
226 data += ("IMAGE_EXTRA_SIZE: " + self._get_sorted_value(self.configuration.image_extra_size))
227 data += ("INCOMPATIBLE_LICENSE: " + self._get_sorted_value(self.configuration.incompat_license))
228 data += ("SDK_MACHINE: " + self._get_sorted_value(self.configuration.curr_sdk_machine))
229 data += ("TOOLCHAIN_BUILD: " + self._get_sorted_value(self.configuration.toolchain_build))
230 data += ("IMAGE_FSTYPES: " + self._get_sorted_value(self.configuration.image_fstypes))
231 data += ("ENABLE_PROXY: " + self._get_sorted_value(self.configuration.enable_proxy))
232 if self.configuration.enable_proxy:
233 for protocol in self.configuration.proxies.keys():
234 data += (protocol + ": " + self._get_sorted_value(self.configuration.combine_proxy(protocol)))
235 for key in self.configuration.extra_setting.keys():
236 data += (key + ": " + self._get_sorted_value(self.configuration.extra_setting[key]))
237 return hashlib.md5(data).hexdigest()
238
180 def details_cb(self, button, parent, protocol): 239 def details_cb(self, button, parent, protocol):
181 dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details", 240 dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",
182 user = self.configuration.proxies[protocol][1], 241 user = self.configuration.proxies[protocol][1],
@@ -216,6 +275,117 @@ class AdvancedSettingDialog (CrumbsDialog):
216 hbox.show_all() 275 hbox.show_all()
217 return hbox, proxy_entry, port_entry, details_button 276 return hbox, proxy_entry, port_entry, details_button
218 277
278 def refresh_proxy_components(self):
279 self.same_checkbox.set_sensitive(self.configuration.enable_proxy)
280
281 self.http_proxy.set_text(self.configuration.combine_host_only("http"))
282 self.http_proxy.set_editable(self.configuration.enable_proxy)
283 self.http_proxy.set_sensitive(self.configuration.enable_proxy)
284 self.http_proxy_port.set_text(self.configuration.combine_port_only("http"))
285 self.http_proxy_port.set_editable(self.configuration.enable_proxy)
286 self.http_proxy_port.set_sensitive(self.configuration.enable_proxy)
287 self.http_proxy_details.set_sensitive(self.configuration.enable_proxy)
288
289 self.https_proxy.set_text(self.configuration.combine_host_only("https"))
290 self.https_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
291 self.https_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
292 self.https_proxy_port.set_text(self.configuration.combine_port_only("https"))
293 self.https_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
294 self.https_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
295 self.https_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
296
297 self.ftp_proxy.set_text(self.configuration.combine_host_only("ftp"))
298 self.ftp_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
299 self.ftp_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
300 self.ftp_proxy_port.set_text(self.configuration.combine_port_only("ftp"))
301 self.ftp_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
302 self.ftp_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
303 self.ftp_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
304
305 self.git_proxy.set_text(self.configuration.combine_host_only("git"))
306 self.git_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
307 self.git_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
308 self.git_proxy_port.set_text(self.configuration.combine_port_only("git"))
309 self.git_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
310 self.git_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
311 self.git_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
312
313 self.cvs_proxy.set_text(self.configuration.combine_host_only("cvs"))
314 self.cvs_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
315 self.cvs_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
316 self.cvs_proxy_port.set_text(self.configuration.combine_port_only("cvs"))
317 self.cvs_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
318 self.cvs_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
319 self.cvs_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
320
321 def proxy_checkbox_toggled_cb(self, button):
322 self.configuration.enable_proxy = self.proxy_checkbox.get_active()
323 if not self.configuration.enable_proxy:
324 self.configuration.same_proxy = False
325 self.same_checkbox.set_active(self.configuration.same_proxy)
326 self.refresh_proxy_components()
327
328 def same_checkbox_toggled_cb(self, button):
329 self.configuration.same_proxy = self.same_checkbox.get_active()
330 self.refresh_proxy_components()
331
332 def response_cb(self, dialog, response_id):
333 #self.configuration.curr_distro = self.distro_combo.get_active_text()
334 self.configuration.dldir = self.dldir_text.get_text()
335 self.configuration.sstatedir = self.sstatedir_text.get_text()
336 self.configuration.sstatemirror = self.sstatemirror_text.get_text()
337 self.configuration.bbthread = self.bb_spinner.get_value_as_int()
338 self.configuration.pmake = self.pmake_spinner.get_value_as_int()
339
340 self.configuration.split_proxy("http", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
341 if self.configuration.same_proxy:
342 self.configuration.split_proxy("https", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
343 self.configuration.split_proxy("ftp", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
344 self.configuration.split_proxy("git", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
345 self.configuration.split_proxy("cvs", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
346 else:
347 self.configuration.split_proxy("https", self.https_proxy.get_text() + ":" + self.https_proxy_port.get_text())
348 self.configuration.split_proxy("ftp", self.ftp_proxy.get_text() + ":" + self.ftp_proxy_port.get_text())
349 self.configuration.split_proxy("git", self.git_proxy.get_text() + ":" + self.git_proxy_port.get_text())
350 self.configuration.split_proxy("cvs", self.cvs_proxy.get_text() + ":" + self.cvs_proxy_port.get_text())
351
352 md5 = self.config_md5()
353 self.settings_changed = (self.md5 != md5)
354
355 def create_visual_elements(self):
356 self.nb = gtk.Notebook()
357 self.nb.set_show_tabs(True)
358 self.nb.append_page(self.create_build_environment_page(), gtk.Label("Build environment"))
359 self.nb.append_page(self.create_proxy_page(), gtk.Label("Proxies"))
360 self.nb.set_current_page(0)
361 self.vbox.pack_start(self.nb, expand=True, fill=True)
362 self.vbox.pack_end(gtk.HSeparator(), expand=True, fill=True)
363
364 self.show_all()
365
366
367
368#
369# AdvancedSettings Dialog
370#
371class AdvancedSettingDialog (CrumbsDialog, SettingsUIHelper):
372
373 def details_cb(self, button, parent, protocol):
374 dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",
375 user = self.configuration.proxies[protocol][1],
376 passwd = self.configuration.proxies[protocol][2],
377 parent = parent,
378 flags = gtk.DIALOG_MODAL
379 | gtk.DIALOG_DESTROY_WITH_PARENT
380 | gtk.DIALOG_NO_SEPARATOR)
381 dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_OK)
382 response = dialog.run()
383 if response == gtk.RESPONSE_OK:
384 self.configuration.proxies[protocol][1] = dialog.user
385 self.configuration.proxies[protocol][2] = dialog.passwd
386 self.refresh_proxy_components()
387 dialog.destroy()
388
219 def rootfs_combo_changed_cb(self, rootfs_combo, all_package_format, check_hbox): 389 def rootfs_combo_changed_cb(self, rootfs_combo, all_package_format, check_hbox):
220 combo_item = self.rootfs_combo.get_active_text() 390 combo_item = self.rootfs_combo.get_active_text()
221 for child in check_hbox.get_children(): 391 for child in check_hbox.get_children():
@@ -412,8 +582,6 @@ class AdvancedSettingDialog (CrumbsDialog):
412 self.nb.set_show_tabs(True) 582 self.nb.set_show_tabs(True)
413 self.nb.append_page(self.create_image_types_page(), gtk.Label("Image types")) 583 self.nb.append_page(self.create_image_types_page(), gtk.Label("Image types"))
414 self.nb.append_page(self.create_output_page(), gtk.Label("Output")) 584 self.nb.append_page(self.create_output_page(), gtk.Label("Output"))
415 self.nb.append_page(self.create_build_environment_page(), gtk.Label("Build environment"))
416 self.nb.append_page(self.create_proxy_page(), gtk.Label("Proxies"))
417 self.nb.append_page(self.create_others_page(), gtk.Label("Others")) 585 self.nb.append_page(self.create_others_page(), gtk.Label("Others"))
418 self.nb.set_current_page(0) 586 self.nb.set_current_page(0)
419 self.vbox.pack_start(self.nb, expand=True, fill=True) 587 self.vbox.pack_start(self.nb, expand=True, fill=True)
@@ -422,10 +590,22 @@ class AdvancedSettingDialog (CrumbsDialog):
422 self.show_all() 590 self.show_all()
423 591
424 def create_image_types_page(self): 592 def create_image_types_page(self):
593 main_vbox = gtk.VBox(False, 16)
594 main_vbox.set_border_width(6)
595
425 advanced_vbox = gtk.VBox(False, 6) 596 advanced_vbox = gtk.VBox(False, 6)
426 advanced_vbox.set_border_width(6) 597 advanced_vbox.set_border_width(6)
427 598
428 rows = (len(self.image_types)+1)/2 599 distro_vbox = gtk.VBox(False, 6)
600 label = self.gen_label_widget("<span weight=\"bold\">Distro:</span>")
601 tooltip = "Selects the Yocto Project distribution you want"
602 distro_widget, self.distro_combo = self.gen_combo_widget(self.configuration.curr_distro, self.all_distros, tooltip)
603 distro_vbox.pack_start(label, expand=False, fill=False)
604 distro_vbox.pack_start(distro_widget, expand=False, fill=False)
605 main_vbox.pack_start(distro_vbox, expand=False, fill=False)
606
607
608 rows = (len(self.image_types)+1)/3
429 table = gtk.Table(rows + 1, 10, True) 609 table = gtk.Table(rows + 1, 10, True)
430 advanced_vbox.pack_start(table, expand=False, fill=False) 610 advanced_vbox.pack_start(table, expand=False, fill=False)
431 611
@@ -451,7 +631,9 @@ class AdvancedSettingDialog (CrumbsDialog):
451 i = 1 631 i = 1
452 j = j + 4 632 j = j + 4
453 633
454 return advanced_vbox 634 main_vbox.pack_start(advanced_vbox, expand=False, fill=False)
635
636 return main_vbox
455 637
456 def create_output_page(self): 638 def create_output_page(self):
457 advanced_vbox = gtk.VBox(False, 6) 639 advanced_vbox = gtk.VBox(False, 6)
@@ -633,60 +815,7 @@ class AdvancedSettingDialog (CrumbsDialog):
633 815
634 return advanced_vbox 816 return advanced_vbox
635 817
636 def refresh_proxy_components(self): 818
637 self.same_checkbox.set_sensitive(self.configuration.enable_proxy)
638
639 self.http_proxy.set_text(self.configuration.combine_host_only("http"))
640 self.http_proxy.set_editable(self.configuration.enable_proxy)
641 self.http_proxy.set_sensitive(self.configuration.enable_proxy)
642 self.http_proxy_port.set_text(self.configuration.combine_port_only("http"))
643 self.http_proxy_port.set_editable(self.configuration.enable_proxy)
644 self.http_proxy_port.set_sensitive(self.configuration.enable_proxy)
645 self.http_proxy_details.set_sensitive(self.configuration.enable_proxy)
646
647 self.https_proxy.set_text(self.configuration.combine_host_only("https"))
648 self.https_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
649 self.https_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
650 self.https_proxy_port.set_text(self.configuration.combine_port_only("https"))
651 self.https_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
652 self.https_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
653 self.https_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
654
655 self.ftp_proxy.set_text(self.configuration.combine_host_only("ftp"))
656 self.ftp_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
657 self.ftp_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
658 self.ftp_proxy_port.set_text(self.configuration.combine_port_only("ftp"))
659 self.ftp_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
660 self.ftp_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
661 self.ftp_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
662
663 self.git_proxy.set_text(self.configuration.combine_host_only("git"))
664 self.git_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
665 self.git_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
666 self.git_proxy_port.set_text(self.configuration.combine_port_only("git"))
667 self.git_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
668 self.git_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
669 self.git_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
670
671 self.cvs_proxy.set_text(self.configuration.combine_host_only("cvs"))
672 self.cvs_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
673 self.cvs_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
674 self.cvs_proxy_port.set_text(self.configuration.combine_port_only("cvs"))
675 self.cvs_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
676 self.cvs_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
677 self.cvs_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
678
679 def proxy_checkbox_toggled_cb(self, button):
680 self.configuration.enable_proxy = self.proxy_checkbox.get_active()
681 if not self.configuration.enable_proxy:
682 self.configuration.same_proxy = False
683 self.same_checkbox.set_active(self.configuration.same_proxy)
684 self.refresh_proxy_components()
685
686 def same_checkbox_toggled_cb(self, button):
687 self.configuration.same_proxy = self.same_checkbox.get_active()
688 self.refresh_proxy_components()
689
690 def response_cb(self, dialog, response_id): 819 def response_cb(self, dialog, response_id):
691 package_format = [] 820 package_format = []
692 package_format.append(self.rootfs_combo.get_active_text()) 821 package_format.append(self.rootfs_combo.get_active_text())
@@ -695,12 +824,7 @@ class AdvancedSettingDialog (CrumbsDialog):
695 package_format.append(child.get_label()) 824 package_format.append(child.get_label())
696 self.configuration.curr_package_format = " ".join(package_format) 825 self.configuration.curr_package_format = " ".join(package_format)
697 826
698 self.configuration.curr_distro = self.distro_combo.get_active_text() 827 self.configuration.curr_distro = self.distro_combo.get_active_text()
699 self.configuration.dldir = self.dldir_text.get_text()
700 self.configuration.sstatedir = self.sstatedir_text.get_text()
701 self.configuration.sstatemirror = self.sstatemirror_text.get_text()
702 self.configuration.bbthread = self.bb_spinner.get_value_as_int()
703 self.configuration.pmake = self.pmake_spinner.get_value_as_int()
704 self.configuration.image_rootfs_size = self.rootfs_size_spinner.get_value_as_int() * 1024 828 self.configuration.image_rootfs_size = self.rootfs_size_spinner.get_value_as_int() * 1024
705 self.configuration.image_extra_size = self.extra_size_spinner.get_value_as_int() * 1024 829 self.configuration.image_extra_size = self.extra_size_spinner.get_value_as_int() * 1024
706 830
@@ -727,19 +851,7 @@ class AdvancedSettingDialog (CrumbsDialog):
727 key = self.setting_store.get_value(it, 0) 851 key = self.setting_store.get_value(it, 0)
728 value = self.setting_store.get_value(it, 1) 852 value = self.setting_store.get_value(it, 1)
729 self.configuration.extra_setting[key] = value 853 self.configuration.extra_setting[key] = value
730 it = self.setting_store.iter_next(it) 854 it = self.setting_store.iter_next(it)
731
732 self.configuration.split_proxy("http", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
733 if self.configuration.same_proxy:
734 self.configuration.split_proxy("https", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
735 self.configuration.split_proxy("ftp", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
736 self.configuration.split_proxy("git", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
737 self.configuration.split_proxy("cvs", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
738 else:
739 self.configuration.split_proxy("https", self.https_proxy.get_text() + ":" + self.https_proxy_port.get_text())
740 self.configuration.split_proxy("ftp", self.ftp_proxy.get_text() + ":" + self.ftp_proxy_port.get_text())
741 self.configuration.split_proxy("git", self.git_proxy.get_text() + ":" + self.git_proxy_port.get_text())
742 self.configuration.split_proxy("cvs", self.cvs_proxy.get_text() + ":" + self.cvs_proxy_port.get_text())
743 855
744 self.configuration.curr_sdk_machine = self.sdk_machine_combo.get_active_text() 856 self.configuration.curr_sdk_machine = self.sdk_machine_combo.get_active_text()
745 md5 = self.config_md5() 857 md5 = self.config_md5()
diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index 0cf9ebedc7..cf7af2b741 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -204,17 +204,26 @@ class ImageConfigurationPage (HobPage):
204 204
205 self.image_desc = gtk.Label() 205 self.image_desc = gtk.Label()
206 self.image_desc.set_alignment(0.0, 0.5) 206 self.image_desc.set_alignment(0.0, 0.5)
207 self.image_desc.set_size_request(360, -1) 207 self.image_desc.set_size_request(256, -1)
208 self.image_desc.set_justify(gtk.JUSTIFY_LEFT) 208 self.image_desc.set_justify(gtk.JUSTIFY_LEFT)
209 self.image_desc.set_line_wrap(True) 209 self.image_desc.set_line_wrap(True)
210 210
211 # button to view recipes
212 icon_file = hic.ICON_RCIPE_DISPLAY_FILE
213 hover_file = hic.ICON_RCIPE_HOVER_FILE
214 self.view_adv_configuration_button = HobImageButton("Advanced configuration",
215 "Select image types, package formats, etc",
216 icon_file, hover_file)
217 self.view_adv_configuration_button.connect("clicked", self.view_adv_configuration_button_clicked_cb)
218
211 self.image_separator = gtk.HSeparator() 219 self.image_separator = gtk.HSeparator()
212 220
213 def set_config_baseimg_layout(self): 221 def set_config_baseimg_layout(self):
214 self.gtable.attach(self.image_title, 0, 40, 15, 17) 222 self.gtable.attach(self.image_title, 0, 40, 15, 17)
215 self.gtable.attach(self.image_title_desc, 0, 40, 18, 22) 223 self.gtable.attach(self.image_title_desc, 0, 40, 18, 22)
216 self.gtable.attach(self.image_combo, 0, 12, 23, 26) 224 self.gtable.attach(self.image_combo, 0, 12, 23, 26)
217 self.gtable.attach(self.image_desc, 13, 38, 23, 28) 225 self.gtable.attach(self.image_desc, 0, 12, 27, 33)
226 self.gtable.attach(self.view_adv_configuration_button, 14, 36, 23, 28)
218 self.gtable.attach(self.image_separator, 0, 40, 35, 36) 227 self.gtable.attach(self.image_separator, 0, 40, 35, 36)
219 228
220 def create_config_build_button(self): 229 def create_config_build_button(self):
@@ -408,6 +417,14 @@ class ImageConfigurationPage (HobPage):
408 def layer_button_clicked_cb(self, button): 417 def layer_button_clicked_cb(self, button):
409 # Create a layer selection dialog 418 # Create a layer selection dialog
410 self.builder.show_layer_selection_dialog() 419 self.builder.show_layer_selection_dialog()
420
421 def view_adv_configuration_button_clicked_cb(self, button):
422 # Create an advanced settings dialog
423 response, settings_changed = self.builder.show_adv_settings_dialog()
424 if not response:
425 return
426 if settings_changed:
427 self.builder.reparse_post_adv_settings()
411 428
412 def just_bake_button_clicked_cb(self, button): 429 def just_bake_button_clicked_cb(self, button):
413 self.builder.just_bake() 430 self.builder.just_bake()
@@ -427,7 +444,7 @@ class ImageConfigurationPage (HobPage):
427 444
428 def settings_button_clicked_cb(self, button): 445 def settings_button_clicked_cb(self, button):
429 # Create an advanced settings dialog 446 # Create an advanced settings dialog
430 response, settings_changed = self.builder.show_adv_settings_dialog() 447 response, settings_changed = self.builder.show_simple_settings_dialog()
431 if not response: 448 if not response:
432 return 449 return
433 if settings_changed: 450 if settings_changed: