aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-02-05 05:31:58 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-02-05 05:31:58 +0800
commit18372290242a13cee9cc64c50c054d07f9494be4 (patch)
tree6db567940c63431374c3c91755ddbc885cf540f6 /calendar
parentc67eedfff0ab44e481f538eabe2caa53f5911935 (diff)
downloadgsoc2013-evolution-18372290242a13cee9cc64c50c054d07f9494be4.tar
gsoc2013-evolution-18372290242a13cee9cc64c50c054d07f9494be4.tar.gz
gsoc2013-evolution-18372290242a13cee9cc64c50c054d07f9494be4.tar.bz2
gsoc2013-evolution-18372290242a13cee9cc64c50c054d07f9494be4.tar.lz
gsoc2013-evolution-18372290242a13cee9cc64c50c054d07f9494be4.tar.xz
gsoc2013-evolution-18372290242a13cee9cc64c50c054d07f9494be4.tar.zst
gsoc2013-evolution-18372290242a13cee9cc64c50c054d07f9494be4.zip
use new cal auth functions
2004-02-04 JP Rosevear <jpr@ximian.com> * importers/icalendar-importer.c (gnome_calendar_import_data_fn): use new cal auth functions * common/authentication.c (auth_new_cal_from_default): get a default calendar with auth * common/authentication.h: add proto svn path=/trunk/; revision=24621
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog10
-rw-r--r--calendar/common/authentication.c12
-rw-r--r--calendar/common/authentication.h1
-rw-r--r--calendar/importers/icalendar-importer.c12
4 files changed, 26 insertions, 9 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index d6fa2e80c3..e65c820df4 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,15 @@
2004-02-04 JP Rosevear <jpr@ximian.com>
+ * importers/icalendar-importer.c (gnome_calendar_import_data_fn):
+ use new cal auth functions
+
+ * common/authentication.c (auth_new_cal_from_default): get a
+ default calendar with auth
+
+ * common/authentication.h: add proto
+
+2004-02-04 JP Rosevear <jpr@ximian.com>
+
* importers/icalendar-importer.c (importer_destroy_cb): we only
have a single client to free
(prepare_events): make the vtodo list optional
diff --git a/calendar/common/authentication.c b/calendar/common/authentication.c
index ba0eae2893..fa2be5323d 100644
--- a/calendar/common/authentication.c
+++ b/calendar/common/authentication.c
@@ -37,6 +37,18 @@ auth_func_cb (ECal *ecal, const char *prompt, const char *key, gpointer user_dat
}
ECal *
+auth_new_cal_from_default (ECalSourceType type)
+{
+ ECal *ecal = NULL;
+
+ if (!e_cal_open_default (&ecal, type, auth_func_cb, NULL, NULL))
+ return NULL;
+
+
+ return ecal;
+}
+
+ECal *
auth_new_cal_from_source (ESource *source, ECalSourceType type)
{
ECal *cal;
diff --git a/calendar/common/authentication.h b/calendar/common/authentication.h
index cc022a12dd..2f8af70ace 100644
--- a/calendar/common/authentication.h
+++ b/calendar/common/authentication.h
@@ -27,6 +27,7 @@
#include <libedataserver/e-source.h>
#include <libecal/e-cal.h>
+ECal *auth_new_cal_from_default (ECalSourceType type);
ECal *auth_new_cal_from_source (ESource *source, ECalSourceType type);
ECal *auth_new_cal_from_uri (const char *uri, ECalSourceType type);
diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c
index 69e0e554c8..118c0aaa19 100644
--- a/calendar/importers/icalendar-importer.c
+++ b/calendar/importers/icalendar-importer.c
@@ -607,21 +607,15 @@ gnome_calendar_import_data_fn (EvolutionIntelligentImporter *ii,
return;
}
- /* FIXME */
/* Try to open the default calendar & tasks folders. */
if (ici->do_calendar) {
- if (!e_cal_open_default (&calendar_client, E_CAL_SOURCE_TYPE_EVENT, NULL))
- goto out;
-
- if (!e_cal_open (calendar_client, FALSE, NULL))
+ calendar_client = auth_new_cal_from_default (E_CAL_SOURCE_TYPE_EVENT);
goto out;
}
if (ici->do_tasks) {
- if (!e_cal_open_default (&tasks_client, E_CAL_SOURCE_TYPE_TODO, NULL))
- goto out;
-
- if (!e_cal_open (tasks_client, FALSE, NULL))
+ tasks_client = auth_new_cal_from_default (E_CAL_SOURCE_TYPE_TODO);
+ if (!tasks_client)
goto out;
}