Vm private storage size editable in settings.
This commit is contained in:
parent
4168cc11fc
commit
98a801e00b
@ -215,6 +215,11 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
||||
text = "Yes" if self.vm.installed_by_rpm == True else "No"
|
||||
self.rpm_label.setText(text)
|
||||
|
||||
#maxmem
|
||||
self.priv_size.setValue(int(self.vm.maxmem)/1024)
|
||||
self.priv_size.setMinimum(0)
|
||||
self.priv_size.setMaximum(QubesHost().memory_total/1024/1024)
|
||||
|
||||
#self.vmname.selectAll()
|
||||
#self.vmname.setFocus()
|
||||
|
||||
@ -283,6 +288,12 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
||||
#include in backups
|
||||
self.vm.include_in_backups = self.include_in_backups.isChecked()
|
||||
|
||||
#maxmem
|
||||
maxmem = self.priv_size.value()*1024
|
||||
if maxmem == 0:
|
||||
maxmem = 256
|
||||
self.vm.maxmem = maxmem
|
||||
|
||||
return msg
|
||||
|
||||
# template_vm = template_vm_list[dialog.template_name.currentIndex()]
|
||||
|
@ -160,7 +160,7 @@
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Disk storage</string>
|
||||
@ -169,7 +169,7 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="priv_size">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
|
Loading…
Reference in New Issue
Block a user