aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2006-06-13 18:15:40 +0800
committerSushma Rai <rsushma@src.gnome.org>2006-06-13 18:15:40 +0800
commit48de88a67be654a4dda40c3d01ded14b6bcc7bea (patch)
tree62b0bb61b5ea1a6073d778cefcfbab6e75a17ff1
parent2511403367518c17d1b74fd18d14926981a432ce (diff)
downloadgsoc2013-evolution-48de88a67be654a4dda40c3d01ded14b6bcc7bea.tar.gz
gsoc2013-evolution-48de88a67be654a4dda40c3d01ded14b6bcc7bea.tar.zst
gsoc2013-evolution-48de88a67be654a4dda40c3d01ded14b6bcc7bea.zip
Defined and using new error code for displayig offline state of Evolution.
Fixes #344270. svn path=/trunk/; revision=32127
-rw-r--r--plugins/exchange-operations/ChangeLog11
-rw-r--r--plugins/exchange-operations/exchange-folder.c25
-rw-r--r--plugins/exchange-operations/org-gnome-exchange-operations.error.xml5
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 <rsushma@novell.com>
+
+ * 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 <rsushma@novell.com>
* 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.</_secondary>
</error>
+ <error id="account-offline-generic" type="info">
+ <_primary>Exchange Account is offline.</_primary>
+ <_secondary>Cannot perform the operation.</_secondary>
+ </error>
+
<error id="password-incorrect" type="error">
<_primary>Could not authenticate to server.</_primary>
<_secondary>Make sure the username and password are correct and try again.</_secondary>