GNOME Bugzilla – Bug 761766
Online account status shows "on" when credentials have expired
Last modified: 2017-04-17 18:20:40 UTC
Testing 3.19.x with GNOME Continuous from four days ago: I set up my Google account during initial setup. When I launched Calendar for the first time, I was surprised that it didn't show any events. When I checked the calendar settings, it showed my Google account as "On". I later checked the online account settings, which indicated that the credentials had expired for the account. There are several bugs here. One of them is that Calendar should indicate if the credentials have expired for an online account.
Created attachment 344579 [details] [review] show "Attention needed" if account is inaccessible This shows "Attention Needed" instead of "On"/"Off" if account credentials have expired and human interaction is needed.
Review of attachment 344579 [details] [review]: The code is simple, and I like that. The commit message needs to be adjusted to reflect this review. Also, the commit title is not quite following GNOME Calendar's style. See [1] for reference. [1] https://git.gnome.org/browse/gnome-calendar/log/?h=wip/gbsneto/quick-add-popover ::: src/gcal-source-dialog.c @@ +2023,3 @@ gtk_label_set_label (GTK_LABEL (account_label), goa_account_get_identity (account)); gtk_label_set_label (GTK_LABEL (enabled_label), + goa_account_get_attention_needed (account) ? _("Attention Needed") : You should check if the account is expired, and show an "Expired" label instead.
Created attachment 347489 [details] [review] gcal-source-dialog: Change label to "Expired" if account credentials expired Earlier Calendar showed an account as "on" even when the credentials had expired. This patch fixes the issue and instead shows "Expired" label upon expiration of credentials.
Comment on attachment 347489 [details] [review] gcal-source-dialog: Change label to "Expired" if account credentials expired >From 6b9617a448e06db4135c81bb79df7a7fc4ec63c4 Mon Sep 17 00:00:00 2001 >From: Yash Singh <yashdev10p@gmail.com> >Date: Wed, 8 Mar 2017 20:15:41 +0530 >Subject: [PATCH] source-dialog: Change label to "Expired" if account > credentials expired > >Earlier Calendar showed an account as "on" even when the credentials had expired. >This patch fixes the issue and instead shows "Expired" label upon expiration >of credentials. > >https://bugzilla.gnome.org/show_bug.cgi?id=761766 >--- > src/gcal-source-dialog.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c >index ad90f85..d48d0de 100644 >--- a/src/gcal-source-dialog.c >+++ b/src/gcal-source-dialog.c >@@ -2051,6 +2051,7 @@ add_goa_account (GcalSourceDialog *dialog, > gtk_label_set_label (GTK_LABEL (provider_label), goa_account_get_provider_name (account)); > gtk_label_set_label (GTK_LABEL (account_label), goa_account_get_identity (account)); > gtk_label_set_label (GTK_LABEL (enabled_label), >+ goa_account_get_attention_needed (account) ? _("Expired") : > goa_account_get_calendar_disabled (account) ? _("Off") : _("On")); > gtk_image_set_from_icon_name (GTK_IMAGE (icon), icon_name, GTK_ICON_SIZE_DIALOG); > gtk_image_set_pixel_size (GTK_IMAGE (icon), 32); >-- >2.9.3
Created attachment 347627 [details] [review] source-dialog: Change label to "Expired" if account credentials expired Earlier Calendar showed an account as "on" even when the credentials had expired. This patch fixes the issue and instead shows "Expired" label upon expiration of credentials.
Created attachment 347758 [details] [review] source-dialog: change label to "Expired" if account credentials expire Earlier Calendar showed an account as "on" even when the credentials had expired. This patch fixes the issue and instead shows "Expired" label upon expiration of credentials.
Review of attachment 347758 [details] [review]: Looks good.
Thanks for the patch. Attachment 347758 [details] pushed as 7e68bfb - source-dialog: change label to "Expired" if account credentials expire