[gnome-boxes] ovirt: Fix cancelling of authentication
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] ovirt: Fix cancelling of authentication
- Date: Thu, 6 Jun 2013 13:31:49 +0000 (UTC)
commit 62bfdedf1249e400dad92a21060afe383a14c302
Author: Christophe Fergeau <cfergeau redhat com>
Date: Wed Jun 5 16:36:51 2013 +0200
ovirt: Fix cancelling of authentication
When authentication to an oVirt broker is cancelled,
yield OvirtBroker::add_source() would never return until the
authentication times out. Together with the changes
6b95a50c2 'app: Avoid adding duplicate sources', this could cause
the UI to appear empty for the duration of the timeout if an oVirt
source is created first, and if the user cancelled the connection
(or even if the connection takes quite some time).
https://bugzilla.gnome.org/show_bug.cgi?id=683489
src/ovirt-broker.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/ovirt-broker.vala b/src/ovirt-broker.vala
index 6e84b53..d403141 100644
--- a/src/ovirt-broker.vala
+++ b/src/ovirt-broker.vala
@@ -50,7 +50,12 @@ private class Boxes.OvirtBroker : Boxes.Broker {
proxy.password = password;
auth.unpause ();
};
- App.app.notificationbar.display_for_authentication ("oVirt broker", (owned) auth_cb, null);
+ Notificationbar.CancelFunc cancel_cb = () => {
+ // Make sure we are not stuck waiting for authentication to
+ // finish, otherwise yield add_source() will never return
+ auth.unpause ();
+ };
+ App.app.notificationbar.display_for_authentication ("oVirt broker", (owned) auth_cb, (owned)
cancel_cb);
auth.pause ();
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]