From 54d523de6cdf6b9e6499b6702a740987e0671df9 Mon Sep 17 00:00:00 2001 From: donoban Date: Wed, 18 Nov 2020 12:27:59 +0100 Subject: [PATCH] Added change network confirmation --- qubesmanager/qube_manager.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index bc280f5..d6dcb9f 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -814,6 +814,17 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): info.vm.template = template def change_network(self, netvm_name): + selected_vms = self.get_selected_vms() + reply = QMessageBox.question( + self, self.tr("Network Change Confirmation"), + self.tr("Do you want to change '{0}'
" + "to Network '{1}'?").format( + ', '.join(vm.name for vm in selected_vms), netvm_name), + QMessageBox.Yes | QMessageBox.Cancel) + + if reply != QMessageBox.Yes: + return + try: check_power = any(info.state['power'] == 'Running' for info in self.get_selected_vms())