From a9980d6d3448051d6377c43c6f55dc0f518c27bd Mon Sep 17 00:00:00 2001 From: Wojciech Zygmunt Porczyk Date: Mon, 5 May 2014 16:37:33 +0200 Subject: [PATCH] qubes-core-appmenus.py: create/remove appmenus when re/setting internal This is part of #827 bug. --- appmenus-scripts/qubes-core-appmenus.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/appmenus-scripts/qubes-core-appmenus.py b/appmenus-scripts/qubes-core-appmenus.py index daf1a8c..5d6e018 100644 --- a/appmenus-scripts/qubes-core-appmenus.py +++ b/appmenus-scripts/qubes-core-appmenus.py @@ -234,6 +234,13 @@ def QubesVm_appmenus_recreate(self): self.appicons_create() self.appmenus_create() +def QubesVm_set_attr(self, name, value): + if name == 'internal': + if value: + self.appmenus_remove() + else: + self.appmenus_create() + # new methods QubesVm.appmenus_create = QubesVm_appmenus_create QubesVm.appmenus_remove = QubesVm_appmenus_remove @@ -249,3 +256,4 @@ QubesVm.hooks_create_on_disk.append(QubesVm_create_on_disk) QubesVm.hooks_clone_disk_files.append(QubesVm_clone_disk_files) QubesVm.hooks_remove_from_disk.append(QubesVm_remove_from_disk) QubesVm.hooks_label_setter.append(QubesVm_label_setter) +QubesVm.hooks_set_attr.append(QubesVm_set_attr)