Re: [Evolution-hackers] how to attach addressbook?
- From: 黄冠能 <huang guanneng gd-linux com>
- To: evolution-hackers gnome org
- Subject: Re: [Evolution-hackers] how to attach addressbook?
- Date: Mon, 14 Aug 2006 14:14:07 +0800
I have solved problem myself:)
I should add the following calling to the end of the codes
e_source_list_sync(sources, NULL);
Now, I can import the addressbook programmely.
Cameron Wong
> Hi,
>
> After reading part of the source Evolution, I know I should call
> functions in e-book.h and some other relative. I can import contact to
> system addressbook now. I want to create a new addressbook, the
> procedure is as follow:
>
> ----- part of the source -----
> EBook *newBook = e_book_new_from_uri (uri, NULL);
> e_book_open(newBook, FALSE, NULL);
> e_book_add_contact(newBook, contact, NULL);
> ESource *newBookSource = e_book_get_source(newBook);
> e_source_set_name(newBookSource, "test3");
>
> ESourceGroup *group = E_SOURCE_GROUP(g->data);
> e_source_set_group(newBookSource, group);
> e_source_group_add_source(group, newBookSource, 1);
> -----------------------
>
> "test3" was create in ".evolution/addressbook/local/" and contacts was
> add the "addressbook.db". The problem is when I open Evolution, the
> addressbook is not display in the list. Have I forgotten to do something?
>
> Many many thanks!!
>
>
>> Hey all.
>>
>> I am new to Evolution. I want to write a script to import contacts(vcard
>> or ldif format) automaticly without opening Evolution. How can I do it?
>> Is there a *.so file that includes this function? If so, how do I know
>> the usage.
>>
>> Many many thanks:)
>>
>> Cameron Wong
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Evolution-hackers mailing list
>> Evolution-hackers gnome org
>> http://mail.gnome.org/mailman/listinfo/evolution-hackers
>>
>>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Evolution-hackers mailing list
> Evolution-hackers gnome org
> http://mail.gnome.org/mailman/listinfo/evolution-hackers
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]