From 1477c8e90c15de0d3625f33d6fb892d5cbaba9ad Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Tue, 19 Feb 2013 03:32:03 +0100 Subject: [PATCH] Display memory size even if VM isn't running. This covers the case of paused and halting VMs. --- qubesmanager/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qubesmanager/main.py b/qubesmanager/main.py index 49ee907..fa46323 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -619,11 +619,11 @@ class VmRowInTable(object): table.setItem(row_no, VmManagerWindow.columns_indices['CPU Graph'], self.load_widget.tableItem) self.mem_usage_widget = VmUsageBarWidget(0, qubes_host.memory_total/1024, "%v MB", - lambda vm, val: vm.get_mem()/1024 if vm.last_running else 0, vm, 0, self.mem_graph_hue) + lambda vm, val: vm.get_mem()/1024, vm, 0, self.mem_graph_hue) table.setCellWidget(row_no, VmManagerWindow.columns_indices['MEM'], self.mem_usage_widget) table.setItem(row_no, VmManagerWindow.columns_indices['MEM'], self.mem_usage_widget.tableItem) - self.mem_widget = ChartWidget(vm, lambda vm, val: vm.get_mem()*100/qubes_host.memory_total if vm.last_running else 0, self.mem_graph_hue, 0) + self.mem_widget = ChartWidget(vm, lambda vm, val: vm.get_mem()*100/qubes_host.memory_total, self.mem_graph_hue, 0) table.setCellWidget(row_no, VmManagerWindow.columns_indices['MEM Graph'], self.mem_widget) table.setItem(row_no, VmManagerWindow.columns_indices['MEM Graph'], self.mem_widget.tableItem)