aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2004-04-15 19:16:23 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-04-15 19:16:23 +0800
commit93400cff94b1fd9253cddad531f1069d94e0fffd (patch)
treea13a92d634c168aaa0ea09258c1feffa50040ce6 /calendar/gui
parentbe6c8af7c8875a47fcf745f38c81f21b4bedbc15 (diff)
downloadgsoc2013-evolution-93400cff94b1fd9253cddad531f1069d94e0fffd.tar.gz
gsoc2013-evolution-93400cff94b1fd9253cddad531f1069d94e0fffd.tar.zst
gsoc2013-evolution-93400cff94b1fd9253cddad531f1069d94e0fffd.zip
use the DTSTART for the recur-id if it's not available.
2004-04-15 Rodrigo Moya <rodrigo@ximian.com> * 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
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-calendar-view.c15
-rw-r--r--calendar/gui/migration.c7
2 files changed, 20 insertions, 2 deletions
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)))