From aca43a46da2174e8de8d6234394fc5950f34a452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 7 Jun 2014 04:05:03 +0200 Subject: [PATCH] Filter out 'dom0' from selectable netvm list This is workaround until #757 will be done. --- qubesmanager/create_new_vm.py | 2 ++ qubesmanager/settings.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/qubesmanager/create_new_vm.py b/qubesmanager/create_new_vm.py index d9f6344..42243cd 100644 --- a/qubesmanager/create_new_vm.py +++ b/qubesmanager/create_new_vm.py @@ -108,6 +108,8 @@ class NewVmDlg (QDialog, Ui_NewVMDlg): def filter_netvm(vm): if vm.internal: return False + if vm.qid == 0: + return False if vm.is_netvm(): return True if vm.is_proxyvm(): diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index d3690c6..f48cc3f 100755 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -254,7 +254,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog): if (not self.vm.is_netvm() or self.vm.is_proxyvm()): - netvm_list = [vm for vm in self.qvm_collection.values() if not vm.internal and vm.is_netvm()] + netvm_list = [vm for vm in self.qvm_collection.values() if not vm.internal and vm.is_netvm() and vm.qid != 0] self.netvm_idx = -1 text = "default ("+self.qvm_collection.get_default_netvm().name+")"