From 48de88a67be654a4dda40c3d01ded14b6bcc7bea Mon Sep 17 00:00:00 2001 From: Sushma Rai Date: Tue, 13 Jun 2006 10:15:40 +0000 Subject: Defined and using new error code for displayig offline state of Evolution. Fixes #344270. svn path=/trunk/; revision=32127 --- plugins/exchange-operations/ChangeLog | 11 ++++++++++ plugins/exchange-operations/exchange-folder.c | 25 ++++++---------------- .../org-gnome-exchange-operations.error.xml | 5 +++++ 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index 013f49c359..cb48b6fced 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -1,3 +1,14 @@ +2006-06-13 Sushma Rai + + * org-gnome-exchange-operations.error.xml: defined a new error code and + error string, for displaying in offline state. + + * exchange-folder.c (org_gnome_exchange_folder_ab_unsubscribe): Display + proper error in offline mode. + (org_gnome_exchange_folder_unsubscribe): Similar. + (org_gnome_exchange_folder_subscription): Similar. + Fixes #344270. + 2006-06-07 Sushma Rai * exchange-folder-subscription.c (create_folder_subscription_dialog): diff --git a/plugins/exchange-operations/exchange-folder.c b/plugins/exchange-operations/exchange-folder.c index 5ff5a2ba42..ccdbec2841 100644 --- a/plugins/exchange-operations/exchange-folder.c +++ b/plugins/exchange-operations/exchange-folder.c @@ -446,12 +446,7 @@ org_gnome_exchange_folder_ab_unsubscribe (EPopup *ep, EPopupItem *p, void *data) g_warning ("Config listener not found"); return; } else if (mode == OFFLINE_MODE) { - g_warning ("Unsubscribe to Other User's Folder is not allowed in Offline mode\n"); - /* FIXME: - I think throwing an error dialog is not allowed - because of UI freeze. - e_error_run (NULL, ERROR_DOMAIN ":folder-offline-error", NULL); - */ + e_error_run (NULL, ERROR_DOMAIN ":account-offline-generic", NULL); return; } @@ -506,12 +501,7 @@ org_gnome_exchange_folder_unsubscribe (EPopup *ep, EPopupItem *p, void *data) g_warning ("Config listener not found"); return; } else if (mode == OFFLINE_MODE) { - g_warning ("Unsubscribe to Other User's Folder is not allowed in Offline mode\n"); - /* FIXME: - I think throwing an error dialog is not allowed - because of UI freeze. - e_error_run (NULL, ERROR_DOMAIN ":folder-offline-error", NULL); - */ + e_error_run (NULL, ERROR_DOMAIN ":account-offline-generic", NULL); return; } @@ -562,12 +552,11 @@ org_gnome_exchange_folder_subscription (EPlugin *ep, EMMenuTargetSelect *target, return; } else if (mode == OFFLINE_MODE) { - g_warning ("Subscribe to Other User's Folder is not allowed in Offline mode\n"); - /* FIXME: - I think throwing an error dialog is not allowed - because of UI freeze. - e_error_run (NULL, ERROR_DOMAIN ":folder-offline-error", NULL); - */ + /* Translators: this error code can be used for any operation + * (like subscribing to other user's folders, unsubscribing + * etc,) which can not be performed in offline mode + */ + e_error_run (NULL, ERROR_DOMAIN ":account-offline-generic", NULL); return; } diff --git a/plugins/exchange-operations/org-gnome-exchange-operations.error.xml b/plugins/exchange-operations/org-gnome-exchange-operations.error.xml index a6326f8a2c..adbb2010cd 100644 --- a/plugins/exchange-operations/org-gnome-exchange-operations.error.xml +++ b/plugins/exchange-operations/org-gnome-exchange-operations.error.xml @@ -48,6 +48,11 @@ <_secondary>Cannot display folders. + + <_primary>Exchange Account is offline. + <_secondary>Cannot perform the operation. + + <_primary>Could not authenticate to server. <_secondary>Make sure the username and password are correct and try again. -- cgit v1.2.3