[gnome-boxes/gnome-3-8] ovirt: Fix cancelling of authentication
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/gnome-3-8] ovirt: Fix cancelling of authentication
- Date: Mon, 29 Jul 2013 17:21:29 +0000 (UTC)
commit 4db8de1bb37037fcdfe34d60f1d3ac6f7d39e481
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]