From 56cc6c79e5deea1d3fd457e8f060dc619a6384d6 Mon Sep 17 00:00:00 2001 From: donoban Date: Tue, 19 Feb 2019 21:46:38 +0100 Subject: [PATCH] Revert "Added progress bar to __save_changes__" This reverts commit bb7b8c79ae20006762cc27c2f0c3ed2ce19c9390. --- qubesmanager/settings.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index 2d2125a..5212801 100755 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -276,30 +276,17 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog): def __save_changes__(self): ret = [] - self.progress = QtGui.QProgressDialog( - self.tr( # Last param should match last setValue() - "Saving changes..."), "", 0, 6) - self.progress.setMinimumDuration(1000) - self.progress.setCancelButton(None) - self.progress.setModal(True) - self.progress.show() - self.progress.setValue(0) - try: ret_tmp = self.__apply_basic_tab__() - self.progress.setValue(1) if ret_tmp: ret += ["Basic tab:"] + ret_tmp ret_tmp = self.__apply_advanced_tab__() - self.progress.setValue(2) if ret_tmp: ret += ["Advanced tab:"] + ret_tmp ret_tmp = self.__apply_devices_tab__() - self.progress.setValue(3) if ret_tmp: ret += ["Devices tab:"] + ret_tmp ret_tmp = self.__apply_services_tab__() - self.progress.setValue(4) if ret_tmp: ret += ["Sevices tab:"] + ret_tmp except qubesadmin.exc.QubesException as qex: @@ -307,8 +294,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog): except Exception as ex: # pylint: disable=broad-except ret.append(repr(ex)) - self.progress.setValue(4) - try: if self.policy_allow_radio_button.isEnabled(): self.fw_model.apply_rules( @@ -320,8 +305,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog): except Exception as ex: # pylint: disable=broad-except ret += [self.tr("Firewall tab:"), repr(ex)] - self.progress.setValue(5) - try: if self.tabWidget.isTabEnabled(self.tabs_indices["applications"]): self.app_list_manager.save_appmenu_select_changes() @@ -330,8 +313,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog): except Exception as ex: # pylint: disable=broad-except ret += [self.tr("Applications tab:"), repr(ex)] - self.progress.setValue(6) # match progress constructor - utils.debug('\n'.join(ret)) return ret