Fixed a bug with warnings not modal in VM Settings
Warnings and error messages in VM settings were not modal and thus could be erroneously hidden. fixes QubesOS/qubes-issues#3959
This commit is contained in:
parent
85dc0f9083
commit
8de26419c1
@ -184,7 +184,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
|
|
||||||
if not t_monitor.success:
|
if not t_monitor.success:
|
||||||
QtGui.QMessageBox.warning(
|
QtGui.QMessageBox.warning(
|
||||||
None,
|
self,
|
||||||
self.tr("Error while changing settings for {0}!"
|
self.tr("Error while changing settings for {0}!"
|
||||||
).format(self.vm.name),
|
).format(self.vm.name),
|
||||||
self.tr("ERROR: {0}").format(t_monitor.error_msg))
|
self.tr("ERROR: {0}").format(t_monitor.error_msg))
|
||||||
@ -251,7 +251,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
not netvm.features.check_with_template('qubes-firewall', False))
|
not netvm.features.check_with_template('qubes-firewall', False))
|
||||||
if netvm is None:
|
if netvm is None:
|
||||||
QtGui.QMessageBox.warning(
|
QtGui.QMessageBox.warning(
|
||||||
None,
|
self,
|
||||||
self.tr("Qube configuration problem!"),
|
self.tr("Qube configuration problem!"),
|
||||||
self.tr('This qube has networking disabled '
|
self.tr('This qube has networking disabled '
|
||||||
'(Basic -> Networking) - network will be disabled. '
|
'(Basic -> Networking) - network will be disabled. '
|
||||||
@ -263,7 +263,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
'qubes-firewall',
|
'qubes-firewall',
|
||||||
False):
|
False):
|
||||||
QtGui.QMessageBox.warning(
|
QtGui.QMessageBox.warning(
|
||||||
None,
|
self,
|
||||||
self.tr("Qube configuration problem!"),
|
self.tr("Qube configuration problem!"),
|
||||||
self.tr("The '{vm}' qube is network connected to "
|
self.tr("The '{vm}' qube is network connected to "
|
||||||
"'{netvm}', which does not support firewall!<br/>"
|
"'{netvm}', which does not support firewall!<br/>"
|
||||||
@ -446,7 +446,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
def check_mem_changes(self):
|
def check_mem_changes(self):
|
||||||
if self.max_mem_size.value() < self.init_mem.value():
|
if self.max_mem_size.value() < self.init_mem.value():
|
||||||
QtGui.QMessageBox.warning(
|
QtGui.QMessageBox.warning(
|
||||||
None,
|
self,
|
||||||
self.tr("Warning!"),
|
self.tr("Warning!"),
|
||||||
self.tr("Max memory can not be less than initial memory.<br>"
|
self.tr("Max memory can not be less than initial memory.<br>"
|
||||||
"Setting max memory to equal initial memory."))
|
"Setting max memory to equal initial memory."))
|
||||||
@ -456,7 +456,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
# max_mem_size (or else "add_memory() failed: -17" problem)
|
# max_mem_size (or else "add_memory() failed: -17" problem)
|
||||||
if self.init_mem.value() * 10 < self.max_mem_size.value():
|
if self.init_mem.value() * 10 < self.max_mem_size.value():
|
||||||
QtGui.QMessageBox.warning(
|
QtGui.QMessageBox.warning(
|
||||||
None,
|
self,
|
||||||
self.tr("Warning!"),
|
self.tr("Warning!"),
|
||||||
self.tr("Initial memory can not be less than one tenth "
|
self.tr("Initial memory can not be less than one tenth "
|
||||||
"Max memory.<br>Setting initial memory to the minimum "
|
"Max memory.<br>Setting initial memory to the minimum "
|
||||||
@ -474,7 +474,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
|
||||||
if not t_monitor.success:
|
if not t_monitor.success:
|
||||||
QtGui.QMessageBox.warning(None,
|
QtGui.QMessageBox.warning(self,
|
||||||
self.tr("Error!"),
|
self.tr("Error!"),
|
||||||
self.tr("ERROR: {}").format(
|
self.tr("ERROR: {}").format(
|
||||||
t_monitor.error_msg))
|
t_monitor.error_msg))
|
||||||
@ -529,7 +529,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
|
|
||||||
elif ok:
|
elif ok:
|
||||||
QtGui.QMessageBox.warning(
|
QtGui.QMessageBox.warning(
|
||||||
None,
|
self,
|
||||||
self.tr("Removal cancelled"),
|
self.tr("Removal cancelled"),
|
||||||
self.tr("The qube will not be removed."))
|
self.tr("The qube will not be removed."))
|
||||||
|
|
||||||
@ -554,7 +554,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
if ok:
|
if ok:
|
||||||
self._run_in_thread(self._clone_vm, cloned_vm_name)
|
self._run_in_thread(self._clone_vm, cloned_vm_name)
|
||||||
QtGui.QMessageBox.warning(
|
QtGui.QMessageBox.warning(
|
||||||
None,
|
self,
|
||||||
self.tr("Success"),
|
self.tr("Success"),
|
||||||
self.tr("The qube was cloned successfully."))
|
self.tr("The qube was cloned successfully."))
|
||||||
|
|
||||||
@ -948,7 +948,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
if srv != "":
|
if srv != "":
|
||||||
if srv in self.new_srv_dict:
|
if srv in self.new_srv_dict:
|
||||||
QtGui.QMessageBox.information(
|
QtGui.QMessageBox.information(
|
||||||
None,
|
self,
|
||||||
'',
|
'',
|
||||||
self.tr('Service already on the list!'))
|
self.tr('Service already on the list!'))
|
||||||
else:
|
else:
|
||||||
@ -964,7 +964,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
return
|
return
|
||||||
if str(item.text()) == 'meminfo-writer':
|
if str(item.text()) == 'meminfo-writer':
|
||||||
QtGui.QMessageBox.information(
|
QtGui.QMessageBox.information(
|
||||||
None,
|
self,
|
||||||
self.tr('Service can not be removed'),
|
self.tr('Service can not be removed'),
|
||||||
self.tr('Service meminfo-writer can not '
|
self.tr('Service meminfo-writer can not '
|
||||||
'be removed from the list.'))
|
'be removed from the list.'))
|
||||||
|
Loading…
Reference in New Issue
Block a user