Fixed lack of new vm.icon property handling in Qube Manager
This commit is contained in:
parent
2637d9bb09
commit
3f6f8c5396
@ -202,6 +202,8 @@ class VmInfo():
|
|||||||
|
|
||||||
self.label = getattr(self.vm, 'label', None)
|
self.label = getattr(self.vm, 'label', None)
|
||||||
self.klass = getattr(self.vm, 'klass', None)
|
self.klass = getattr(self.vm, 'klass', None)
|
||||||
|
self.icon = getattr(vm, 'icon', 'appvm-black')
|
||||||
|
|
||||||
self.state = {'power': "", 'outdated': ""}
|
self.state = {'power': "", 'outdated': ""}
|
||||||
self.updateable = getattr(vm, 'updateable', False)
|
self.updateable = getattr(vm, 'updateable', False)
|
||||||
self.update(True)
|
self.update(True)
|
||||||
@ -430,13 +432,11 @@ class QubesTableModel(QAbstractTableModel):
|
|||||||
|
|
||||||
if col_name == "Label":
|
if col_name == "Label":
|
||||||
try:
|
try:
|
||||||
return self.label_pixmap[vm.label]
|
return self.label_pixmap[vm.icon]
|
||||||
except KeyError:
|
except (KeyError, AttributeError):
|
||||||
icon = QIcon.fromTheme(vm.label.icon)
|
icon = QIcon.fromTheme(vm.icon)
|
||||||
self.label_pixmap[vm.label] = icon.pixmap(icon_size)
|
self.label_pixmap[vm.icon] = icon.pixmap(icon_size)
|
||||||
return self.label_pixmap[vm.label]
|
return self.label_pixmap[vm.icon]
|
||||||
except exc.QubesDaemonAccessError:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if role == Qt.FontRole:
|
if role == Qt.FontRole:
|
||||||
if col_name == "Template":
|
if col_name == "Template":
|
||||||
|
Loading…
Reference in New Issue
Block a user