From bac36675dc43ba11dfbea96514a41cd3472a05dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Wed, 9 Sep 2020 15:19:59 +0200 Subject: [PATCH] Warn if trying to change layout on unsupported vms in Qube Manager requires https://github.com/QubesOS/qubes-core-admin-client/pull/161 references QubesOS/qubes-issues#6030 --- qubesmanager/qube_manager.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index daee78e..91f290e 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -1318,7 +1318,17 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): def action_set_keyboard_layout_triggered(self): # pylint: disable=invalid-name for vm_info in self.get_selected_vms(): - vm_info.vm.run('qubes-change-keyboard-layout') + if vm_info.vm.features.check_with_template( + "supported-feature.keyboard-layout", False): + vm_info.vm.run('qubes-change-keyboard-layout') + else: + QMessageBox.warning( + self, + self.tr("Keyboard layout change unsupported"), + self.tr( + "Please update the qube {} or its template to the " + "newest version of Qubes tools.").format( + str(vm_info.vm))) # noinspection PyArgumentList @pyqtSlot(name='on_action_editfwrules_triggered')