mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-08 23:23:23 -06:00
Do not show manager window at startup if user requested to show any other window from command line.
This commit is contained in:
parent
efd5401378
commit
6a1ad46978
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user