Re: [evolution-patches] patch for #60289 (calendar)
- From: Rodrigo Moya <rodrigo novell com>
- To: Evolution Patches <evolution-patches lists ximian com>
- Subject: Re: [evolution-patches] patch for #60289 (calendar)
- Date: Thu, 08 Jul 2004 17:56:59 +0200
On Wed, 2004-07-07 at 13:58 +0200, Rodrigo Moya wrote:
> These 2 patches fix #60289
once again, updated patch for the evolution part, now everything's
working for me.
cheers
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2436
diff -u -p -r1.2436 ChangeLog
--- ChangeLog 6 Jul 2004 15:10:16 -0000 1.2436
+++ ChangeLog 7 Jul 2004 16:10:01 -0000
@@ -1,3 +1,15 @@
+2004-07-07 Rodrigo Moya <rodrigo novell com>
+
+ Fixes #60289
+
+ * gui/dialogs/select-source-dialog.c (select_source_dialog): set the
+ absolute URI on the selected source, so that the ESource we keep
+ around has a valid URI.
+
+ * gui/e-calendar-view.c (transfer_item_to): when copying appointments,
+ change the UID.
+ (transfer_selected_items): don't pass hardcoded values to transfer_item_to.
+
2004-07-06 Rodrigo Moya <rodrigo novell com>
* gui/gnome-cal.c (gnome_calendar_init): setup the widgets before
Index: gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.58
diff -u -p -r1.58 e-calendar-view.c
--- gui/e-calendar-view.c 6 Jul 2004 13:53:00 -0000 1.58
+++ gui/e-calendar-view.c 7 Jul 2004 16:10:02 -0000
@@ -1113,12 +1113,25 @@ transfer_item_to (ECalendarViewEvent *ev
if (!e_cal_modify_object (dest_client, event->comp_data->icalcomp, CALOBJ_MOD_ALL, NULL))
return;
} else {
+ orig_icalcomp = icalcomponent_new_clone (event->comp_data->icalcomp);
+
+ if (!remove_item) {
+ /* change the UID to avoid problems with duplicated UIDs */
+ new_uid = e_cal_component_gen_uid ();
+ icalcomponent_set_uid (orig_icalcomp, new_uid);
+
+ g_free (new_uid);
+ }
+
new_uid = NULL;
- if (!e_cal_create_object (dest_client, event->comp_data->icalcomp, &new_uid, NULL))
+ if (!e_cal_create_object (dest_client, orig_icalcomp, &new_uid, NULL)) {
+ icalcomponent_free (orig_icalcomp);
return;
+ }
if (new_uid)
g_free (new_uid);
+ icalcomponent_free (orig_icalcomp);
}
/* remove the item from the source calendar */
@@ -1158,7 +1171,7 @@ transfer_selected_items (ECalendarView *
e_calendar_view_set_status_message (cal_view, _("Copying items"));
for (l = selected; l != NULL; l = l->next)
- transfer_item_to ((ECalendarViewEvent *) l->data, dest_client, TRUE);
+ transfer_item_to ((ECalendarViewEvent *) l->data, dest_client, remove_item);
e_calendar_view_set_status_message (cal_view, NULL);
Index: gui/dialogs/select-source-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/select-source-dialog.c,v
retrieving revision 1.9
diff -u -p -r1.9 select-source-dialog.c
--- gui/dialogs/select-source-dialog.c 21 Jun 2004 21:10:47 -0000 1.9
+++ gui/dialogs/select-source-dialog.c 7 Jul 2004 16:10:02 -0000
@@ -156,7 +156,18 @@ select_source_dialog (GtkWindow *parent,
g_list_free (icon_list);
}
- if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_OK) {
+ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
+ if (selected_source) {
+ char *absolute_uri;
+
+ /* set the absolute URI on the source we keep around, since the group
+ will be unrefed */
+ absolute_uri = e_source_build_absolute_uri (selected_source);
+ e_source_set_absolute_uri (selected_source, (const char *) absolute_uri);
+
+ g_free (absolute_uri);
+ }
+ } else {
if (selected_source)
g_object_unref (selected_source);
selected_source = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]