aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/pas
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/backend/pas')
-rw-r--r--addressbook/backend/pas/Makefile.am1
-rw-r--r--addressbook/backend/pas/pas-backend-file.c23
-rw-r--r--addressbook/backend/pas/pas-book-view.c2
3 files changed, 22 insertions, 4 deletions
diff --git a/addressbook/backend/pas/Makefile.am b/addressbook/backend/pas/Makefile.am
index b8e478f1b3..62207b5963 100644
--- a/addressbook/backend/pas/Makefile.am
+++ b/addressbook/backend/pas/Makefile.am
@@ -24,6 +24,7 @@ INCLUDES = \
-I.. \
-I$(top_builddir) \
-I$(includedir) \
+ -I$(top_srcdir)/addressbook/backend/ebook \
$(GNOME_INCLUDEDIR)
gnome_libs = \
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index 935dab19d5..0dcf745d38 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -19,6 +19,7 @@
#include <pas-backend-file.h>
#include <pas-book.h>
#include <pas-card-cursor.h>
+#include <e-card.h>
#define PAS_BACKEND_FILE_VERSION_NAME "PAS-DB-VERSION"
#define PAS_BACKEND_FILE_VERSION "0.1"
@@ -153,11 +154,20 @@ pas_backend_file_process_create_card (PASBackend *backend,
int db_error;
char *id;
GList *list;
+ ECard *card;
+ char *vcard;
id = pas_backend_file_create_unique_id (req->vcard);
string_to_dbt (id, &id_dbt);
- string_to_dbt (req->vcard, &vcard_dbt);
+
+ card = e_card_new(req->vcard);
+ e_card_set_id(card, id);
+ vcard = e_card_get_vcard(card);
+ gtk_object_unref(GTK_OBJECT(card));
+ card = NULL;
+
+ string_to_dbt (vcard, &vcard_dbt);
db_error = db->put (db, &id_dbt, &vcard_dbt, 0);
@@ -187,6 +197,7 @@ pas_backend_file_process_create_card (PASBackend *backend,
}
g_free (id);
+ g_free (vcard);
g_free (req->vcard);
}
@@ -239,8 +250,13 @@ pas_backend_file_process_modify_card (PASBackend *backend,
DBT id_dbt, vcard_dbt;
int db_error;
GList *list;
+ ECard *card;
+ char *id;
- string_to_dbt (req->id, &id_dbt);
+ card = e_card_new(req->vcard);
+ id = e_card_get_id(card);
+
+ string_to_dbt (id, &id_dbt);
string_to_dbt (req->vcard, &vcard_dbt);
db_error = db->put (db, &id_dbt, &vcard_dbt, 0);
@@ -253,7 +269,7 @@ pas_backend_file_process_modify_card (PASBackend *backend,
/* else if (card changes to match view->search )
pas_book_view_notify_add_1 (view->book_view, req->vcard);
else if (card changes to not match view->search )
- pas_book_view_notify_remove (view->book_view, req->id);
+ pas_book_view_notify_remove (view->book_view, id);
*/
}
@@ -271,6 +287,7 @@ pas_backend_file_process_modify_card (PASBackend *backend,
Evolution_BookListener_CardNotFound);
}
+ gtk_object_unref(GTK_OBJECT(card));
g_free (req->vcard);
}
diff --git a/addressbook/backend/pas/pas-book-view.c b/addressbook/backend/pas/pas-book-view.c
index f712cc8ccf..e59028f88a 100644
--- a/addressbook/backend/pas/pas-book-view.c
+++ b/addressbook/backend/pas/pas-book-view.c
@@ -33,7 +33,7 @@ pas_book_view_notify_change (PASBookView *book_view,
card_sequence._length = length;
for ( i = 0; cards; cards = g_list_next(cards), i++ ) {
- card_sequence._buffer[i] = (char *) cards->data;
+ card_sequence._buffer[i] = CORBA_string_dup((char *) cards->data);
}
CORBA_exception_init (&ev);
r>* Update to 6.14.3eadler2012-01-132-3/+3 * Both of these ports have been BROKEN for nearly a year; it is time to get rid...eadler2012-01-089-66/+0 * - These two ports will soon be deleted so remove them from the meta port.eadler2012-01-081-2/+0 * - Connect xf86-video-intel29 to the buildpav2011-11-181-0/+1 * - Remove WITH_FBSD10_FIX, is no longer neededmiwi2011-11-0949-49/+0 * - Fix build on FreeBSD 10.0miwi2011-10-2949-5/+49 * Remove more tags from pkg-descr files fo the form:dougb2011-10-243-9/+0 * - Return my ports back to the pool. I was unable to make any fixes tostas2011-10-241-1/+1 * Update to 6.14.2.kwm2011-07-193-46/+3 * Add a patch to UMS supportkwm2011-03-272-0/+43 * - Update to 6.14.1miwi2011-03-254-59/+3 * - Get Rid MD5 supportmiwi2011-03-1933-34/+0 * Remove patch that is causing trouble for users of specific ATI cards.kwm2011-03-092-12/+1 * Replace a custom ARCH check in Mk/bsd.xorg.mk for xf86-video-sunffb withkwm2011-03-012-1/+1 * - Restore BROKEN does not buildmiwi2011-02-284-0/+8 * - Fix fetchmiwi2011-02-272-1/+1 * Update distinfo to unbreak build.kwm2011-02-261-3/+2 * - Add some missing patchesmiwi2011-02-263-0/+67 * - Connect xf86-video-ati613 to the buildmiwi2011-02-261-0/+1 * - Bump PORTREVISION after xorg updatemiwi2011-02-261-7/+2 * - Bump PORTREVISION after xorg updatemiwi2011-02-261-1/+0 * - Please welcome Xorg 7.5.1miwi2011-02-26