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
This commit is contained in:
Marta Marczykowska-Górecka 2018-07-16 00:22:04 +02:00
parent 3f0af4498c
commit 7fb41f5cd6
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B

View File

@ -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: