[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [virt-manager][PATCH] Do not show manager window at startup if user requested to show any other window from command line.



From: Leonardo Garcia <lagarcia br ibm com>

---
 virt-manager          |    1 +
 virtManager/engine.py |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/virt-manager b/virt-manager
index 4c01ccc..5b237a6 100755
--- a/virt-manager
+++ b/virt-manager
@@ -285,6 +285,7 @@ def main():
             return _conn_state_changed(conn, engine, options.show,
                                        options.uri, options.uuid)
         engine.uri_cb = cb
+        engine.show_manager_window = False
 
 
     # Finally start the app for real
diff --git a/virtManager/engine.py b/virtManager/engine.py
index 621d7c3..16ed552 100644
--- a/virtManager/engine.py
+++ b/virtManager/engine.py
@@ -118,6 +118,7 @@ class vmmEngine(vmmGObject):
         self.skip_autostart = False
         self.uri_at_startup = None
         self.uri_cb = None
+        self.show_manager_window = True
 
         self.init_systray()
 
@@ -132,7 +133,10 @@ class vmmEngine(vmmGObject):
 
 
     def _activate(self, ignore):
-        self.show_manager()
+        if self.show_manager_window:
+            self.show_manager()
+        else:
+            self.get_manager()
         self.application.add_window(self._appwindow)
 
         if self.uri_at_startup:
@@ -444,7 +448,6 @@ class vmmEngine(vmmGObject):
             if autoconnect is not None:
                 conn.set_autoconnect(bool(autoconnect))
 
-            self.show_manager()
             if do_start:
                 conn.open()
             return conn
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]