|
@@ -75,8 +75,6 @@ class VmRowInTable:
|
|
|
# pylint: disable=too-few-public-methods
|
|
|
def __init__(self, vm, row_no, table):
|
|
|
self.vm = vm
|
|
|
- # TODO: replace a various different widgets with a more generic
|
|
|
- # VmFeatureWidget or VMPropertyWidget
|
|
|
|
|
|
table_widgets.row_height = VmManagerWindow.row_height
|
|
|
table.setRowHeight(row_no, VmManagerWindow.row_height)
|
|
@@ -136,10 +134,16 @@ class VmRowInTable:
|
|
|
'Last backup'], self.last_backup_widget)
|
|
|
|
|
|
self.dvm_template_widget = table_widgets.VMPropertyItem(
|
|
|
- vm, "template_for_dispvms", empty_function=(lambda x: not x))
|
|
|
- table.setItem(row_no, VmManagerWindow.columns_indices['DVM Template'],
|
|
|
+ vm, "default_dispvm")
|
|
|
+ table.setItem(row_no, VmManagerWindow.columns_indices['Default DispVM'],
|
|
|
self.dvm_template_widget)
|
|
|
|
|
|
+ self.is_dispvm_template_widget = table_widgets.VMPropertyItem(
|
|
|
+ vm, "template_for_dispvms", empty_function=(lambda x: not x))
|
|
|
+ table.setItem(
|
|
|
+ row_no, VmManagerWindow.columns_indices['Is DVM Template'],
|
|
|
+ self.is_dispvm_template_widget)
|
|
|
+
|
|
|
self.table = table
|
|
|
|
|
|
def update(self, update_size_on_disk=False, event=None):
|
|
@@ -167,6 +171,10 @@ class VmRowInTable:
|
|
|
self.include_in_backups_widget.update()
|
|
|
if not event or event.endswith(':backup_timestamp'):
|
|
|
self.last_backup_widget.update()
|
|
|
+ if not event or event.endswith(':default_dispvm'):
|
|
|
+ self.dvm_template_widget.update()
|
|
|
+ if not event or event.endswith(':template_for_dispvms'):
|
|
|
+ self.is_dispvm_template_widget.update()
|
|
|
if update_size_on_disk:
|
|
|
self.size_widget.update()
|
|
|
except exc.QubesPropertyAccessError:
|
|
@@ -340,7 +348,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
|
|
"IP": 8,
|
|
|
"Include in backups": 9,
|
|
|
"Last backup": 10,
|
|
|
- "DVM Template": 11
|
|
|
+ "Default DispVM": 11,
|
|
|
+ "Is DVM Template": 12
|
|
|
}
|
|
|
|
|
|
def __init__(self, qt_app, qubes_app, dispatcher, parent=None):
|
|
@@ -384,7 +393,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
|
|
self.columns_indices["IP"]: self.action_ip,
|
|
|
self.columns_indices["Include in backups"]: self.action_backups,
|
|
|
self.columns_indices["Last backup"]: self.action_last_backup,
|
|
|
- self.columns_indices["DVM Template"]: self.action_dvm_template
|
|
|
+ self.columns_indices["Default DispVM"]: self.action_dispvm_template,
|
|
|
+ self.columns_indices["Is DVM Template"]: self.action_is_dvm_template
|
|
|
}
|
|
|
|
|
|
self.visible_columns_count = len(self.columns_indices)
|
|
@@ -1187,8 +1197,13 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
|
|
def on_action_size_on_disk_toggled(self, checked):
|
|
|
self.showhide_column(self.columns_indices['Size'], checked)
|
|
|
|
|
|
- def on_action_dvm_template_toggled(self, checked):
|
|
|
- self.showhide_column(self.columns_indices['DVM Template'], checked)
|
|
|
+ # pylint: disable=invalid-name
|
|
|
+ def on_action_dispvm_template_toggled(self, checked):
|
|
|
+ self.showhide_column(self.columns_indices['Default DispVM'], checked)
|
|
|
+
|
|
|
+ # pylint: disable=invalid-name
|
|
|
+ def on_action_is_dvm_template_toggled(self, checked):
|
|
|
+ self.showhide_column(self.columns_indices['Is DVM Template'], checked)
|
|
|
|
|
|
# noinspection PyArgumentList
|
|
|
@QtCore.pyqtSlot(name='on_action_about_qubes_triggered')
|