diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobprefs.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobprefs.py | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobprefs.py b/bitbake/lib/bb/ui/crumbs/hobprefs.py index 0f9bda2a4a..be094e7c93 100644 --- a/bitbake/lib/bb/ui/crumbs/hobprefs.py +++ b/bitbake/lib/bb/ui/crumbs/hobprefs.py | |||
@@ -113,12 +113,20 @@ class HobPrefs(gtk.Dialog): | |||
113 | 113 | ||
114 | def include_gplv3_cb(self, toggle): | 114 | def include_gplv3_cb(self, toggle): |
115 | excluded = toggle.get_active() | 115 | excluded = toggle.get_active() |
116 | self.handler.toggle_gplv3(excluded) | 116 | orig_incompatible = self.configurator.getLocalConfVar('INCOMPATIBLE_LICENSE') |
117 | new_incompatible = "" | ||
117 | if excluded: | 118 | if excluded: |
118 | self.configurator.setLocalConfVar('INCOMPATIBLE_LICENSE', 'GPLv3') | 119 | if not orig_incompatible: |
120 | new_incompatible = "GPLv3" | ||
121 | elif not orig_incompatible.find('GPLv3'): | ||
122 | new_incompatible = "%s GPLv3" % orig_incompatible | ||
119 | else: | 123 | else: |
120 | self.configurator.setLocalConfVar('INCOMPATIBLE_LICENSE', '') | 124 | new_incompatible = orig_incompatible.replace('GPLv3', '') |
121 | self.reload_required = True | 125 | |
126 | if new_incompatible != orig_incompatible: | ||
127 | self.handler.set_incompatible_license(new_incompatible) | ||
128 | self.configurator.setLocalConfVar('INCOMPATIBLE_LICENSE', new_incompatible) | ||
129 | self.reload_required = True | ||
122 | 130 | ||
123 | def change_bb_threads_cb(self, spinner): | 131 | def change_bb_threads_cb(self, spinner): |
124 | val = spinner.get_value_as_int() | 132 | val = spinner.get_value_as_int() |
@@ -149,7 +157,8 @@ class HobPrefs(gtk.Dialog): | |||
149 | glib.idle_add(self.handler.reload_data) | 157 | glib.idle_add(self.handler.reload_data) |
150 | 158 | ||
151 | def __init__(self, configurator, handler, curr_sdk_mach, curr_distro, pclass, | 159 | def __init__(self, configurator, handler, curr_sdk_mach, curr_distro, pclass, |
152 | cpu_cnt, pmake, bbthread, selected_image_types, all_image_types): | 160 | cpu_cnt, pmake, bbthread, selected_image_types, all_image_types, |
161 | gplv3disabled): | ||
153 | """ | 162 | """ |
154 | """ | 163 | """ |
155 | gtk.Dialog.__init__(self, "Preferences", None, | 164 | gtk.Dialog.__init__(self, "Preferences", None, |
@@ -170,11 +179,13 @@ class HobPrefs(gtk.Dialog): | |||
170 | self.cpu_cnt = cpu_cnt | 179 | self.cpu_cnt = cpu_cnt |
171 | self.pmake = pmake | 180 | self.pmake = pmake |
172 | self.bbthread = bbthread | 181 | self.bbthread = bbthread |
182 | self.selected_image_types = selected_image_types.split(" ") | ||
183 | self.gplv3disabled = gplv3disabled | ||
184 | |||
173 | self.reload_required = False | 185 | self.reload_required = False |
174 | self.distro_handler_id = None | 186 | self.distro_handler_id = None |
175 | self.sdk_machine_handler_id = None | 187 | self.sdk_machine_handler_id = None |
176 | self.package_handler_id = None | 188 | self.package_handler_id = None |
177 | self.selected_image_types = selected_image_types.split(" ") | ||
178 | 189 | ||
179 | left = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) | 190 | left = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) |
180 | right = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) | 191 | right = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) |
@@ -205,6 +216,7 @@ class HobPrefs(gtk.Dialog): | |||
205 | check = gtk.CheckButton("Exclude GPLv3 packages") | 216 | check = gtk.CheckButton("Exclude GPLv3 packages") |
206 | check.set_tooltip_text("Check this box to prevent GPLv3 packages from being included in your image") | 217 | check.set_tooltip_text("Check this box to prevent GPLv3 packages from being included in your image") |
207 | check.show() | 218 | check.show() |
219 | check.set_active(self.gplv3disabled) | ||
208 | check.connect("toggled", self.include_gplv3_cb) | 220 | check.connect("toggled", self.include_gplv3_cb) |
209 | hbox.pack_start(check, expand=False, fill=False, padding=6) | 221 | hbox.pack_start(check, expand=False, fill=False, padding=6) |
210 | hbox = gtk.HBox(False, 12) | 222 | hbox = gtk.HBox(False, 12) |