aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-12-20 07:09:31 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-12-20 07:09:31 +0800
commitfff1110610062f03b1cc7ffee1c3e076cfe61bdd (patch)
treeaa80a27955ff482b7c2924a766c0b9512b8b55da /calendar
parent739f0eda9d6a00377350fc343a640e999d8e9255 (diff)
downloadgsoc2013-evolution-fff1110610062f03b1cc7ffee1c3e076cfe61bdd.tar.gz
gsoc2013-evolution-fff1110610062f03b1cc7ffee1c3e076cfe61bdd.tar.zst
gsoc2013-evolution-fff1110610062f03b1cc7ffee1c3e076cfe61bdd.zip
Convert cal component strings to pilot character set
2000-12-19 JP Rosevear <jpr@helixcode.com> * conduits/calendar/calendar-conduit.c (local_record_from_comp): Convert cal component strings to pilot character set (comp_from_remote_record): vice versa * conduits/todo/todo-conduit.c: Same as above 2000-12-19 JP Rosevear <jpr@helixcode.com> * conduit/address-conduit.c (local_record_from_ecard): Convert ecard strings to pilot encodings 2000-12-19 JP Rosevear <jpr@helixcode.com> * e-pilot-util.c (e_pilot_utf8_to_pchar): Convert utf8 strings to pilot character set (e_pilot_utf8_from_pchar): vice versa * Makefile.am: Conditionally build e-pilot-util.[hc] because they depend on pilot-link stuff svn path=/trunk/; revision=7090
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c21
-rw-r--r--calendar/conduits/todo/todo-conduit.c23
3 files changed, 25 insertions, 27 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index e84c8615b0..3dd356e39d 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2000-12-19 JP Rosevear <jpr@helixcode.com>
+
+ * conduits/calendar/calendar-conduit.c (local_record_from_comp):
+ Convert cal component strings to pilot character set
+ (comp_from_remote_record): vice versa
+
+ * conduits/todo/todo-conduit.c: Same as above
+
2000-12-19 Federico Mena Quintero <federico@helixcode.com>
* pcs/cal-backend-file.c (compute_alarm_range): Fix confusion in
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index da3a9f2fab..45f4aa0a08 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -23,16 +23,9 @@
*/
#include <config.h>
-#include <sys/stat.h>
-#include <utime.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <signal.h>
-#include <errno.h>
#include <liboaf/liboaf.h>
#include <bonobo.h>
-#include <gnome-xml/parser.h>
#include <cal-client/cal-client-types.h>
#include <cal-client/cal-client.h>
#include <cal-util/timeutil.h>
@@ -40,8 +33,8 @@
#include <pi-socket.h>
#include <pi-file.h>
#include <pi-dlp.h>
-#include <pi-version.h>
#include <libical/src/libical/icaltypes.h>
+#include <e-pilot-util.h>
#define CAL_CONFIG_LOAD 1
#define CAL_CONFIG_DESTROY 1
@@ -54,7 +47,7 @@
GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-#define CONDUIT_VERSION "0.1.3"
+#define CONDUIT_VERSION "0.1.4"
#ifdef G_LOG_DOMAIN
#undef G_LOG_DOMAIN
#endif
@@ -375,13 +368,13 @@ local_record_from_comp (ECalLocalRecord *local, CalComponent *comp, ECalConduitC
uses free to deallocate */
cal_component_get_summary (comp, &summary);
if (summary.value)
- local->appt->description = strdup ((char *) summary.value);
+ local->appt->description = e_pilot_utf8_to_pchar (summary.value);
cal_component_get_description_list (comp, &d_list);
if (d_list) {
description = (CalComponentText *) d_list->data;
if (description && description->value)
- local->appt->note = strdup (description->value);
+ local->appt->note = e_pilot_utf8_to_pchar (description->value);
else
local->appt->note = NULL;
} else {
@@ -540,8 +533,9 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
cal_component_set_last_modified (comp, &now);
- summary.value = appt.description;
+ summary.value = e_pilot_utf8_from_pchar (appt.description);
cal_component_set_summary (comp, &summary);
+ free (summary.value);
/* The iCal description field */
if (!appt.note) {
@@ -550,12 +544,13 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
GSList l;
CalComponentText text;
- text.value = appt.note;
+ text.value = e_pilot_utf8_from_pchar (appt.note);
text.altrep = NULL;
l.data = &text;
l.next = NULL;
cal_component_set_description_list (comp, &l);
+ free (text.value);
}
if (!is_empty_time (appt.begin)) {
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index 2ef5bc0b76..09676cee73 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -23,16 +23,9 @@
*/
#include <config.h>
-#include <sys/stat.h>
-#include <utime.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <signal.h>
-#include <errno.h>
#include <liboaf/liboaf.h>
#include <bonobo.h>
-#include <gnome-xml/parser.h>
#include <cal-client/cal-client-types.h>
#include <cal-client/cal-client.h>
#include <cal-util/timeutil.h>
@@ -40,8 +33,8 @@
#include <pi-socket.h>
#include <pi-file.h>
#include <pi-dlp.h>
-#include <pi-version.h>
#include <libical/src/libical/icaltypes.h>
+#include <e-pilot-util.h>
#define TODO_CONFIG_LOAD 1
#define TODO_CONFIG_DESTROY 1
@@ -54,7 +47,7 @@
GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-#define CONDUIT_VERSION "0.1.2"
+#define CONDUIT_VERSION "0.1.3"
#ifdef G_LOG_DOMAIN
#undef G_LOG_DOMAIN
#endif
@@ -318,13 +311,13 @@ local_record_from_comp (EToDoLocalRecord *local, CalComponent *comp, EToDoCondui
uses free to deallocate */
cal_component_get_summary (comp, &summary);
if (summary.value)
- local->todo->description = strdup ((char *) summary.value);
+ local->todo->description = e_pilot_utf8_to_pchar (summary.value);
cal_component_get_description_list (comp, &d_list);
if (d_list) {
description = (CalComponentText *) d_list->data;
if (description && description->value)
- local->todo->note = strdup (description->value);
+ local->todo->note = e_pilot_utf8_to_pchar (description->value);
else
local->todo->note = NULL;
} else {
@@ -415,9 +408,10 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
cal_component_set_last_modified (comp, &now);
- summary.value = todo.description;
+ summary.value = e_pilot_utf8_from_pchar (todo.description);
cal_component_set_summary (comp, &summary);
-
+ free (summary.value);
+
/* The iCal description field */
if (!todo.note) {
cal_component_set_comment_list (comp, NULL);
@@ -425,12 +419,13 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
GSList l;
CalComponentText text;
- text.value = todo.note;
+ text.value = e_pilot_utf8_from_pchar (todo.note);
text.altrep = NULL;
l.data = &text;
l.next = NULL;
cal_component_set_description_list (comp, &l);
+ free (text.value);
}
if (todo.complete) {