engine: Close packagekit dialog before connecting to libvirt
We are bunching up a slew of hefty operations, split things up a bit so the UI has a change to catchup.
This commit is contained in:
parent
e2435b6d02
commit
1c22ea92df
|
@ -205,17 +205,22 @@ class vmmEngine(vmmGObject):
|
|||
manager.set_startup_error(msg)
|
||||
return
|
||||
|
||||
do_start = packageutils.start_libvirtd()
|
||||
warnmsg = _(
|
||||
"Libvirt was just installed, so the 'libvirtd' service will\n"
|
||||
"will need to be started.\n"
|
||||
"virt-manager will connect to libvirt on the next application\n"
|
||||
"start up.")
|
||||
warnmsg = _("virt-manager will connect to libvirt on the next\n"
|
||||
"application start up.")
|
||||
if any(["libvirt" in p for p in ret or []]):
|
||||
warnmsg = _(
|
||||
"Libvirt was just installed, so the 'libvirtd' service will\n"
|
||||
"will need to be started.") + "\n\n" + warnmsg
|
||||
|
||||
if not do_start:
|
||||
manager.err.ok(_("Libvirt service must be started"), warnmsg)
|
||||
# Do the initial connection in an idle callback, so the
|
||||
# packagekit async dialog has a chance to go away
|
||||
def idle_connect():
|
||||
do_start = packageutils.start_libvirtd()
|
||||
if not do_start:
|
||||
manager.err.ok(_("Libvirt service must be started"), warnmsg)
|
||||
|
||||
self.connect_to_uri(tryuri, autoconnect=True, do_start=do_start)
|
||||
self.connect_to_uri(tryuri, autoconnect=True, do_start=do_start)
|
||||
self.idle_add(idle_connect)
|
||||
|
||||
|
||||
def load_stored_uris(self):
|
||||
|
|
Loading…
Reference in New Issue