Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/263'
Browse files Browse the repository at this point in the history
* origin/pr/263:
  Warn if trying to change layout on unsupported vms in Qube Manager
  • Loading branch information
marmarek committed Oct 1, 2020
2 parents fdf4f87 + bac3667 commit 29da891
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion qubesmanager/qube_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,17 @@ def action_open_console_triggered(self):
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')
Expand Down

0 comments on commit 29da891

Please sign in to comment.