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
1=== modified file 'libubuntuone/u1-music-store.c'
2--- libubuntuone/u1-music-store.c 2010-08-11 08:26:23 +0000
3+++ libubuntuone/u1-music-store.c 2010-09-01 14:48:12 +0000
4@@ -464,7 +464,23 @@
5 SyncdaemonAuthentication *auth;
6
7 if (music_store->priv->auth_retries > MAXIMUM_AUTH_RETRIES) {
8- g_debug ("Maximum number of authentication retries reached, not firing authentication");
9+ GtkWidget *dialog;
10+ gchar *home_url;
11+
12+ /* Tell the user authentication has failed */
13+ dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (music_store))),
14+ 0,
15+ GTK_MESSAGE_ERROR,
16+ GTK_BUTTONS_CLOSE,
17+ _("Authentication to the music store failed"));
18+ gtk_dialog_run (GTK_DIALOG (dialog));
19+ gtk_widget_destroy (dialog);
20+
21+ /* And move back to the store's home page */
22+ home_url = g_strdup_printf ("%s%s", music_store->priv->base_url, U1_NOT_LOGGED_IN_STORE_URL);
23+ webkit_web_view_open (WEBKIT_WEB_VIEW (music_store->priv->web_viewer), home_url);
24+ g_free (home_url);
25+
26 return;
27 }
28

Subscribers

People subscribed via source and target branches