aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-memos.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-01-15 23:07:46 +0800
committerMilan Crha <mcrha@src.gnome.org>2009-01-15 23:07:46 +0800
commit19265d6114dbc5ab7b4cc78a38dcafde13f37789 (patch)
tree68bfcede15a75c43186828ee6adc3a2b91cdbf78 /calendar/gui/e-memos.c
parent9a69a192221d827f263e6972b9f07031b62676ef (diff)
downloadgsoc2013-evolution-19265d6114dbc5ab7b4cc78a38dcafde13f37789.tar
gsoc2013-evolution-19265d6114dbc5ab7b4cc78a38dcafde13f37789.tar.gz
gsoc2013-evolution-19265d6114dbc5ab7b4cc78a38dcafde13f37789.tar.bz2
gsoc2013-evolution-19265d6114dbc5ab7b4cc78a38dcafde13f37789.tar.lz
gsoc2013-evolution-19265d6114dbc5ab7b4cc78a38dcafde13f37789.tar.xz
gsoc2013-evolution-19265d6114dbc5ab7b4cc78a38dcafde13f37789.tar.zst
gsoc2013-evolution-19265d6114dbc5ab7b4cc78a38dcafde13f37789.zip
** Fix for bug #303738
2009-01-15 Milan Crha <mcrha@redhat.com> ** Fix for bug #303738 * gui/gnome-cal.c: (client_cal_opened_cb), (default_client_cal_opened_cb): * gui/e-memos.c: (client_cal_opened_cb), (default_client_cal_opened_cb): * gui/e-tasks.c: (client_cal_opened_cb), (default_client_cal_opened_cb): Forget password on AuthFailed or AuthRequired and try to reopen on AuthFailed status, which will ask for a password again. * gui/comp-editor-factory.c: (cal_opened_cb): Show "Authentication Required" on such status returned. * common/authentication.c: (auth_cal_forget_password): Do not free memory which hold ECal. Also always forget password for calendar with the URL key. svn path=/trunk/; revision=37080
Diffstat (limited to 'calendar/gui/e-memos.c')
-rw-r--r--calendar/gui/e-memos.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/calendar/gui/e-memos.c b/calendar/gui/e-memos.c
index a8c5b41b2b..89c9c8ad1e 100644
--- a/calendar/gui/e-memos.c
+++ b/calendar/gui/e-memos.c
@@ -802,6 +802,9 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, EMemos *memos)
source = e_cal_get_source (ecal);
+ if (status == E_CALENDAR_STATUS_AUTHENTICATION_FAILED || status == E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED)
+ auth_cal_forget_password (ecal);
+
switch (status) {
case E_CALENDAR_STATUS_OK :
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, client_cal_opened_cb, NULL);
@@ -813,11 +816,14 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, EMemos *memos)
set_timezone (memos);
set_status_message (memos, NULL);
break;
+ case E_CALENDAR_STATUS_AUTHENTICATION_FAILED:
+ /* try to reopen calendar - it'll ask for a password once again */
+ e_cal_open_async (ecal, FALSE);
+ return;
case E_CALENDAR_STATUS_BUSY :
break;
case E_CALENDAR_STATUS_REPOSITORY_OFFLINE:
e_error_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (memos))), "calendar:prompt-no-contents-offline-memos", NULL);
- break;
default :
/* Make sure the source doesn't disappear on us */
g_object_ref (source);
@@ -849,6 +855,9 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, EMemos *memos)
source = e_cal_get_source (ecal);
+ if (status == E_CALENDAR_STATUS_AUTHENTICATION_FAILED || status == E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED)
+ auth_cal_forget_password (ecal);
+
switch (status) {
case E_CALENDAR_STATUS_OK :
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, default_client_cal_opened_cb, NULL);
@@ -858,6 +867,10 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, EMemos *memos)
e_cal_model_set_default_client (model, ecal);
set_status_message (memos, NULL);
break;
+ case E_CALENDAR_STATUS_AUTHENTICATION_FAILED:
+ /* try to reopen calendar - it'll ask for a password once again */
+ e_cal_open_async (ecal, FALSE);
+ return;
case E_CALENDAR_STATUS_BUSY:
break;
default :