diff options
-rw-r--r-- | addressbook/ChangeLog | 3 | ||||
-rw-r--r-- | addressbook/conduit/address-conduit.c | 8 | ||||
-rw-r--r-- | e-util/ChangeLog | 5 | ||||
-rw-r--r-- | e-util/e-pilot-util.c | 6 |
4 files changed, 19 insertions, 3 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index c566b860de..c284d479ec 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -4,6 +4,9 @@ functions instead of trying to *directly* access the the data structures my self (post_sync): Put in hack to prevent syncing the same records twice + (local_record_from_uid): set the card id when creating a blank one + (add_record): Set the id of the card we have and don't go to the + server to get the latest version 2000-12-19 JP Rosevear <jpr@helixcode.com> diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index 8208d2ba8f..b31cb61c6e 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -158,7 +158,7 @@ add_card_cb (EBook *ebook, EBookStatus status, const char *id, gpointer closure) cons->status = status; cons->id = g_strdup (id); - + gtk_main_quit(); } @@ -372,6 +372,7 @@ local_record_from_uid (EAddrLocalRecord *local, local_record_from_ecard (local, ecard, ctxt); } else { ecard = e_card_new (""); + ecard_set_id (ecard, uid); local_record_from_ecard (local, ecard, ctxt); } } @@ -667,6 +668,7 @@ post_sync (GnomePilotConduit *conduit, change_id = g_strdup_printf ("pilot-sync-evolution-addressbook-%d", ctxt->cfg->pilot_id); e_book_get_changes (ctxt->ebook, change_id, view_cb, ctxt); g_free (change_id); + gtk_main (); return 0; } @@ -851,8 +853,8 @@ add_record (GnomePilotConduitSyncAbs *conduit, return -1; } - ctxt->cards = g_list_append (ctxt->cards, - e_book_get_card (ctxt->ebook, cons.id)); + e_card_set_id (ecard, cons.id); + ctxt->cards = g_list_append (ctxt->cards, ecard); g_free (cons.id); e_pilot_map_insert (ctxt->map, remote->ID, ecard->id, FALSE); diff --git a/e-util/ChangeLog b/e-util/ChangeLog index acfa209e41..dbb96628d6 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,8 @@ +2000-12-20 JP Rosevear <jpr@helixcode.com> + + * e-pilot-util.c (e_pilot_utf8_to_pchar): Check for null strings + (e_pilot_utf8_from_pchar): ditto + 2000-12-19 JP Rosevear <jpr@helixcode.com> * e-pilot-util.c (e_pilot_utf8_to_pchar): Convert utf8 strings to diff --git a/e-util/e-pilot-util.c b/e-util/e-pilot-util.c index 93bf9aa1b2..58c6937b8c 100644 --- a/e-util/e-pilot-util.c +++ b/e-util/e-pilot-util.c @@ -32,6 +32,9 @@ e_pilot_utf8_to_pchar (const char *string) { char *pstring = NULL; int res; + + if (!string) + return NULL; res = convert_ToPilotChar ("UTF8", string, strlen (string), &pstring); @@ -46,6 +49,9 @@ e_pilot_utf8_from_pchar (const char *string) { char *ustring = NULL; int res; + + if (!string) + return NULL; res = convert_FromPilotChar ("UTF8", string, strlen (string), &ustring); |