aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-10-25 16:34:49 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-10-25 16:34:49 +0800
commit871947bc2625efa634bc7e64e38a3cc84396a31d (patch)
treec0be36ba992f428fcef02dfc94729e4c634e184e /calendar
parent8426853c5bce61fb8d5fafa644960d8b578a893b (diff)
downloadgsoc2013-evolution-871947bc2625efa634bc7e64e38a3cc84396a31d.tar
gsoc2013-evolution-871947bc2625efa634bc7e64e38a3cc84396a31d.tar.gz
gsoc2013-evolution-871947bc2625efa634bc7e64e38a3cc84396a31d.tar.bz2
gsoc2013-evolution-871947bc2625efa634bc7e64e38a3cc84396a31d.tar.lz
gsoc2013-evolution-871947bc2625efa634bc7e64e38a3cc84396a31d.tar.xz
gsoc2013-evolution-871947bc2625efa634bc7e64e38a3cc84396a31d.tar.zst
gsoc2013-evolution-871947bc2625efa634bc7e64e38a3cc84396a31d.zip
Handle tasks folders as well; was always using "calendar.ics" as the
2001-10-25 Federico Mena Quintero <federico@ximian.com> * gui/component-factory.c (xfer_folder): Handle tasks folders as well; was always using "calendar.ics" as the filename. svn path=/trunk/; revision=14087
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/calendar-component.c16
-rw-r--r--calendar/gui/component-factory.c16
3 files changed, 33 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 6904c54bd6..8a20ba6655 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-25 Federico Mena Quintero <federico@ximian.com>
+
+ * gui/component-factory.c (xfer_folder): Handle tasks folders as
+ well; was always using "calendar.ics" as the filename.
+
2001-10-24 Damon Chaplin <damon@ximian.com>
* gui/GNOME_Evolution_Calendar.oaf.in: added sections for Tasks
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 60d31590f3..2e7c6945e5 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -416,6 +416,7 @@ xfer_folder (EvolutionShellComponent *shell_component,
GnomeVFSURI *src_uri;
GnomeVFSURI *dest_uri;
GnomeVFSResult result;
+ char *filename, *backup_filename;
CORBA_exception_init (&ev);
@@ -443,9 +444,20 @@ xfer_folder (EvolutionShellComponent *shell_component,
return;
}
- result = xfer_file (src_uri, dest_uri, "calendar.ics", remove_source);
+ if (strcmp (type, FOLDER_CALENDAR) == 0) {
+ filename = "calendar.ics";
+ backup_filename = "calendar.ics~";
+ } else if (strcmp (type, FOLDER_TASKS) == 0) {
+ filename = "tasks.ics";
+ backup_filename = "tasks.ics~";
+ } else {
+ g_assert_not_reached ();
+ return;
+ }
+
+ result = xfer_file (src_uri, dest_uri, filename, remove_source);
if (result == GNOME_Evolution_ShellComponentListener_OK)
- result = xfer_file (src_uri, dest_uri, "calendar.ics~", remove_source);
+ result = xfer_file (src_uri, dest_uri, backup_filename, remove_source);
GNOME_Evolution_ShellComponentListener_notifyResult (listener, result, &ev);
diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c
index 60d31590f3..2e7c6945e5 100644
--- a/calendar/gui/component-factory.c
+++ b/calendar/gui/component-factory.c
@@ -416,6 +416,7 @@ xfer_folder (EvolutionShellComponent *shell_component,
GnomeVFSURI *src_uri;
GnomeVFSURI *dest_uri;
GnomeVFSResult result;
+ char *filename, *backup_filename;
CORBA_exception_init (&ev);
@@ -443,9 +444,20 @@ xfer_folder (EvolutionShellComponent *shell_component,
return;
}
- result = xfer_file (src_uri, dest_uri, "calendar.ics", remove_source);
+ if (strcmp (type, FOLDER_CALENDAR) == 0) {
+ filename = "calendar.ics";
+ backup_filename = "calendar.ics~";
+ } else if (strcmp (type, FOLDER_TASKS) == 0) {
+ filename = "tasks.ics";
+ backup_filename = "tasks.ics~";
+ } else {
+ g_assert_not_reached ();
+ return;
+ }
+
+ result = xfer_file (src_uri, dest_uri, filename, remove_source);
if (result == GNOME_Evolution_ShellComponentListener_OK)
- result = xfer_file (src_uri, dest_uri, "calendar.ics~", remove_source);
+ result = xfer_file (src_uri, dest_uri, backup_filename, remove_source);
GNOME_Evolution_ShellComponentListener_notifyResult (listener, result, &ev);