[grilo] grilo-test-ui: Ask once for Flickr's authorization
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] grilo-test-ui: Ask once for Flickr's authorization
- Date: Thu, 15 Jul 2010 08:19:15 +0000 (UTC)
commit 94bdc216e16faca154d5ebdf107822e5cfec0a1e
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Wed Jul 7 17:34:40 2010 +0200
grilo-test-ui: Ask once for Flickr's authorization
tools/grilo-test-ui/main.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/tools/grilo-test-ui/main.c b/tools/grilo-test-ui/main.c
index 85312da..9e38b4f 100644
--- a/tools/grilo-test-ui/main.c
+++ b/tools/grilo-test-ui/main.c
@@ -47,6 +47,8 @@
"browser. Click on the link below, and when you are finished, " \
"return to this window and press OK button to complete " \
"authorization.\n\n" \
+ "It is possible that you need to restart the application to " \
+ "apply the changes.\n\n" \
"If you do not authorize it, then you can not access your " \
"private photos."
@@ -1330,10 +1332,14 @@ set_flickr_config (void)
#ifdef HAVE_GRILO_FLICKR
if (!token) {
token = authorize_flickr ();
+ if (!token) {
+ /* Save empty token to avoid asking again */
+ save_flickr_token ("");
+ }
}
#endif
- if (token) {
+ if (token && token[0] != '\0') {
config = grl_config_new ("grl-flickr", NULL);
grl_config_set_api_key (config, FLICKR_KEY);
grl_config_set_api_secret (config, FLICKR_SECRET);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]