|
From: Nicolas <pr...@fr...> - 2011-08-22 14:13:00
|
Le samedi 02 juillet 2011 à 19:03 +0100, Ian Martin a écrit : > Hi, > > On 2 July 2011 16:42, Nicolas <pr...@fr...> wrote: > > Le samedi 02 juillet 2011 à 12:27 +0200, Daniel Gollub a écrit : > >> Hi Nicolas, > >> > >> On Saturday, July 02, 2011 08:06:40 am Nicolas wrote: > >> > With this patch, it works with new Evolution release 2.32 and higher. > >> > >> Could you explain which change was exactly required to get it working again for 2.32? It's hard > >> for me to distinguish the diff between the new feature and the required change to make it work. > > > > It's an old patch ; that I have forgotten to send you. > > > > It's the API that is different with 2.32 : > > The current code seems to work fine for me with 2.32 > > > With this modification, opensync can find the good address book ; > > otherwise it finds nothing. > > > > > >> > Moreover, I have added an option to be able to choose the evolution > >> > addressbook, calendar, tasks or memo to sync. > >> [...] > > I don't think this patch does anything new. The plugin has been able > to choose addressbook/calendar by name or uri for a while. > > The <url></url> field can be one of 3 options > 1) "default" is a special value that opens the default > addressbook/calendar, etc (you can set an item as the default using > evolution) > 2) A uri such as "local:system" or google://example@gmail.com > 3) The name of the addressbook/calendar, etc > > This is why the uri is also compared to the name in the second strcmp > in evo2_find_source: > if (!strcmp(e_source_peek_name(source), uri)) > > Using this method has it's problems if you name an entry "default" or > "local:system", so perhaps the <url> field should be an option of: > <default /> > <url></url> > <name></name> > to avoid mismatches but the current method seems simple to use. > > There are some short bad docs on the wiki at > http://www.opensync.org/wiki/trunk/syncing/evolution > > Hope that makes sense, > > Ian I do some tests and I have always the same issue (except if I use my patch). The function : ESource *evo2_find_source(ESourceList *list, const char *uri) receives the param uri = /home/nicolas/.local/share/evolution/addressbook/system (in my opensync config file, I have file:///home/nicolas/.local/....) So the function evo2_find_source does the comparaisons : a) local:system /home/nicolas/.local/share/evolution/addressbook/system b) Personnel /home/nicolas/.local/share/evolution/addressbook/system So the function evo2_find_source returns always null :( Regards, Nicolas |