aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2006-05-09 01:32:03 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-05-09 01:32:03 +0800
commit9edc8304c9e59cff9f0896433ead1ffdb6580123 (patch)
tree2b16bc5255d3e553b105c221a74b16311e408812
parentd542e6e49123f599088aa06b7acb2327abd2a79e (diff)
downloadgsoc2013-evolution-9edc8304c9e59cff9f0896433ead1ffdb6580123.tar.gz
gsoc2013-evolution-9edc8304c9e59cff9f0896433ead1ffdb6580123.tar.zst
gsoc2013-evolution-9edc8304c9e59cff9f0896433ead1ffdb6580123.zip
Multiple folder support for iPod.
svn path=/trunk/; revision=31960
-rw-r--r--plugins/ipod-sync/ChangeLog7
-rw-r--r--plugins/ipod-sync/ipod-sync.c18
2 files changed, 18 insertions, 7 deletions
diff --git a/plugins/ipod-sync/ChangeLog b/plugins/ipod-sync/ChangeLog
index 56aea24d71..6b61b881df 100644
--- a/plugins/ipod-sync/ChangeLog
+++ b/plugins/ipod-sync/ChangeLog
@@ -1,3 +1,10 @@
+2006-05-08 Srinivasa Ragavan <sragavan@novell.com>
+
+ * ipod-sync.c: (destination_save_addressbook),
+ (destination_save_cal), (org_gnome_sync_calendar),
+ (org_gnome_sync_tasks), (org_gnome_sync_addressbook): Added support
+ for multiple addressbook/calendar/task support for iPod.
+
2005-10-18 Srinivasa Ragavan <sragavan@novell.com>
* Created the iPod sync plugin. It based on Justin Wakes bounty
diff --git a/plugins/ipod-sync/ipod-sync.c b/plugins/ipod-sync/ipod-sync.c
index cdf801765b..fee2d47bf8 100644
--- a/plugins/ipod-sync/ipod-sync.c
+++ b/plugins/ipod-sync/ipod-sync.c
@@ -74,11 +74,12 @@ destination_save_addressbook (EPlugin *ep, EABPopupTargetSource *target)
GnomeVFSHandle *handle;
char *mount = ipod_get_mount();
+ primary_source = e_source_selector_peek_primary_selection (target->selector);
+
/* use g_file api here to build path*/
- dest_uri = g_strdup_printf("%s/%s/%s", mount, "Contacts", "evolution.vcf");
+ dest_uri = g_strdup_printf("%s/%s/Evolution-Addressbook-%s.vcf", mount, "Contacts", e_source_peek_name (primary_source));
g_free (mount);
- primary_source = e_source_selector_peek_primary_selection (target->selector);
uri = e_source_get_uri (primary_source);
book = e_book_new_from_uri (uri, NULL);
@@ -141,12 +142,15 @@ destination_save_cal (EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType
{
FormatHandler *handler = NULL;
char *mount = ipod_get_mount();
- char *dest_uri = NULL;
+ char *dest_uri = NULL, *path;
+ ESource *primary_source = e_source_selector_peek_primary_selection (target->selector);
/* The available formathandlers */
handler= ical_format_handler_new ();
- dest_uri = g_strdup_printf("%s/%s/%s", mount, "Calendars", (type==E_CAL_SOURCE_TYPE_EVENT)? "evolution-calendar.ics":"evolution-todo.ics");
+ path = g_strdup_printf((type==E_CAL_SOURCE_TYPE_EVENT)? "Evolution-Calendar-%s" : "Evolution-Tasks-%s", e_source_peek_name (primary_source));
+ dest_uri = g_strdup_printf("%s/%s/%s.ics", mount, "Calendars", path);
+ g_free (path);
handler->save (handler, ep, target, type, dest_uri);
@@ -161,7 +165,7 @@ void
org_gnome_sync_calendar (EPlugin *ep, ECalPopupTargetSource *target)
{
if (!ipod_check_status(FALSE))
- return;
+ return;
destination_save_cal (ep, target, E_CAL_SOURCE_TYPE_EVENT);
}
@@ -170,7 +174,7 @@ void
org_gnome_sync_tasks (EPlugin *ep, ECalPopupTargetSource *target)
{
if (!ipod_check_status(FALSE))
- return;
+ return;
destination_save_cal (ep, target, E_CAL_SOURCE_TYPE_TODO);
}
@@ -180,7 +184,7 @@ void
org_gnome_sync_addressbook (EPlugin *ep, EABPopupTargetSource *target)
{
if (!ipod_check_status(FALSE))
- return;
+ return;
destination_save_addressbook (ep, target);
}