aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog10
-rw-r--r--addressbook/conduit/address-conduit.c53
-rw-r--r--calendar/ChangeLog11
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c51
-rw-r--r--calendar/conduits/todo/todo-conduit.c51
5 files changed, 65 insertions, 111 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 8aff64f30d..a6002cfeda 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,13 @@
+2000-11-28 JP Rosevear <jpr@helixcode.com>
+
+ * conduit/address-conduit.c (local_record_to_pilot_record): Return
+ a struct rather than a pointer to a struct
+ (view_cb): kill warning
+ (compare): local_record_to_pilot_record now returns a struct
+ (prepare): ditto
+ (free_prepare): remove as per gnome-pilot changes
+ (conduit_get_gpilot_conduit): don't listen for free_prepare signal
+
2000-11-27 JP Rosevear <jpr@helixcode.com>
* conduit/address-conduit.h: Remove "complete" field
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c
index b1b3fa7bdd..45dce1f1ed 100644
--- a/addressbook/conduit/address-conduit.c
+++ b/addressbook/conduit/address-conduit.c
@@ -258,28 +258,25 @@ compute_status (EAddrConduitContext *ctxt, EAddrLocalRecord *local, const char *
local->local.attr = GnomePilotRecordNothing;
}
-static GnomePilotRecord *
+static GnomePilotRecord
local_record_to_pilot_record (EAddrLocalRecord *local,
EAddrConduitContext *ctxt)
{
- GnomePilotRecord *p = NULL;
+ GnomePilotRecord p;
- g_return_val_if_fail (local != NULL, NULL);
g_assert (local->addr != NULL );
LOG ("local_record_to_pilot_record\n");
- p = g_new0 (GnomePilotRecord, 1);
-
- p->ID = local->local.ID;
- p->category = 0;
- p->attr = local->local.attr;
- p->archived = local->local.archived;
- p->secret = local->local.secret;
+ p.ID = local->local.ID;
+ p.category = 0;
+ p.attr = local->local.attr;
+ p.archived = local->local.archived;
+ p.secret = local->local.secret;
/* Generate pilot record structure */
- p->record = g_new0 (char,0xffff);
- p->length = pack_Address (local->addr, p->record, 0xffff);
+ p.record = g_new0 (char,0xffff);
+ p.length = pack_Address (local->addr, p.record, 0xffff);
return p;
}
@@ -558,8 +555,10 @@ sequence_complete (EBookView *book_view, EAddrConduitContext *ctxt)
}
static void
-view_cb (EBook *book, EBookStatus status, EBookView *book_view, EAddrConduitContext *ctxt)
+view_cb (EBook *book, EBookStatus status, EBookView *book_view, gpointer data)
{
+ EAddrConduitContext *ctxt = data;
+
gtk_object_ref (GTK_OBJECT (book_view));
gtk_signal_connect (GTK_OBJECT (book_view), "card_added",
@@ -792,7 +791,7 @@ compare (GnomePilotConduitSyncAbs *conduit,
EAddrConduitContext *ctxt)
{
/* used by the quick compare */
- GnomePilotRecord *local_pilot = NULL;
+ GnomePilotRecord local_pilot;
int retval = 0;
LOG ("compare: local=%s remote=%s...\n",
@@ -802,11 +801,9 @@ compare (GnomePilotConduitSyncAbs *conduit,
g_return_val_if_fail (remote!=NULL,-1);
local_pilot = local_record_to_pilot_record (local, ctxt);
- if (!local_pilot)
- return -1;
- if (remote->length != local_pilot->length
- || memcmp (local_pilot->record, remote->record, remote->length))
+ if (remote->length != local_pilot.length
+ || memcmp (local_pilot.record, remote->record, remote->length))
retval = 1;
if (retval == 0)
@@ -814,8 +811,6 @@ compare (GnomePilotConduitSyncAbs *conduit,
else
LOG (" not equal");
- g_free (local_pilot);
-
return retval;
}
@@ -970,31 +965,16 @@ free_match (GnomePilotConduitSyncAbs *conduit,
static gint
prepare (GnomePilotConduitSyncAbs *conduit,
EAddrLocalRecord *local,
- GnomePilotRecord **remote,
+ GnomePilotRecord *remote,
EAddrConduitContext *ctxt)
{
LOG ("prepare: encoding local %s\n", print_local (local));
*remote = local_record_to_pilot_record (local, ctxt);
- if (!*remote)
- return -1;
-
return 0;
}
-static gint
-free_prepare (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- EAddrConduitContext *ctxt)
-{
- LOG ("free_prepare: freeing\n");
-
- g_return_val_if_fail (remote != NULL, -1);
-
- return 0;
-}
-
static ORBit_MessageValidationResult
accept_all_cookies (CORBA_unsigned_long request_id,
CORBA_Principal *principal,
@@ -1056,7 +1036,6 @@ conduit_get_gpilot_conduit (guint32 pilot_id)
gtk_signal_connect (retval, "free_match", (GtkSignalFunc) free_match, ctxt);
gtk_signal_connect (retval, "prepare", (GtkSignalFunc) prepare, ctxt);
- gtk_signal_connect (retval, "free_prepare", (GtkSignalFunc) free_prepare, ctxt);
return GNOME_PILOT_CONDUIT (retval);
}
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 915c05d014..dfd44495eb 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,14 @@
+2000-11-28 JP Rosevear <jpr@helixcode.com>
+
+ * conduits/todo/todo-conduit.c (local_record_to_pilot_record): Return
+ a struct rather than a pointer to a struct
+ (compare): local_record_to_pilot_record now returns a struct
+ (prepare): ditto
+ (free_prepare): remove as per gnome-pilot changes
+ (conduit_get_gpilot_conduit): don't listen for free_prepare signal
+
+ * conduits/calendar/calendar-conduit.c: Same as above
+
2000-11-28 Federico Mena Quintero <federico@helixcode.com>
* gui/e-calendar-table.c (E_CALENDAR_TABLE_SPEC): Reformatted the
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index 6e903b14f1..41dd1e6cf2 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -53,7 +53,7 @@
GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-#define CONDUIT_VERSION "0.1.0"
+#define CONDUIT_VERSION "0.1.1"
#ifdef G_LOG_DOMAIN
#undef G_LOG_DOMAIN
#endif
@@ -280,29 +280,26 @@ compute_status (ECalConduitContext *ctxt, ECalLocalRecord *local, const char *ui
}
}
-static GnomePilotRecord *
+static GnomePilotRecord
local_record_to_pilot_record (ECalLocalRecord *local,
ECalConduitContext *ctxt)
{
- GnomePilotRecord *p = NULL;
+ GnomePilotRecord p;
- g_return_val_if_fail (local != NULL, NULL);
g_assert (local->comp != NULL);
g_assert (local->appt != NULL );
LOG ("local_record_to_remote_record\n");
- p = g_new0 (GnomePilotRecord, 1);
-
- p->ID = local->local.ID;
- p->category = 0;
- p->attr = local->local.attr;
- p->archived = local->local.archived;
- p->secret = local->local.secret;
+ p.ID = local->local.ID;
+ p.category = 0;
+ p.attr = local->local.attr;
+ p.archived = local->local.archived;
+ p.secret = local->local.secret;
/* Generate pilot record structure */
- p->record = g_new0 (char,0xffff);
- p->length = pack_Appointment (local->appt, p->record, 0xffff);
+ p.record = g_new0 (char, 0xffff);
+ p.length = pack_Appointment (local->appt, p.record, 0xffff);
return p;
}
@@ -875,7 +872,7 @@ compare (GnomePilotConduitSyncAbs *conduit,
ECalConduitContext *ctxt)
{
/* used by the quick compare */
- GnomePilotRecord *local_pilot;
+ GnomePilotRecord local_pilot;
int retval = 0;
LOG ("compare: local=%s remote=%s...\n",
@@ -885,11 +882,9 @@ compare (GnomePilotConduitSyncAbs *conduit,
g_return_val_if_fail (remote!=NULL,-1);
local_pilot = local_record_to_pilot_record (local, ctxt);
- if (!local_pilot)
- return -1;
- if (remote->length != local_pilot->length
- || memcmp (local_pilot->record, remote->record, remote->length))
+ if (remote->length != local_pilot.length
+ || memcmp (local_pilot.record, remote->record, remote->length))
retval = 1;
if (retval == 0)
@@ -897,8 +892,6 @@ compare (GnomePilotConduitSyncAbs *conduit,
else
LOG (" not equal");
- g_free (local_pilot);
-
return retval;
}
@@ -1031,31 +1024,16 @@ free_match (GnomePilotConduitSyncAbs *conduit,
static gint
prepare (GnomePilotConduitSyncAbs *conduit,
ECalLocalRecord *local,
- GnomePilotRecord **remote,
+ GnomePilotRecord *remote,
ECalConduitContext *ctxt)
{
LOG ("prepare: encoding local %s\n", print_local (local));
*remote = local_record_to_pilot_record (local, ctxt);
- if (!*remote)
- return -1;
-
return 0;
}
-static gint
-free_prepare (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- ECalConduitContext *ctxt)
-{
- LOG ("free_prepare: freeing\n");
-
- g_return_val_if_fail (remote != NULL, -1);
-
- return 0;
-}
-
static ORBit_MessageValidationResult
accept_all_cookies (CORBA_unsigned_long request_id,
CORBA_Principal *principal,
@@ -1117,7 +1095,6 @@ conduit_get_gpilot_conduit (guint32 pilot_id)
gtk_signal_connect (retval, "free_match", (GtkSignalFunc) free_match, ctxt);
gtk_signal_connect (retval, "prepare", (GtkSignalFunc) prepare, ctxt);
- gtk_signal_connect (retval, "free_prepare", (GtkSignalFunc) free_prepare, ctxt);
return GNOME_PILOT_CONDUIT (retval);
}
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index 0884af229d..df0d6bfb8e 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -53,7 +53,7 @@
GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-#define CONDUIT_VERSION "0.1.0"
+#define CONDUIT_VERSION "0.1.1"
#ifdef G_LOG_DOMAIN
#undef G_LOG_DOMAIN
#endif
@@ -259,29 +259,26 @@ compute_status (EToDoConduitContext *ctxt, EToDoLocalRecord *local, const char *
}
}
-static GnomePilotRecord *
+static GnomePilotRecord
local_record_to_pilot_record (EToDoLocalRecord *local,
EToDoConduitContext *ctxt)
{
- GnomePilotRecord *p = NULL;
+ GnomePilotRecord p;
- g_return_val_if_fail (local != NULL, NULL);
g_assert (local->comp != NULL);
g_assert (local->todo != NULL );
LOG ("local_record_to_pilot_record\n");
- p = g_new0 (GnomePilotRecord, 1);
-
- p->ID = local->local.ID;
- p->category = 0;
- p->attr = local->local.attr;
- p->archived = local->local.archived;
- p->secret = local->local.secret;
+ p.ID = local->local.ID;
+ p.category = 0;
+ p.attr = local->local.attr;
+ p.archived = local->local.archived;
+ p.secret = local->local.secret;
/* Generate pilot record structure */
- p->record = g_new0 (char,0xffff);
- p->length = pack_ToDo (local->todo, p->record, 0xffff);
+ p.record = g_new0 (char, 0xffff);
+ p.length = pack_ToDo (local->todo, p.record, 0xffff);
return p;
}
@@ -749,7 +746,7 @@ compare (GnomePilotConduitSyncAbs *conduit,
EToDoConduitContext *ctxt)
{
/* used by the quick compare */
- GnomePilotRecord *local_pilot;
+ GnomePilotRecord local_pilot;
int retval = 0;
LOG ("compare: local=%s remote=%s...\n",
@@ -759,11 +756,9 @@ compare (GnomePilotConduitSyncAbs *conduit,
g_return_val_if_fail (remote!=NULL,-1);
local_pilot = local_record_to_pilot_record (local, ctxt);
- if (!local_pilot)
- return -1;
- if (remote->length != local_pilot->length
- || memcmp (local_pilot->record, remote->record, remote->length))
+ if (remote->length != local_pilot.length
+ || memcmp (local_pilot.record, remote->record, remote->length))
retval = 1;
if (retval == 0)
@@ -771,8 +766,6 @@ compare (GnomePilotConduitSyncAbs *conduit,
else
LOG (" not equal");
- g_free (local_pilot);
-
return retval;
}
@@ -905,31 +898,16 @@ free_match (GnomePilotConduitSyncAbs *conduit,
static gint
prepare (GnomePilotConduitSyncAbs *conduit,
EToDoLocalRecord *local,
- GnomePilotRecord **remote,
+ GnomePilotRecord *remote,
EToDoConduitContext *ctxt)
{
LOG ("prepare: encoding local %s\n", print_local (local));
*remote = local_record_to_pilot_record (local, ctxt);
- if (!*remote)
- return -1;
-
return 0;
}
-static gint
-free_prepare (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- EToDoConduitContext *ctxt)
-{
- LOG ("free_prepare: freeing\n");
-
- g_return_val_if_fail (remote != NULL, -1);
-
- return 0;
-}
-
static ORBit_MessageValidationResult
accept_all_cookies (CORBA_unsigned_long request_id,
CORBA_Principal *principal,
@@ -991,7 +969,6 @@ conduit_get_gpilot_conduit (guint32 pilot_id)
gtk_signal_connect (retval, "free_match", (GtkSignalFunc) free_match, ctxt);
gtk_signal_connect (retval, "prepare", (GtkSignalFunc) prepare, ctxt);
- gtk_signal_connect (retval, "free_prepare", (GtkSignalFunc) free_prepare, ctxt);
return GNOME_PILOT_CONDUIT (retval);
}