diff options
author | Gilles Dartiguelongue <gdartigu@src.gnome.org> | 2007-11-18 06:11:53 +0800 |
---|---|---|
committer | Gilles Dartiguelongue <gdartigu@src.gnome.org> | 2007-11-18 06:11:53 +0800 |
commit | aad95f711ac77ec640f250449453aed0a522a2ed (patch) | |
tree | c1103edc1eceafa4f2258ce0206c0cc380bacba5 /plugins/ipod-sync/ipod-sync.c | |
parent | dd92a1c0e4f9d13ad58d4d1a0d7367a85e4bd038 (diff) | |
download | gsoc2013-evolution-aad95f711ac77ec640f250449453aed0a522a2ed.tar gsoc2013-evolution-aad95f711ac77ec640f250449453aed0a522a2ed.tar.gz gsoc2013-evolution-aad95f711ac77ec640f250449453aed0a522a2ed.tar.bz2 gsoc2013-evolution-aad95f711ac77ec640f250449453aed0a522a2ed.tar.lz gsoc2013-evolution-aad95f711ac77ec640f250449453aed0a522a2ed.tar.xz gsoc2013-evolution-aad95f711ac77ec640f250449453aed0a522a2ed.tar.zst gsoc2013-evolution-aad95f711ac77ec640f250449453aed0a522a2ed.zip |
** Fix bug #495872
uniformization of actions with memos/calendars/tasks
svn path=/trunk/; revision=34547
Diffstat (limited to 'plugins/ipod-sync/ipod-sync.c')
-rw-r--r-- | plugins/ipod-sync/ipod-sync.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/plugins/ipod-sync/ipod-sync.c b/plugins/ipod-sync/ipod-sync.c index dd89b34e8f..43eaf30dd9 100644 --- a/plugins/ipod-sync/ipod-sync.c +++ b/plugins/ipod-sync/ipod-sync.c @@ -48,6 +48,7 @@ void org_gnome_sync_calendar (EPlugin *ep, ECalPopupTargetSource *target); void org_gnome_sync_tasks (EPlugin *ep, ECalPopupTargetSource *target); +void org_gnome_sync_memos (EPlugin *ep, ECalPopupTargetSource *target); void org_gnome_sync_addressbook (EPlugin *ep, EABPopupTargetSource *target); @@ -148,7 +149,21 @@ destination_save_cal (EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType /* The available formathandlers */ handler= ical_format_handler_new (); - path = g_strdup_printf((type==E_CAL_SOURCE_TYPE_EVENT)? "Evolution-Calendar-%s" : "Evolution-Tasks-%s", e_source_peek_name (primary_source)); + switch (type) { + case E_CAL_SOURCE_TYPE_EVENT: + path = g_strdup_printf ("Evolution-Calendar-%s", e_source_peek_name (primary_source)); + break; + case E_CAL_SOURCE_TYPE_TODO: + path = g_strdup_printf ("Evolution-Tasks-%s", e_source_peek_name (primary_source)); + break; + case E_CAL_SOURCE_TYPE_JOURNAL: + path = g_strdup_printf ("Evolution-Tasks-%s", e_source_peek_name (primary_source)); + break; + default: + path = NULL; + g_assert_not_reached (); + } + dest_uri = g_strdup_printf("%s/%s/%s.ics", mount, "Calendars", path); g_free (path); @@ -179,6 +194,14 @@ org_gnome_sync_tasks (EPlugin *ep, ECalPopupTargetSource *target) destination_save_cal (ep, target, E_CAL_SOURCE_TYPE_TODO); } +void +org_gnome_sync_memos (EPlugin *ep, ECalPopupTargetSource *target) +{ + if (!ipod_check_status(FALSE)) + return; + + destination_save_cal (ep, target, E_CAL_SOURCE_TYPE_JOURNAL); +} void org_gnome_sync_addressbook (EPlugin *ep, EABPopupTargetSource *target) |