dom0/dispvm: clone QubesVmLabel object for DispVM
This commit is contained in:
parent
8b29a09986
commit
b3d0afc360
@ -177,6 +177,17 @@ QubesVmLabels = {
|
|||||||
"black" : QubesVmLabel ("black", 8),
|
"black" : QubesVmLabel ("black", 8),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QubesDispVmLabels = {
|
||||||
|
"red" : QubesVmLabel ("red", 1, icon="dispvm-red"),
|
||||||
|
"orange" : QubesVmLabel ("orange", 2, icon="dispvm-orange"),
|
||||||
|
"yellow" : QubesVmLabel ("yellow", 3, icon="dispvm-yellow"),
|
||||||
|
"green" : QubesVmLabel ("green", 4, color="0x5fa05e", icon="dispvm-green"),
|
||||||
|
"gray" : QubesVmLabel ("gray", 5, icon="dispvm-gray"),
|
||||||
|
"blue" : QubesVmLabel ("blue", 6, icon="dispvm-blue"),
|
||||||
|
"purple" : QubesVmLabel ("purple", 7, color="0xb83374", icon="dispvm-purple"),
|
||||||
|
"black" : QubesVmLabel ("black", 8, icon="dispvm-black"),
|
||||||
|
}
|
||||||
|
|
||||||
default_appvm_label = QubesVmLabels["red"]
|
default_appvm_label = QubesVmLabels["red"]
|
||||||
default_template_label = QubesVmLabels["gray"]
|
default_template_label = QubesVmLabels["gray"]
|
||||||
default_servicevm_label = QubesVmLabels["red"]
|
default_servicevm_label = QubesVmLabels["red"]
|
||||||
@ -1993,8 +2004,8 @@ class QubesDisposableVm(QubesVm):
|
|||||||
super(QubesDisposableVm, self).__init__(dir_path="/nonexistent", **kwargs)
|
super(QubesDisposableVm, self).__init__(dir_path="/nonexistent", **kwargs)
|
||||||
|
|
||||||
# Use DispVM icon with the same color
|
# Use DispVM icon with the same color
|
||||||
self._label.icon = "dispvm-" + self.label.icon
|
if self._label:
|
||||||
self._label.icon_path = "/usr/share/qubes/icons/" + self.label.icon + ".png"
|
self._label = QubesDispVmLabels[self._label.name]
|
||||||
self.icon_path = self._label.icon_path
|
self.icon_path = self._label.icon_path
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
Reference in New Issue
Block a user