Added icon property to AdminVM

To provide greater visual distinctiveness to AdminVMs, now they will
have their own icons.

requires https://github.com/QubesOS/qubes-artwork/pull/20
fixes QubesOS/qubes-issues#3853
This commit is contained in:
Marta Marczykowska-Górecka 2020-08-06 20:41:18 +02:00
parent f35a7a78b3
commit ebb1cf6e78
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B
2 changed files with 9 additions and 0 deletions

View File

@ -73,6 +73,9 @@ class TC_00_AdminVM(qubes.tests.QubesTestCase):
def test_000_init(self):
pass
def test_001_property_icon(self):
self.assertEqual(self.vm.icon, 'adminvm-black')
def test_100_xid(self):
self.assertEqual(self.vm.xid, 0)

View File

@ -99,6 +99,12 @@ class AdminVM(qubes.vm.BaseVM):
'''
return 0
@qubes.stateless_property
def icon(self): # pylint: disable=no-self-use
"""freedesktop icon name, suitable for use in
:py:meth:`PyQt4.QtGui.QIcon.fromTheme`"""
return 'adminvm-black'
@property
def libvirt_domain(self):
'''Libvirt object for dom0.