Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qubes_config/global_config/basics_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def __init__(self, gtk_builder: Gtk.Builder, qapp: qubesadmin.Qubes):

@staticmethod
def _clock_vm_filter(vm) -> bool:
return vm.klass != "TemplateVM"
return vm.klass not in ["TemplateVM", "RemoteVM"]

@staticmethod
def _default_template_filter(vm) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion qubes_config/global_config/device_attachments.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __init__(
self.qapp,
"edit_device",
[],
filter_function=lambda vm: vm.klass != "AdminVM",
filter_function=lambda vm: vm.klass not in ["AdminVM", "RemoteVM"],
)

self.backend_vm: Optional[qubesadmin.vm.QubesVM] = None
Expand Down
1 change: 0 additions & 1 deletion qubes_config/global_config/disposables.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,5 @@ def reset(self):
def save(self):
"""Save current rules, whatever they are - custom or default.
Return True if successful, False otherwise"""

for handler in self.handlers:
handler.save()
2 changes: 1 addition & 1 deletion qubes_config/global_config/global_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def perform_setup(self):
)

self.progress_bar_dialog.update_progress(page_progress)
self.handlers["disposable"] = DisposablesHandler(
self.handlers["disposables"] = DisposablesHandler(
qapp=self.qapp, policy_manager=self.policy_manager, gtk_builder=self.builder
)
self.progress_bar_dialog.update_progress(page_progress)
Expand Down
3 changes: 1 addition & 2 deletions qubes_config/global_config/updates_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,7 @@ def __init__(
combobox=self.dom0_updatevm_combo,
qapp=self.qapp,
filter_function=(
lambda vm: vm.klass != "TemplateVM"
and vm.klass != "AdminVM"
lambda vm: vm.klass not in ["TemplateVM", "AdminVM", "RemoteVM"]
and vm.is_networked()
),
current_value=self.qapp.updatevm,
Expand Down
4 changes: 3 additions & 1 deletion qui/devices/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def is_attachable(self) -> bool:
Should this VM be listed as possible attachment target in the GUI?
"""
try:
return self.vm_class != "AdminVM" and self._vm.is_running()
return (
self.vm_class not in ["AdminVM", "RemoteVM"] and self._vm.is_running()
)
except qubesadmin.exc.QubesException:
return False

Expand Down
4 changes: 2 additions & 2 deletions qui/devices/device_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def initialize_vm_data(self):
for vm in self.qapp.domains:
wrapped_vm = backend.VM(vm)
try:
if not vm.features.get("internal"):
if not vm.features.get("internal", False):
if wrapped_vm.is_attachable:
self.vms.add(wrapped_vm)
if wrapped_vm.is_dispvm_template:
Expand Down Expand Up @@ -632,7 +632,7 @@ def device_detached(self, vm, _event, port, **_kwargs):
def vm_start(self, vm, _event, **_kwargs):
wrapped_vm = backend.VM(vm)
try:
internal = vm.features.get("internal")
internal = vm.features.get("internal", False)
attachable = wrapped_vm.is_attachable
except qubesadmin.exc.QubesException:
internal, attachable = False, False
Expand Down
6 changes: 4 additions & 2 deletions qui/tray/domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,8 @@ def debug_console_update(self, *_args, **_kwargs):
# ... or with `expert-mode` feature per qube or per entire GUIVM.
if (
self.app.expert_mode
or getattr(self.vm, "debug")
or not getattr(self.vm, "guivm")
or getattr(self.vm, "debug", False)
or not getattr(self.vm, "guivm", None)
or not self.vm.features.check_with_template("gui", False)
or self.vm.features.get("expert-mode", False)
):
Expand Down Expand Up @@ -1069,6 +1069,8 @@ def add_domain_item(self, _submitter, event, vm, **_kwargs):
return
if vm in self.menu_items:
return
if vm.klass == "RemoteVM":
return

state = STATE_DICTIONARY.get(event)
if not state:
Expand Down