|
28 | 28 | import qubesadmin.vm |
29 | 29 | from ..widgets.gtk_widgets import VMListModeler |
30 | 30 | from ..widgets.gtk_utils import show_error |
| 31 | +from ..widgets.utils import get_boolean_feature |
31 | 32 | from .application_selector import ApplicationData |
32 | 33 |
|
33 | 34 | import gi |
@@ -261,28 +262,32 @@ def __init__(self, gtk_builder: Gtk.Builder, qapp: qubesadmin.Qubes): |
261 | 262 | gtk_builder=gtk_builder, |
262 | 263 | qapp=self.qapp, |
263 | 264 | name_suffix="app", |
264 | | - filter_function=lambda x: x.klass == "TemplateVM", |
| 265 | + filter_function=lambda x: x.klass == "TemplateVM" |
| 266 | + and not get_boolean_feature(x, "internal"), |
265 | 267 | default_value=self.qapp.default_template, |
266 | 268 | ), |
267 | 269 | "qube_type_template": TemplateSelectorNoneCombo( |
268 | 270 | gtk_builder=gtk_builder, |
269 | 271 | qapp=self.qapp, |
270 | 272 | name_suffix="template", |
271 | | - filter_function=lambda x: x.klass == "TemplateVM", |
| 273 | + filter_function=lambda x: x.klass == "TemplateVM" |
| 274 | + and not get_boolean_feature(x, "internal"), |
272 | 275 | default_value=None, |
273 | 276 | ), |
274 | 277 | "qube_type_standalone": TemplateSelectorNoneCombo( |
275 | 278 | gtk_builder=gtk_builder, |
276 | 279 | qapp=self.qapp, |
277 | 280 | name_suffix="standalone", |
278 | | - filter_function=lambda x: x.klass in ("TemplateVM", "StandaloneVM"), |
| 281 | + filter_function=lambda x: x.klass in ("TemplateVM", "StandaloneVM") |
| 282 | + and not get_boolean_feature(x, "internal"), |
279 | 283 | default_value=None, |
280 | 284 | ), |
281 | 285 | "qube_type_disposable": TemplateSelectorCombo( |
282 | 286 | gtk_builder=gtk_builder, |
283 | 287 | qapp=self.qapp, |
284 | 288 | name_suffix="dispvm", |
285 | | - filter_function=lambda x: getattr(x, "template_for_dispvms", False), |
| 289 | + filter_function=lambda x: getattr(x, "template_for_dispvms", False) |
| 290 | + and not get_boolean_feature(x, "internal"), |
286 | 291 | default_value=self.qapp.default_dispvm, |
287 | 292 | ), |
288 | 293 | } |
|
0 commit comments