From 93400cff94b1fd9253cddad531f1069d94e0fffd Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 15 Apr 2004 11:16:23 +0000 Subject: use the DTSTART for the recur-id if it's not available. 2004-04-15 Rodrigo Moya * gui/e-calendar-view.c (e_calendar_view_delete_selected_occurrence): use the DTSTART for the recur-id if it's not available. svn path=/trunk/; revision=25476 --- calendar/gui/e-calendar-view.c | 15 +++++++++++++-- calendar/gui/migration.c | 7 +++++++ 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index d9a2681a72..f6736ee34a 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -866,8 +866,19 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view) e_cal_component_get_uid (comp, &uid); if (e_cal_component_is_instance (comp)) rid = e_cal_component_get_recurid_as_string (comp); - else - rid = ""; + else { + ECalComponentDateTime dt; + + /* get the RECUR-ID from the start date */ + e_cal_component_get_dtstart (comp, &dt); + if (dt.value) { + rid = icaltime_as_ical_string (*dt.value); + e_cal_component_free_datetime (&dt); + } else { + g_object_unref (comp); + return; + } + } if (delete_component_dialog (comp, FALSE, 1, e_cal_component_get_vtype (comp), GTK_WIDGET (cal_view))) { diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c index e4534b1243..c2f94cf574 100644 --- a/calendar/gui/migration.c +++ b/calendar/gui/migration.c @@ -351,6 +351,7 @@ migrate_ical_folder (char *old_path, ESourceGroup *dest_group, char *source_name #define WEBCAL_BASE_URI "webcal://" #define CONTACTS_BASE_URI "contacts://" +#define BAD_CONTACTS_BASE_URI "contact://" #define PERSONAL_RELATIVE_URI "system" static ESourceGroup * @@ -404,6 +405,12 @@ create_calendar_sources (CalendarComponent *component, group = E_SOURCE_GROUP (g->data); + if (!strcmp (BAD_CONTACTS_BASE_URI, e_source_group_peek_base_uri (group))) + e_source_group_set_base_uri (group, CONTACTS_BASE_URI); + + if (!strcmp (base_uri, e_source_group_peek_base_uri (group))) + e_source_group_set_base_uri (group, base_uri_proto); + if (!*on_this_computer && !strcmp (base_uri_proto, e_source_group_peek_base_uri (group))) *on_this_computer = g_object_ref (group); else if (!*on_the_web && !strcmp (WEBCAL_BASE_URI, e_source_group_peek_base_uri (group))) -- cgit v1.2.3