From 7fb41f5cd6edd71bb4c1809d7b97b150706bd55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Mon, 16 Jul 2018 00:22:04 +0200 Subject: [PATCH] Make 'NetVm' column in Qube Manager clearer with regars to defaults When a VM has netvm set to 'default', now Qube Manager will display '(default)' in front of the netvm's name. references QubesOS/qubes-issues#3567 --- qubesmanager/table_widgets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qubesmanager/table_widgets.py b/qubesmanager/table_widgets.py index 4dd5538..862066b 100644 --- a/qubesmanager/table_widgets.py +++ b/qubesmanager/table_widgets.py @@ -311,7 +311,11 @@ class VmNetvmItem(QtGui.QTableWidgetItem): if getattr(self.vm, 'netvm', None) is None: self.setText("n/a") else: - self.setText(self.vm.netvm.name) + if self.vm.property_is_default('netvm'): + text = 'default (' + self.vm.netvm.name +')' + else: + text = self.vm.netvm.name + self.setText(text) def __lt__(self, other): if self.qid == 0: