From aad95f711ac77ec640f250449453aed0a522a2ed Mon Sep 17 00:00:00 2001 From: Gilles Dartiguelongue Date: Sat, 17 Nov 2007 22:11:53 +0000 Subject: ** Fix bug #495872 uniformization of actions with memos/calendars/tasks svn path=/trunk/; revision=34547 --- plugins/ipod-sync/ChangeLog | 9 +++++++ plugins/ipod-sync/ipod-sync.c | 25 ++++++++++++++++++- .../org-gnome-ipod-sync-evolution.eplug.xml | 11 +++++---- plugins/ipod-sync/sync.c | 28 ++++++++++++++++++++++ plugins/mark-calendar-offline/ChangeLog | 9 +++++++ .../mark-calendar-offline/mark-calendar-offline.c | 8 +++---- .../org-gnome-mark-calendar-offline.eplug.xml | 21 ++++++++++++---- plugins/save-calendar/ChangeLog | 8 +++++++ .../org-gnome-save-calendar.eplug.xml | 9 +++++-- plugins/save-calendar/save-calendar.c | 7 ++++++ plugins/select-one-source/ChangeLog | 7 ++++++ .../org-gnome-select-one-source.eplug.xml | 3 +++ 12 files changed, 130 insertions(+), 15 deletions(-) diff --git a/plugins/ipod-sync/ChangeLog b/plugins/ipod-sync/ChangeLog index 5d792691c2..2c0b42a170 100644 --- a/plugins/ipod-sync/ChangeLog +++ b/plugins/ipod-sync/ChangeLog @@ -1,3 +1,12 @@ +2007-11-11 Gilles Dartiguelongue + + ** Fix bug #495872 + + * ipod-sync.c: (org_gnome_sync_memos): + * org-gnome-ipod-sync-evolution.eplug.xml: + * sync.c: (export_memos), (export_to_ipod): + add memo support + 2007-10-26 Kjartan Maraas * evolution-ipod-sync.c: (ipod_check_status): Don't mix code 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) diff --git a/plugins/ipod-sync/org-gnome-ipod-sync-evolution.eplug.xml b/plugins/ipod-sync/org-gnome-ipod-sync-evolution.eplug.xml index 3f17ef5f98..6e3afa8037 100644 --- a/plugins/ipod-sync/org-gnome-ipod-sync-evolution.eplug.xml +++ b/plugins/ipod-sync/org-gnome-ipod-sync-evolution.eplug.xml @@ -4,19 +4,22 @@ _name="iPod Synchronization" location="@PLUGINDIR@/liborg-gnome-ipod-sync-evolution@SOEXT@"> - <_description>Synchronize the selected task/calendar/addressbook with Apple iPod + <_description>Synchronize the selected task/memo/calendar/addressbook with Apple iPod - + - + + + + - + diff --git a/plugins/ipod-sync/sync.c b/plugins/ipod-sync/sync.c index b826dca5f3..fe0fa9af9d 100644 --- a/plugins/ipod-sync/sync.c +++ b/plugins/ipod-sync/sync.c @@ -24,6 +24,7 @@ #define EBOOK_SOURCE_LIST "/apps/evolution/addressbook/sources" #define ECAL_SOURCE_LIST "/apps/evolution/calendar/sources" #define ETASK_SOURCE_LIST "/apps/evolution/tasks/sources" +#define EMEMO_SOURCE_LIST "/apps/evolution/memos/sources" extern GtkWidget *progress_bar; extern IPod ipod_info; @@ -392,6 +393,30 @@ export_tasks (void) pulse (); } +/* Attempt to export the memo list(s). */ +static void +export_memos (void) +{ + GSList *uris; + GString *data; + + pulse (); + + uris = get_source_uris_for_type (EMEMO_SOURCE_LIST); + + pulse (); + + data = uri_list_to_vcal_string (uris, E_CAL_SOURCE_TYPE_JOURNAL); + + write_to_ipod (data, "/Calendars/", "evolution-memo.ics"); + + g_string_free (data, TRUE); + + free_uri_list (uris); + + pulse (); +} + void export_to_ipod (void) { @@ -406,6 +431,9 @@ export_to_ipod (void) if (ipod_info.tasks == TRUE) export_tasks (); + if (ipod_info.memos == TRUE) + export_memos (); + pulse (); sync (); pulse (); diff --git a/plugins/mark-calendar-offline/ChangeLog b/plugins/mark-calendar-offline/ChangeLog index cb95a16aa0..989a282ea2 100644 --- a/plugins/mark-calendar-offline/ChangeLog +++ b/plugins/mark-calendar-offline/ChangeLog @@ -1,3 +1,12 @@ +2007-11-11 Gilles Dartiguelongue + + ** Fix bug #495872 + + * mark-calendar-offline.c: (org_gnome_mark_no_offline), + (org_gnome_mark_offline): + * org-gnome-mark-calendar-offline.eplug.xml: + add tasks and memos support + 2007-04-02 Sankar P * Committed on behalf of Gilles Dartiguelongue diff --git a/plugins/mark-calendar-offline/mark-calendar-offline.c b/plugins/mark-calendar-offline/mark-calendar-offline.c index fee8595883..d9e6714de6 100644 --- a/plugins/mark-calendar-offline/mark-calendar-offline.c +++ b/plugins/mark-calendar-offline/mark-calendar-offline.c @@ -31,11 +31,11 @@ #include #include -void org_gnome_mark_calendar_offline (EPlugin *ep, ECalPopupTargetSource *target); -void org_gnome_mark_calendar_no_offline (EPlugin *ep, ECalPopupTargetSource *target); +void org_gnome_mark_offline (EPlugin *ep, ECalPopupTargetSource *target); +void org_gnome_mark_no_offline (EPlugin *ep, ECalPopupTargetSource *target); void -org_gnome_mark_calendar_no_offline (EPlugin *ep, ECalPopupTargetSource *target) +org_gnome_mark_no_offline (EPlugin *ep, ECalPopupTargetSource *target) { ESource *source; @@ -44,7 +44,7 @@ org_gnome_mark_calendar_no_offline (EPlugin *ep, ECalPopupTargetSource *target) } void -org_gnome_mark_calendar_offline (EPlugin *ep, ECalPopupTargetSource *target) +org_gnome_mark_offline (EPlugin *ep, ECalPopupTargetSource *target) { ESource *source; diff --git a/plugins/mark-calendar-offline/org-gnome-mark-calendar-offline.eplug.xml b/plugins/mark-calendar-offline/org-gnome-mark-calendar-offline.eplug.xml index ecf5b67d60..bde9805396 100644 --- a/plugins/mark-calendar-offline/org-gnome-mark-calendar-offline.eplug.xml +++ b/plugins/mark-calendar-offline/org-gnome-mark-calendar-offline.eplug.xml @@ -8,13 +8,26 @@ - + - - - + + + + + + + + + + + + + + + + diff --git a/plugins/save-calendar/ChangeLog b/plugins/save-calendar/ChangeLog index 43d58eb51d..635d326a1e 100644 --- a/plugins/save-calendar/ChangeLog +++ b/plugins/save-calendar/ChangeLog @@ -1,3 +1,11 @@ +2007-11-11 Gilles Dartiguelongue + + ** Fix bug #495872 + + * org-gnome-save-calendar.eplug.xml: + * save-calendar.c: (org_gnome_save_memos): + add memo support + 2007-09-27 Matthew Barnes ** Fixes part of bug #477045 diff --git a/plugins/save-calendar/org-gnome-save-calendar.eplug.xml b/plugins/save-calendar/org-gnome-save-calendar.eplug.xml index 85f7b2c1b6..a548b25245 100644 --- a/plugins/save-calendar/org-gnome-save-calendar.eplug.xml +++ b/plugins/save-calendar/org-gnome-save-calendar.eplug.xml @@ -8,10 +8,15 @@ - + + - + + + + + diff --git a/plugins/save-calendar/save-calendar.c b/plugins/save-calendar/save-calendar.c index bd5dff3f06..f65dd64a5f 100644 --- a/plugins/save-calendar/save-calendar.c +++ b/plugins/save-calendar/save-calendar.c @@ -51,6 +51,7 @@ enum { /* GtkComboBox enum */ void org_gnome_save_calendar (EPlugin *ep, ECalPopupTargetSource *target); void org_gnome_save_tasks (EPlugin *ep, ECalPopupTargetSource *target); +void org_gnome_save_memos (EPlugin *ep, ECalPopupTargetSource *target); static void @@ -218,3 +219,9 @@ org_gnome_save_tasks (EPlugin *ep, ECalPopupTargetSource *target) { ask_destination_and_save (ep, target, E_CAL_SOURCE_TYPE_TODO); } + +void +org_gnome_save_memos (EPlugin *ep, ECalPopupTargetSource *target) +{ + ask_destination_and_save (ep, target, E_CAL_SOURCE_TYPE_JOURNAL); +} diff --git a/plugins/select-one-source/ChangeLog b/plugins/select-one-source/ChangeLog index 1f85177a4f..c190550d6e 100644 --- a/plugins/select-one-source/ChangeLog +++ b/plugins/select-one-source/ChangeLog @@ -1,3 +1,10 @@ +2007-11-11 Gilles Dartiguelongue + + ** Fix bug #495872 + + * org-gnome-select-one-source.eplug.xml: + add right-click menu item for memo component + 2007-04-02 Sankar P * Committed on behalf of Gilles Dartiguelongue diff --git a/plugins/select-one-source/org-gnome-select-one-source.eplug.xml b/plugins/select-one-source/org-gnome-select-one-source.eplug.xml index 01320ce792..cfde40c2c9 100644 --- a/plugins/select-one-source/org-gnome-select-one-source.eplug.xml +++ b/plugins/select-one-source/org-gnome-select-one-source.eplug.xml @@ -10,6 +10,9 @@ + + + -- cgit v1.2.3