From 98a801e00b4f1c98d1814d2945afc159da541ed2 Mon Sep 17 00:00:00 2001 From: Agnieszka Kostrzewa Date: Wed, 7 Mar 2012 21:21:14 +0100 Subject: [PATCH] Vm private storage size editable in settings. --- qubesmanager/settings.py | 11 +++++++++++ settingsdlg.ui | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index c7cba74..a09c473 100644 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -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()] diff --git a/settingsdlg.ui b/settingsdlg.ui index 43febe8..2d1be52 100644 --- a/settingsdlg.ui +++ b/settingsdlg.ui @@ -160,7 +160,7 @@ - false + true Disk storage @@ -169,7 +169,7 @@ - false + true Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter