projects
/
milk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6040cbb
)
Exit with marginally more grace when we cancel the sign-in dialog.
author
Travis Reitter
<treitter@gmail.com>
Mon, 30 Nov 2009 03:46:59 +0000
(19:46 -0800)
committer
Travis Reitter
<treitter@gmail.com>
Fri, 4 Dec 2009 06:01:13 +0000
(22:01 -0800)
src/milk-auth.c
patch
|
blob
|
history
diff --git
a/src/milk-auth.c
b/src/milk-auth.c
index
e8e78f1
..
548e16b
100644
(file)
--- a/
src/milk-auth.c
+++ b/
src/milk-auth.c
@@
-144,16
+144,16
@@
auth_response_cb (GtkWidget *dialog,
auth_token = rtm_glib_auth_get_token (priv->rtm_glib, priv->frob,
&error);
if (error != NULL) {
auth_token = rtm_glib_auth_get_token (priv->rtm_glib, priv->frob,
&error);
if (error != NULL) {
- g_error ("%s", rtm_error_get_message (error));
+ g_warning ("%s", rtm_error_get_message (error));
goto auth_response_cb_error_OUT;
}
if (!rtm_glib_auth_check_token (priv->rtm_glib, auth_token, NULL)) {
goto auth_response_cb_error_OUT;
}
if (!rtm_glib_auth_check_token (priv->rtm_glib, auth_token, NULL)) {
- g_error ("auth_token not valid!\n");
+ g_warning ("auth_token not valid!\n");
goto auth_response_cb_error_OUT;
}
if (error != NULL) {
goto auth_response_cb_error_OUT;
}
if (error != NULL) {
- g_error ("%s", rtm_error_get_message (error));
+ g_warning ("%s", rtm_error_get_message (error));
goto auth_response_cb_error_OUT;
}
username = rtm_glib_test_login (priv->rtm_glib, auth_token, &error);
goto auth_response_cb_error_OUT;
}
username = rtm_glib_test_login (priv->rtm_glib, auth_token, &error);
@@
-161,7
+161,7
@@
auth_response_cb (GtkWidget *dialog,
g_free (auth_token);
if (error != NULL) {
g_free (auth_token);
if (error != NULL) {
- g_error ("%s", rtm_error_get_message (error));
+ g_warning ("%s", rtm_error_get_message (error));
goto auth_response_cb_error_OUT;
}
goto auth_response_cb_error_OUT;
}
@@
-170,6
+170,8
@@
auth_response_cb (GtkWidget *dialog,
auth_response_cb_error_OUT:
priv->state = MILK_AUTH_STATE_DISCONNECTED;
auth_response_cb_error_OUT:
priv->state = MILK_AUTH_STATE_DISCONNECTED;
+ /* FIXME: make it possible to re-try, etc. */
+ gtk_main_quit ();
auth_response_cb_OUT:
if (priv->state != previous_state)
auth_response_cb_OUT:
if (priv->state != previous_state)