Re: [Evolution-hackers] Creation of the original address books

On Thu, 2004-06-10 at 22:33 +0200, Damien Sandras wrote:

GnomeMeeting CVS has full support for the E-D-S for the local contacts,
but the first users have started complaining. Actually, a few of them
are not using Evolution at all, which means there is no ~/.evolution/
addressbook/ directory for those users.

I have to init the address book some way.

I was thinking to do this :

/* Look for the "On This Computer" Source Group */
source_group =
    gnomemeeting_addressbook_get_local_source_group (&source_list);
  if (!source_group) {
      e_source_group_new ("On This Computer",
FWIW this url isn't correct, it needs three ///'s and don't use ~.

use e.g.
uri = g_strdup_printf("file:///%s/.evolution/addressbook/local", g_get_home_dir());

although that assumes the home dir path is url safe.

no idea if this has any bearing on the issue, i doubt it.

    e_source_list_add_group (source_list, on_this_computer, -1);
    source = e_source_new ("Personal", "system");
    e_source_group_add_source (on_this_computer, source, -1);
    e_source_list_sync (source_list, NULL);

It works, except that after that I can not add contacts to the newly
created address book... I don't know why.
readonly perhaps?  dunno i'm only guessing, i'm really only mail.
One other thing disturbs me. Am I forced to hardcode the evolution
directory to have something working? What if you decide to change the
I doubt it matters where it is (i could be wrong though).  Just so long as people know where it is, so when they do backups they grab it.

Actually making it in evolution's location, if evolution didn't do it, may not be the way to go.
Michael Zucchi <notzed ximian com>

Ximian Evolution and Free Software Developer

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]