dom0/core: recreate appmenus after rename for any VM, not only AppVM (#659)
This commit is contained in:
parent
45639096fa
commit
1b25d77504
@ -489,7 +489,7 @@ class QubesVm(object):
|
|||||||
return re.match(r"^[a-zA-Z0-9_-]*$", name) is not None
|
return re.match(r"^[a-zA-Z0-9_-]*$", name) is not None
|
||||||
|
|
||||||
def pre_rename(self, new_name):
|
def pre_rename(self, new_name):
|
||||||
pass
|
self.remove_appmenus()
|
||||||
|
|
||||||
def set_name(self, name):
|
def set_name(self, name):
|
||||||
if self.is_running():
|
if self.is_running():
|
||||||
@ -527,7 +527,7 @@ class QubesVm(object):
|
|||||||
self.post_rename(old_name)
|
self.post_rename(old_name)
|
||||||
|
|
||||||
def post_rename(self, old_name):
|
def post_rename(self, old_name):
|
||||||
pass
|
self.create_appmenus(verbose=False)
|
||||||
|
|
||||||
def is_template(self):
|
def is_template(self):
|
||||||
return isinstance(self, QubesTemplateVm)
|
return isinstance(self, QubesTemplateVm)
|
||||||
@ -2223,12 +2223,6 @@ class QubesAppVm(QubesVm):
|
|||||||
self.remove_appmenus()
|
self.remove_appmenus()
|
||||||
super(QubesAppVm, self).remove_from_disk()
|
super(QubesAppVm, self).remove_from_disk()
|
||||||
|
|
||||||
def pre_rename(self, new_name):
|
|
||||||
self.remove_appmenus()
|
|
||||||
|
|
||||||
def post_rename(self, old_name):
|
|
||||||
self.create_appmenus(verbose=False)
|
|
||||||
|
|
||||||
|
|
||||||
class QubesVmCollection(dict):
|
class QubesVmCollection(dict):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user