diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index a1dc52b..ff22b16 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) @@ -596,6 +597,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 @@ -621,13 +623,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 655c8c7..ec867dc 100644 --- a/ui/settingsdlg.ui +++ b/ui/settingsdlg.ui @@ -472,19 +472,6 @@ border-width: 1px; 15 - - - - true - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1 - - - @@ -526,6 +513,19 @@ border-width: 1px; + + + + true + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + @@ -551,17 +551,7 @@ border-width: 1px; - - - - true - - - Include in memory balancing - - - - + @@ -616,6 +606,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 + + +