[virt-tools-list] [virt-manager PATCH v2 2/2] engine: add methods for showing config window
Chen Hanxiao
chenhanxiao at cn.fujitsu.com
Tue Jun 24 10:38:01 UTC 2014
Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
v2: add right-click menu support
virtManager/config.py | 4 ++++
virtManager/engine.py | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/virtManager/config.py b/virtManager/config.py
index b24fee5..7426bb4 100644
--- a/virtManager/config.py
+++ b/virtManager/config.py
@@ -308,6 +308,8 @@ class vmmConfig(object):
return self.conf.get("/confirm/unapplied-dev")
def get_confirm_delstorage(self):
return self.conf.get("/confirm/delete-storage")
+ def get_confirm_opendetails(self):
+ return self.conf.get("/confirm/open-details")
def set_confirm_forcepoweroff(self, val):
@@ -324,6 +326,8 @@ class vmmConfig(object):
self.conf.set("/confirm/unapplied-dev", val)
def set_confirm_delstorage(self, val):
self.conf.set("/confirm/delete-storage", val)
+ def set_confirm_opendetails(self, val):
+ self.conf.set("/confirm/open-details", val)
# System tray visibility
diff --git a/virtManager/engine.py b/virtManager/engine.py
index d3a49d7..ed2c284 100644
--- a/virtManager/engine.py
+++ b/virtManager/engine.py
@@ -772,7 +772,13 @@ class vmmEngine(vmmGObject):
def _do_show_vm(self, src, uri, connkey):
conn = self._lookup_conn(uri)
vm = conn.get_vm(connkey)
- self._show_vm_helper(src, uri, vm, None, False)
+ open_details = self.config.get_confirm_opendetails()
+ if open_details:
+ self._show_vm_helper(src, uri, vm, DETAILS_CONFIG, False)
+ details = self._get_details_dialog(uri, vm.get_connkey())
+ details.widget("control-vm-details").set_active(True)
+ else:
+ self._show_vm_helper(src, uri, vm, None, False)
def get_manager(self):
if self.windowManager:
--
1.9.0
More information about the virt-tools-list
mailing list