Merge remote-tracking branch 'origin/pr/365'

* origin/pr/365:
  Added icon property to AdminVM
This commit is contained in:
Marek Marczykowski-Górecki 2020-08-12 01:26:29 +02:00
commit 24e0ddd7ab
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
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.