Revert "Added progress bar to __save_changes__"
This reverts commit bb7b8c79ae
.
This commit is contained in:
parent
dda98610d5
commit
56cc6c79e5
@ -276,30 +276,17 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
def __save_changes__(self):
|
def __save_changes__(self):
|
||||||
ret = []
|
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:
|
try:
|
||||||
ret_tmp = self.__apply_basic_tab__()
|
ret_tmp = self.__apply_basic_tab__()
|
||||||
self.progress.setValue(1)
|
|
||||||
if ret_tmp:
|
if ret_tmp:
|
||||||
ret += ["Basic tab:"] + ret_tmp
|
ret += ["Basic tab:"] + ret_tmp
|
||||||
ret_tmp = self.__apply_advanced_tab__()
|
ret_tmp = self.__apply_advanced_tab__()
|
||||||
self.progress.setValue(2)
|
|
||||||
if ret_tmp:
|
if ret_tmp:
|
||||||
ret += ["Advanced tab:"] + ret_tmp
|
ret += ["Advanced tab:"] + ret_tmp
|
||||||
ret_tmp = self.__apply_devices_tab__()
|
ret_tmp = self.__apply_devices_tab__()
|
||||||
self.progress.setValue(3)
|
|
||||||
if ret_tmp:
|
if ret_tmp:
|
||||||
ret += ["Devices tab:"] + ret_tmp
|
ret += ["Devices tab:"] + ret_tmp
|
||||||
ret_tmp = self.__apply_services_tab__()
|
ret_tmp = self.__apply_services_tab__()
|
||||||
self.progress.setValue(4)
|
|
||||||
if ret_tmp:
|
if ret_tmp:
|
||||||
ret += ["Sevices tab:"] + ret_tmp
|
ret += ["Sevices tab:"] + ret_tmp
|
||||||
except qubesadmin.exc.QubesException as qex:
|
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
|
except Exception as ex: # pylint: disable=broad-except
|
||||||
ret.append(repr(ex))
|
ret.append(repr(ex))
|
||||||
|
|
||||||
self.progress.setValue(4)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if self.policy_allow_radio_button.isEnabled():
|
if self.policy_allow_radio_button.isEnabled():
|
||||||
self.fw_model.apply_rules(
|
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
|
except Exception as ex: # pylint: disable=broad-except
|
||||||
ret += [self.tr("Firewall tab:"), repr(ex)]
|
ret += [self.tr("Firewall tab:"), repr(ex)]
|
||||||
|
|
||||||
self.progress.setValue(5)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if self.tabWidget.isTabEnabled(self.tabs_indices["applications"]):
|
if self.tabWidget.isTabEnabled(self.tabs_indices["applications"]):
|
||||||
self.app_list_manager.save_appmenu_select_changes()
|
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
|
except Exception as ex: # pylint: disable=broad-except
|
||||||
ret += [self.tr("Applications tab:"), repr(ex)]
|
ret += [self.tr("Applications tab:"), repr(ex)]
|
||||||
|
|
||||||
self.progress.setValue(6) # match progress constructor
|
|
||||||
|
|
||||||
utils.debug('\n'.join(ret))
|
utils.debug('\n'.join(ret))
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user