[gthumb] web services: hide the authorization dialog after receiving the callback



commit 6f88bc093e41ef80e1a40b55c79f2ac32aa2b2bb
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sat Dec 22 12:26:26 2012 +0100

    web services: hide the authorization dialog after receiving the callback

 extensions/oauth/oauth-service.c          |    3 +++
 extensions/picasaweb/picasa-web-service.c |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/extensions/oauth/oauth-service.c b/extensions/oauth/oauth-service.c
index 2b0cb91..c6a57ba 100644
--- a/extensions/oauth/oauth-service.c
+++ b/extensions/oauth/oauth-service.c
@@ -322,6 +322,9 @@ ask_authorization_dialog_load_request_cb (OAuthAskAuthorizationDialog *dialog,
 		_g_strset (&self->priv->token, g_hash_table_lookup (data, "oauth_token"));
 
 		if (self->priv->token != NULL) {
+			gtk_widget_hide (GTK_WIDGET (dialog));
+			gth_task_dialog (GTH_TASK (self), FALSE, NULL);
+
 			success = TRUE;
 			_oauth_service_get_access_token (self,
 							 g_hash_table_lookup (data, "oauth_verifier"),
diff --git a/extensions/picasaweb/picasa-web-service.c b/extensions/picasaweb/picasa-web-service.c
index 5524bcb..5f71062 100644
--- a/extensions/picasaweb/picasa-web-service.c
+++ b/extensions/picasaweb/picasa-web-service.c
@@ -273,6 +273,9 @@ ask_authorization_dialog_loaded_cb (OAuthAskAuthorizationDialog *dialog,
 	if (g_str_has_prefix (title, PICASA_WEB_REDIRECT_TITLE)) {
 		const char *authorization_code;
 
+		gtk_widget_hide (GTK_WIDGET (dialog));
+		gth_task_dialog (GTH_TASK (self), FALSE, NULL);
+
 		authorization_code = title + strlen (PICASA_WEB_REDIRECT_TITLE);
 		_picasa_web_service_get_refresh_token (self,
 						       authorization_code,



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