aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/exchange-operations/exchange-operations.c
diff options
context:
space:
mode:
authorPraveen Kumar <kpraveen@novell.com>2005-07-22 15:48:16 +0800
committerPraveen Kumar <kpraveen@src.gnome.org>2005-07-22 15:48:16 +0800
commit94b079846d701f72043a651d9df2efa90aa6a2d7 (patch)
tree90c33c3cffc7e14e467d070bd8615c7a907b6632 /plugins/exchange-operations/exchange-operations.c
parentf29491124b132b0baf7582f482f749c018661717 (diff)
downloadgsoc2013-evolution-94b079846d701f72043a651d9df2efa90aa6a2d7.tar
gsoc2013-evolution-94b079846d701f72043a651d9df2efa90aa6a2d7.tar.gz
gsoc2013-evolution-94b079846d701f72043a651d9df2efa90aa6a2d7.tar.bz2
gsoc2013-evolution-94b079846d701f72043a651d9df2efa90aa6a2d7.tar.lz
gsoc2013-evolution-94b079846d701f72043a651d9df2efa90aa6a2d7.tar.xz
gsoc2013-evolution-94b079846d701f72043a651d9df2efa90aa6a2d7.tar.zst
gsoc2013-evolution-94b079846d701f72043a651d9df2efa90aa6a2d7.zip
Handling the rename of calendars. This addresses the bug 310433 Removed
2005-07-22 Praveen Kumar <kpraveen@novell.com> * exchange-calendar.c : Handling the rename of calendars. This addresses the bug 310433 * exchange-config-listener.c : Removed the functions add_folder_esource and remove_folder_esource * exchange-contacts.c : Handling the rename of addressbooks. Also modified the way of Exchange addressbook ESource URI handling to be the same way as calendar ESource URI handling * exchange-operations.c (exchange_operations_update_child_esources) : Added new to handle the rename of the ESources of all child folders in the case of parent folder being renamed. * exchange-operations.h : Added prototype for the new function svn path=/trunk/; revision=29842
Diffstat (limited to 'plugins/exchange-operations/exchange-operations.c')
-rw-r--r--plugins/exchange-operations/exchange-operations.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/exchange-operations/exchange-operations.c b/plugins/exchange-operations/exchange-operations.c
index 24756008c9..c3e7eb446f 100644
--- a/plugins/exchange-operations/exchange-operations.c
+++ b/plugins/exchange-operations/exchange-operations.c
@@ -218,3 +218,24 @@ exchange_operations_report_error (ExchangeAccount *account, ExchangeAccountResul
g_free (error_string);
}
+void exchange_operations_update_child_esources (ESource *source, const gchar *old_path, const gchar *new_path)
+{
+ ESourceGroup *group;
+ GSList *sources, *tsource;
+ group = e_source_peek_group (source);
+ sources = e_source_group_peek_sources (group);
+ for (tsource = sources; tsource != NULL; tsource = tsource->next) {
+ gchar *ruri;
+ ruri = e_source_peek_relative_uri (tsource->data);
+ if (g_strrstr (ruri, old_path)) {
+ /* This ESource points to one of the child folders */
+ gchar **tmpv, *truri;
+ /* A nasty search and replace */
+ tmpv = g_strsplit (ruri, old_path, -1);
+ truri = g_strjoinv (new_path, tmpv);
+ e_source_set_relative_uri (tsource->data, truri);
+ g_strfreev (tmpv);
+ g_free (truri);
+ }
+ }
+}