aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs
diff options
context:
space:
mode:
authorSeth Alves <alves@src.gnome.org>2000-06-07 05:56:20 +0800
committerSeth Alves <alves@src.gnome.org>2000-06-07 05:56:20 +0800
commitc219c79496fca669af1ae093a660a1ce4d81a682 (patch)
treef93a2842d0914f396b5a2872ed48536cbfec1f91 /calendar/pcs
parenta8b296282e5f93562c85b00b11d006b0eb7f1653 (diff)
downloadgsoc2013-evolution-c219c79496fca669af1ae093a660a1ce4d81a682.tar
gsoc2013-evolution-c219c79496fca669af1ae093a660a1ce4d81a682.tar.gz
gsoc2013-evolution-c219c79496fca669af1ae093a660a1ce4d81a682.tar.bz2
gsoc2013-evolution-c219c79496fca669af1ae093a660a1ce4d81a682.tar.lz
gsoc2013-evolution-c219c79496fca669af1ae093a660a1ce4d81a682.tar.xz
gsoc2013-evolution-c219c79496fca669af1ae093a660a1ce4d81a682.tar.zst
gsoc2013-evolution-c219c79496fca669af1ae093a660a1ce4d81a682.zip
fixed a bunch of problems use libical instead of libversit
* cal-util/icalendar.c, icalendar-save.c: fixed a bunch of problems * cal-util/calobj.c (ical_object_find_in_string): use libical instead of libversit (ical_object_to_string): same (dump_icalobject): prints the contents of an icalobject for debugging * gui/Makefile.am (LINK_FLAGS): link libical.a instead of libical.la so we don't have to modify the build system of the released libical * cal-client/Makefile.am (client_test_LDADD): same * cal-util/Makefile.am (icalendar_test_LDADD): same svn path=/trunk/; revision=3446
Diffstat (limited to 'calendar/pcs')
-rw-r--r--calendar/pcs/Makefile.am18
-rw-r--r--calendar/pcs/cal-backend-imc.c2
-rw-r--r--calendar/pcs/icalendar-save.c89
3 files changed, 49 insertions, 60 deletions
diff --git a/calendar/pcs/Makefile.am b/calendar/pcs/Makefile.am
index 919630bb98..3299d15908 100644
--- a/calendar/pcs/Makefile.am
+++ b/calendar/pcs/Makefile.am
@@ -34,29 +34,11 @@ libpcs_a_SOURCES = \
cal-common.h \
cal-factory.c \
cal-factory.h \
- icalendar.c \
- icalendar.h \
- icalendar-save.c \
- icalendar-save.h \
job.c \
job.h
-noinst_PROGRAMS = icalendar-test
-
-icalendar_test_SOURCES = \
- icalendar-test.c \
- icalendar.c \
- icalendar-save.c
-
-icalendar_test_LDADD = \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/libical/src/libical/libical.la
-
-# $(top_builddir)/calendar/cal-util/libcal-util.la \
-
diff --git a/calendar/pcs/cal-backend-imc.c b/calendar/pcs/cal-backend-imc.c
index 46c8f0dba0..a85c8ce535 100644
--- a/calendar/pcs/cal-backend-imc.c
+++ b/calendar/pcs/cal-backend-imc.c
@@ -24,7 +24,7 @@
#include <config.h>
#include <gtk/gtksignal.h>
#include "cal-backend-imc.h"
-#include "icalendar.h"
+#include "cal-util/icalendar.h"
diff --git a/calendar/pcs/icalendar-save.c b/calendar/pcs/icalendar-save.c
index 8fae9a02f5..8f2335763f 100644
--- a/calendar/pcs/icalendar-save.c
+++ b/calendar/pcs/icalendar-save.c
@@ -311,7 +311,8 @@ struct icaltimetype timet_to_icaltime (time_t tt)
struct tm *t;
struct icaltimetype i;
- t = gmtime (&tt);
+ //t = gmtime (&tt);
+ t = localtime (&tt);
/*return tt - (i->is_utc ? timezone : 0); */
i.is_utc = 0;
@@ -351,52 +352,58 @@ void unparse_person (iCalPerson *person, icalproperty *person_prop)
icalproperty_add_parameter (person_prop, param);
}
- if (g_strcasecmp (person->role, "CHAIR") == 0)
- param = icalparameter_new_role (ICAL_ROLE_CHAIR);
- else if (g_strcasecmp (person->role, "REQPARTICIPANT") == 0)
- param = icalparameter_new_role (ICAL_ROLE_REQPARTICIPANT);
- else if (g_strcasecmp (person->role, "OPTPARTICIPANT") == 0)
- param = icalparameter_new_role (ICAL_ROLE_OPTPARTICIPANT);
- else if (g_strcasecmp (person->role, "NONPARTICIPANT") == 0)
- param = icalparameter_new_role (ICAL_ROLE_NONPARTICIPANT);
- else
- param = icalparameter_new_role (ICAL_ROLE_XNAME);
- icalproperty_add_parameter (person_prop, param);
-
- if (g_strcasecmp (person->partstat, "NEEDSACTION") == 0)
- param = icalparameter_new_partstat (ICAL_PARTSTAT_NEEDSACTION);
- else if (g_strcasecmp (person->partstat, "ACCEPTED") == 0)
- param = icalparameter_new_partstat (ICAL_PARTSTAT_ACCEPTED);
- else if (g_strcasecmp (person->partstat, "DECLINED") == 0)
- param = icalparameter_new_partstat (ICAL_PARTSTAT_DECLINED);
- else if (g_strcasecmp (person->partstat, "TENTATIVE") == 0)
- param = icalparameter_new_partstat (ICAL_PARTSTAT_TENTATIVE);
- else if (g_strcasecmp (person->partstat, "DELEGATED") == 0)
- param = icalparameter_new_partstat (ICAL_PARTSTAT_DELEGATED);
- else if (g_strcasecmp (person->partstat, "COMPLETED") == 0)
- param = icalparameter_new_partstat (ICAL_PARTSTAT_COMPLETED);
- else if (g_strcasecmp (person->partstat, "INPROCESS") == 0)
- param = icalparameter_new_partstat (ICAL_PARTSTAT_INPROCESS);
- else /* FIX ME, NEEDSACTION instead? */
- param = icalparameter_new_partstat (ICAL_PARTSTAT_XNAME);
- icalproperty_add_parameter (person_prop, param);
+ if (person->role) {
+ if (g_strcasecmp (person->role, "CHAIR") == 0)
+ param = icalparameter_new_role (ICAL_ROLE_CHAIR);
+ else if (g_strcasecmp (person->role, "REQPARTICIPANT") == 0)
+ param = icalparameter_new_role (ICAL_ROLE_REQPARTICIPANT);
+ else if (g_strcasecmp (person->role, "OPTPARTICIPANT") == 0)
+ param = icalparameter_new_role (ICAL_ROLE_OPTPARTICIPANT);
+ else if (g_strcasecmp (person->role, "NONPARTICIPANT") == 0)
+ param = icalparameter_new_role (ICAL_ROLE_NONPARTICIPANT);
+ else
+ param = icalparameter_new_role (ICAL_ROLE_XNAME);
+ icalproperty_add_parameter (person_prop, param);
+ }
+
+ if (person->partstat) {
+ if (g_strcasecmp (person->partstat, "NEEDSACTION") == 0)
+ param = icalparameter_new_partstat (ICAL_PARTSTAT_NEEDSACTION);
+ else if (g_strcasecmp (person->partstat, "ACCEPTED") == 0)
+ param = icalparameter_new_partstat (ICAL_PARTSTAT_ACCEPTED);
+ else if (g_strcasecmp (person->partstat, "DECLINED") == 0)
+ param = icalparameter_new_partstat (ICAL_PARTSTAT_DECLINED);
+ else if (g_strcasecmp (person->partstat, "TENTATIVE") == 0)
+ param = icalparameter_new_partstat (ICAL_PARTSTAT_TENTATIVE);
+ else if (g_strcasecmp (person->partstat, "DELEGATED") == 0)
+ param = icalparameter_new_partstat (ICAL_PARTSTAT_DELEGATED);
+ else if (g_strcasecmp (person->partstat, "COMPLETED") == 0)
+ param = icalparameter_new_partstat (ICAL_PARTSTAT_COMPLETED);
+ else if (g_strcasecmp (person->partstat, "INPROCESS") == 0)
+ param = icalparameter_new_partstat (ICAL_PARTSTAT_INPROCESS);
+ else /* FIX ME, NEEDSACTION instead? */
+ param = icalparameter_new_partstat (ICAL_PARTSTAT_XNAME);
+ icalproperty_add_parameter (person_prop, param);
+ }
if (person->rsvp != FALSE) {
param = icalparameter_new_rsvp (TRUE);
icalproperty_add_parameter (person_prop, param);
}
- if (g_strcasecmp (person->cutype, "INDIVIDUAL") == 0)
- param = icalparameter_new_cutype (ICAL_CUTYPE_INDIVIDUAL);
- else if (g_strcasecmp (person->cutype, "GROUP") == 0)
- param = icalparameter_new_cutype (ICAL_CUTYPE_GROUP);
- else if (g_strcasecmp (person->cutype, "RESOURCE") == 0)
- param = icalparameter_new_cutype (ICAL_CUTYPE_RESOURCE);
- else if (g_strcasecmp (person->cutype, "ROOM") == 0)
- param = icalparameter_new_cutype (ICAL_CUTYPE_ROOM);
- else /* FIX ME, INDIVIDUAL instead? */
- param = icalparameter_new_cutype (ICAL_CUTYPE_UNKNOWN);
- icalproperty_add_parameter (person_prop, param);
+ if (person->cutype) {
+ if (g_strcasecmp (person->cutype, "INDIVIDUAL") == 0)
+ param = icalparameter_new_cutype (ICAL_CUTYPE_INDIVIDUAL);
+ else if (g_strcasecmp (person->cutype, "GROUP") == 0)
+ param = icalparameter_new_cutype (ICAL_CUTYPE_GROUP);
+ else if (g_strcasecmp (person->cutype, "RESOURCE") == 0)
+ param = icalparameter_new_cutype (ICAL_CUTYPE_RESOURCE);
+ else if (g_strcasecmp (person->cutype, "ROOM") == 0)
+ param = icalparameter_new_cutype (ICAL_CUTYPE_ROOM);
+ else /* FIX ME, INDIVIDUAL instead? */
+ param = icalparameter_new_cutype (ICAL_CUTYPE_UNKNOWN);
+ icalproperty_add_parameter (person_prop, param);
+ }
/* person->member is a list of ICAL_MEMBER_PARAMETER */
for (cur = person->member; cur; cur = cur->next) {