Re: Category support in adsressbook

On Mon, 2007-08-01 at 20:38 +0100, Tom Billiet wrote:
> ----- Original Message -----
> From: Tom Billiet
> Time: 08-01-07 15:54 
> > Hi,
> > 
> > I'm currently looking if it's possible to add category support for
> > the addressbook when syncing with evolution.  As far as I found
> > there is currently no support for it, so I started looking at the
> > code trying to hack it myself :-)
> > But I'm a bit confused understanding the code. I think the most
> > important things need to be changed in the addressbook conduit file
> > from evolution (addressbook/conduit/address-conduit.c). But looking
> > at that file it seems some work on category support has already been
> > done. At least, the categories from the palm are read and first
> > stored in a structure, but then discarded as far as I understand. Is
> > there anybody who can give some more information about this?
> > Second when I look at the function: static GnomePilotRecord
> > local_record_to_pilot_record (ECalLocalRecord *local,
> >                   ECalConduitContext *ctxt,
> >                   unsigned char *record,
> >                   int maxRecordLen)
> > {
> > which is designed to convert a record from evolution to palm.  This
> > method contains a structure ECalLocalRecord *local, and this
> > structure has a member category, but this value always seems to be
> > 0.  This function is called from the function "compare" and
> > "prepare", but I have actually no clue from where these functions
> > are called, and so I don't know where the ECalLocalRecord *local
> > structure is actually made. Can somebody help me and put me on the
> > right track for this?  I guess it has something to do with the
> > "gtk_signal_connect (retval, "prepare", (GtkSignalFunc) prepare,
> > ctxt);" functions, but I have no experience with gtk/gnome
> > programming, so it's still somewhat confusing to me.
> > 
> > Thanks,
> > Tom
> > 
> Okay,
> To answer to my own mail: I still haven't found where the "compare"
> and "prepare" functions are called, but I noticed it's not needed. I
> do have a working category syncing now :-)
> But not too enthusiast, I still have a 3 problems left:
> 1) (the biggest problem) Every item you read from the palm has a
> category, which is a number (id). But so I have no idea what the name
> of that category is, and I can't find a function to convert that id to
> a name or get a list of all the categories in the palm. I'm sure this
> is possible, but I'm overlooking it in the pilot-link doc's, can
> anybody help me on this?
> 2) Evolution has support for adding an item to more than 1 category,
> palm doesn't have this support. Now I'm only using the first category
> and ignoring the rest if an item has more categories. I don't see any
> other solution.
> 3) Putting an item in an non-existent  category in evolution doesn't
> create a new category, but the item is added to that category
> (categories are stored as a string of comma separated values in
> evolution). So you have to create the category yourself in evolution.
> No big deal, as it will still work if the category is non-existent.  I
> haven't tried creating a new category on the palm, but I found
> functions in pilot link for doing this, so I think that won't be a big
> problem. But I first need to be able to determine whether a category
> is already available in palm, which brings me back to point 1 :-)
> If somebody can help me on this I can fix these problems and send my
> patch.

not helping you here, but just saying I look forward to the patch and
will try to copy it in some crude way for birthdays (the other thing I
want to make work).


> Greetings,
> Tom
> _______________________________________________
> gnome-pilot-list mailing list
> gnome-pilot-list gnome org
Matt Price
History Dept
University of Toronto
matt price utoronto ca

Attachment: signature.asc
Description: This is a digitally signed message part

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