Merge lp:~rodrigo-moya/libubuntuone/fix-615832 into lp:libubuntuone

Proposed by Rodrigo Moya
Status: Merged
Approved by: Alejandro J. Cura
Approved revision: 100
Merged at revision: 100
Proposed branch: lp:~rodrigo-moya/libubuntuone/fix-615832
Merge into: lp:libubuntuone
Diff against target: 27 lines (+17/-1)
1 file modified
libubuntuone/u1-music-store.c (+17/-1)
To merge this branch: bzr merge lp:~rodrigo-moya/libubuntuone/fix-615832
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
John Lenton (community) Approve
Review via email: mp+34283@code.launchpad.net

Commit message

Show an error dialog when we can't authenticate

Description of the change

Show an error dialog when we can't authenticate

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) :
review: Approve
Revision history for this message
Alejandro J. Cura (alecu) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libubuntuone/u1-music-store.c'
--- libubuntuone/u1-music-store.c 2010-08-11 08:26:23 +0000
+++ libubuntuone/u1-music-store.c 2010-09-01 14:48:12 +0000
@@ -464,7 +464,23 @@
464 SyncdaemonAuthentication *auth;464 SyncdaemonAuthentication *auth;
465465
466 if (music_store->priv->auth_retries > MAXIMUM_AUTH_RETRIES) {466 if (music_store->priv->auth_retries > MAXIMUM_AUTH_RETRIES) {
467 g_debug ("Maximum number of authentication retries reached, not firing authentication");467 GtkWidget *dialog;
468 gchar *home_url;
469
470 /* Tell the user authentication has failed */
471 dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (music_store))),
472 0,
473 GTK_MESSAGE_ERROR,
474 GTK_BUTTONS_CLOSE,
475 _("Authentication to the music store failed"));
476 gtk_dialog_run (GTK_DIALOG (dialog));
477 gtk_widget_destroy (dialog);
478
479 /* And move back to the store's home page */
480 home_url = g_strdup_printf ("%s%s", music_store->priv->base_url, U1_NOT_LOGGED_IN_STORE_URL);
481 webkit_web_view_open (WEBKIT_WEB_VIEW (music_store->priv->web_viewer), home_url);
482 g_free (home_url);
483
468 return;484 return;
469 }485 }
470486

Subscribers

People subscribed via source and target branches