diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index 0340f44..a24a2f9 100644 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -166,6 +166,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog): self.include_in_balancing_changed) self.init_mem.editingFinished.connect(self.check_mem_changes) self.max_mem_size.editingFinished.connect(self.check_mem_changes) + self.check_mem_changes() self.boot_from_device_button.clicked.connect( self.boot_from_cdrom_button_pressed) @@ -561,6 +562,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog): return msg def check_mem_changes(self): + self.warn_too_much_mem_label.setVisible(False) if not self.include_in_balancing.isChecked(): # do not interfere with settings if the VM is not included in memory # balancing @@ -586,13 +588,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog): if is_linux and \ self.init_mem.value() * 10 < self.max_mem_size.value(): - self.init_mem.setValue((self.max_mem_size.value() + 9) // 10) - QtWidgets.QMessageBox.warning( - self, - self.tr("Warning!"), - self.tr("For Linux qubes, Initial memory can not be less than " - "one tenth Max memory.
Setting initial memory " - "to the minimum allowed value.")) + self.warn_too_much_mem_label.setVisible(True) def check_warn_dispvmnetvm(self): if not hasattr(self.vm, 'default_dispvm'): diff --git a/ui/settingsdlg.ui b/ui/settingsdlg.ui index 778e791..a296b06 100644 --- a/ui/settingsdlg.ui +++ b/ui/settingsdlg.ui @@ -465,19 +465,6 @@ border-width: 1px; 15 - - - - true - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1 - - - @@ -519,6 +506,19 @@ border-width: 1px; + + + + true + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + @@ -544,17 +544,7 @@ border-width: 1px; - - - - true - - - Include in memory balancing - - - - + @@ -609,6 +599,127 @@ border-width: 1px; + + + + true + + + Include in memory balancing + + + + + + + + + + + + 239 + 41 + 41 + + + + + + + 239 + 41 + 41 + + + + + + + 239 + 41 + 41 + + + + + + + + + 239 + 41 + 41 + + + + + + + 239 + 41 + 41 + + + + + + + 239 + 41 + 41 + + + + + + + + + 190 + 190 + 190 + + + + + + + 190 + 190 + 190 + + + + + + + 0 + 0 + 0 + + + + + + + + + 75 + true + true + + + + Linux qubes cannot utilize more than 10 times the initial memory. Setting maximum memory higher leads to unused RAM. + + + Qt::AlignJustify|Qt::AlignVCenter + + + true + + +