diff --git a/icons/transient.png b/icons/transient.png
new file mode 100644
index 0000000..8af4063
Binary files /dev/null and b/icons/transient.png differ
diff --git a/mainwindow.ui b/mainwindow.ui
index 491cab8..03e1249 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -300,7 +300,7 @@
:/removevm.png:/removevm.png
- remove AppVM
+ Remove AppVM
Remove an existing AppVM (must be stopped first)
@@ -509,7 +509,7 @@
:/settings.png:/settings.png
- Settings
+ VM settings
VM Settings
diff --git a/qubesmanager/main.py b/qubesmanager/main.py
index d12f083..12b42fe 100755
--- a/qubesmanager/main.py
+++ b/qubesmanager/main.py
@@ -141,10 +141,13 @@ class VmStatusIcon(QLabel):
self.previous_power_state = self.vm.last_power_state
def set_on_icon(self):
- if self.vm.last_power_state:
+ if self.vm.last_power_state == "Running":
icon = QIcon (":/on.png")
+ elif self.vm.last_power_state in ["Starting", "Halting", "Dying"]:
+ icon = QIcon (":/transient.png")
else:
icon = QIcon (":/off.png")
+
icon_sz = QSize (VmManagerWindow.row_height * 0.5, VmManagerWindow.row_height *0.5)
icon_pixmap = icon.pixmap(icon_sz)
self.setPixmap (icon_pixmap)
@@ -479,20 +482,20 @@ class VmRowInTable(object):
table.setItem(row_no, VmManagerWindow.columns_indices['NetVM'], self.netvm_widget)
self.cpu_usage_widget = VmUsageBarWidget(0, 100, "%v %",
- lambda vm, val: val if vm.last_power_state else 0, vm, 0, self.cpu_graph_hue)
+ lambda vm, val: val if vm.last_running else 0, vm, 0, self.cpu_graph_hue)
table.setCellWidget(row_no, VmManagerWindow.columns_indices['CPU'], self.cpu_usage_widget)
table.setItem(row_no, VmManagerWindow.columns_indices['CPU'], self.cpu_usage_widget.tableItem)
- self.load_widget = ChartWidget(vm, lambda vm, val: val if vm.last_power_state else 0, self.cpu_graph_hue, 0 )
+ self.load_widget = ChartWidget(vm, lambda vm, val: val if vm.last_running else 0, self.cpu_graph_hue, 0 )
table.setCellWidget(row_no, VmManagerWindow.columns_indices['CPU Graph'], self.load_widget)
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_power_state else 0, vm, 0, self.mem_graph_hue)
+ lambda vm, val: vm.get_mem()/1024 if vm.last_running else 0, 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_power_state else 0, self.mem_graph_hue, 0)
+ 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)
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)
@@ -714,7 +717,8 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
vms_list = [vm for vm in self.qvm_collection.values()]
for vm in vms_list:
- vm.last_power_state = vm.is_running()
+ vm.last_power_state = vm.get_power_state()
+ vm.last_running = vm.last_power_state in ["Running", "Starting"]
no_vms = len (vms_list)
vms_to_display = []
@@ -750,7 +754,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
row_no = 0
for vm in vms_list:
- if (not self.show_inactive_vms) and (not vm.last_power_state):
+ if (not self.show_inactive_vms) and (not vm.last_running):
continue
if vm.internal:
continue
@@ -774,9 +778,10 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
if manager_window.isVisible():
some_vms_have_changed_power_state = False
for vm in self.vms_list:
- state = vm.is_running();
+ state = vm.get_power_state()
if vm.last_power_state != state:
vm.last_power_state = state
+ vm.last_running = (state in ["Running", "Starting"])
some_vms_have_changed_power_state = True
reload_table = self.reload_table
@@ -887,10 +892,10 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
if vm != None:
# Update available actions:
self.action_settings.setEnabled(True)
- self.action_removevm.setEnabled(not vm.installed_by_rpm and not vm.last_power_state)
- self.action_resumevm.setEnabled(not vm.last_power_state)
- self.action_pausevm.setEnabled(vm.last_power_state and vm.qid != 0)
- self.action_shutdownvm.setEnabled(vm.last_power_state and vm.qid != 0)
+ self.action_removevm.setEnabled(not vm.installed_by_rpm and not (vm.last_running))
+ self.action_resumevm.setEnabled(not vm.last_running)
+ self.action_pausevm.setEnabled(vm.last_running and vm.qid != 0)
+ self.action_shutdownvm.setEnabled(vm.last_running and vm.qid != 0)
self.action_appmenus.setEnabled(not vm.is_netvm())
self.action_editfwrules.setEnabled(vm.is_networked() and not (vm.is_netvm() and not vm.is_proxyvm()))
self.action_updatevm.setEnabled(vm.is_updateable() or vm.qid == 0)
diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py
index 858d58a..26a2a02 100644
--- a/qubesmanager/settings.py
+++ b/qubesmanager/settings.py
@@ -360,7 +360,25 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
self.include_in_balancing.setChecked(self.vm.services['meminfo-writer']==True)
+
+ #paths
+ self.dir_path.setText(self.vm.dir_path)
+ self.config_path.setText(self.vm.conf_file)
+ if self.vm.template is not None:
+ self.root_img_path.setText(self.vm.template.root_img)
+ else:
+ self.root_img_path.setText("n/a")
+ self.volatile_img_path.setText(self.vm.volatile_img)
+ self.private_img_path.setText(self.vm.private_img)
+
+
#kernel
+
+ #in case VM is not Linux
+ if not hasattr(self.vm, "kernel"):
+ self.kernel_groupbox.setVisible(False)
+ return;
+
if self.vm.template is not None:
text = self.vm.kernel
self.kernel.insertItem(0, text)
@@ -390,16 +408,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
self.kernel_opts.setText(self.vm.kernelopts)
- #paths
- self.dir_path.setText(self.vm.dir_path)
- self.config_path.setText(self.vm.conf_file)
- if self.vm.template is not None:
- self.root_img_path.setText(self.vm.template.root_img)
- else:
- self.root_img_path.setText("n/a")
- self.volatile_img_path.setText(self.vm.volatile_img)
- self.private_img_path.setText(self.vm.private_img)
-
+
def __apply_advanced_tab__(self):
#mem/cpu
@@ -417,6 +426,10 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
#include_in_memory_balancing applied in services tab
+
+ #in case VM is not Linux
+ if not hasattr(self.vm, "kernel"):
+ return;
#kernel changed
if self.kernel.currentIndex() != self.kernel_idx:
diff --git a/resources.qrc b/resources.qrc
index 639edfc..7d34360 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -16,6 +16,7 @@
icons/add.png
icons/flag-blue.png
icons/running.png
+ icons/transient.png
icons/flag-green.png
icons/flag-red.png
icons/flag-yellow.png
diff --git a/settingsdlg.ui b/settingsdlg.ui
index 3946024..1fbe60d 100644
--- a/settingsdlg.ui
+++ b/settingsdlg.ui
@@ -29,7 +29,7 @@
- 3
+ 1
@@ -435,7 +435,7 @@
-
-
+
true
diff --git a/version b/version
index 963ed7c..c114700 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-1.2.10
+1.2.11