On Mi, 2011-05-18 at 13:16 +0100, Jussi Kukkonen wrote:
> So: I need to use syncURL to figure out the real source config context
> to get some data and need to hide the unused source uri fields... are
> there other UI details that might need changing?

No, I don't think so.

You need to be careful with the data transfer direction. You'll probably
display Google and Yahoo like a server, but in the D-Bus API you need to
reverse the "refresh-from-server" and "refresh-from-client" operations
because the server in that context is the local storage side.

We also need to figure out how to name the new templates so that we
arrive at useful config names.

I pushed some code today to the "webdav-templates" branch. Can you and
Salvatore review the changes and base your own UI changes on it?

Not everything that I described is already implemented, but for the sync
UI it should be enough. I also fixed various bugs that I found while
removing the built-in templates. Instead of repeating myself, let me
just quote the commit messages:

commit 6aa4adea1e624d3c1f288b8fbb3706b6c5156cfa
Author: Patrick Ohly <[email protected]>
Date:   Wed May 18 17:20:56 2011 +0200

    WebDAV: added templates for Yahoo and Google
    
    This patch introduces the new "peerType" property which marks
    templates and configs as something that can be used for the
    'source-config@<target>' configs necessary for local sync.
    
    Only "WebDAV" is used. If peerType is not set, the template or config
    is traditional SyncML.
    
    This patch also adds two templates, one for Google Calendar and one
    for Yahoo CardDAV and CalDAV. Because Yahoo CardDAV is unreliable,
    it is not enabled.

commit 9ba0b21ab630f028ef1e52e765fe5301df949203
Author: Patrick Ohly <[email protected]>
Date:   Wed May 18 14:11:54 2011 +0200

    configuration: removed builtin templates
    
    The code for builtin templates had side effects, like always adding
    all four standard sources to a template, even if the template itself
    didn't have all of them defined. It also hid the problem that listing
    templates didn't work for templates on disk.
    
    Another benefit is that template files can be packaged separately. By
    choosing the packages which are to be installed, a distributor of
    SyncEvolution (like MeeGo) can choose which services to offer by
    default.
    
    Therefore this patch removes the "builtin templates" feature, which
    was only useful in unusual use cases anyway (for example, single-binary
    distribution).
    
    Because there are no more default values for source properties, all
    templates must specify the "backend" explicitly. syncevo-phone-config
    was adapted accordingly, and also updated to use the current names of
    the properties in the process.
    
    As part of moving the templates into separate files, some of them
    were cleaned up:
    - Mobical: now points to Everdroid, its new name
    - Google, Ovi: SSL verification is always enabled in the templates;
                   the workaround for old libsoup should no longer be
                   necessary for most users
    - Google: renamed to "Google_Contacts", with "Google" as alias,
              because there will be two Google templates soon
    - Scheduleworld: use "server no longer in operation" instead of
                     an invalid URL
    
    The finger print match had a special case for "default". The exact
    intention of that is unknown. Perhaps it was meant to give that
    template a boost when it wouldn't match the string that is getting
    searched for at all.
    
    But it had the effect that an exact match when searching for the
    "default" template was not found and thus that template couldn't be
    used in the command line after moving it from builtin to external.
    
    Removed the complete check.

commit b6a649dfea6d61e8f9387967dc7acc0fe44b6d57
Author: Patrick Ohly <[email protected]>
Date:   Wed May 18 16:22:34 2011 +0200

    SyncConfig: avoid reading template if not needed
    
    In TemplateConfig::fingerprintMatch the peerIsClient property only
    matters when the mode is either "match only clients" or "match only
    servers".
    
    This patch checks for this first before reading the template.
    Minor optimization, not performance critical.

commit 9b6c0321271fc89afbd1869cb6f9717337d89d8c
Author: Patrick Ohly <[email protected]>
Date:   Wed May 18 16:19:26 2011 +0200

    SyncConfig: allow SYNCEVOLUTION_TEMPLATE_DIR to start with a dot
    
    The check with "starts with ." probably was meant to filter out hidden
    files. Because it was applied to the full path, including the
    directory names, it didn't have that effect. Instead it skipped all
    entries of the template dir started with a dot, as in "./templates".
    
    That was used in one of the Cmdline unit tests and only worked while
    none of the templates there were needed for the test. It started to
    fail after removing the builtin templates.

commit a58d4076af93b41e2d577453f5e9021b9d503f6a
Author: Patrick Ohly <[email protected]>
Date:   Wed May 18 16:15:12 2011 +0200

    Cmdline: better error reporting when unit tests fail
    
    Better check error message before return code. That way
    a non-zero error is visible in the output instead of
    only the failed run check.
    
    Calling doit() would be shorter, but hide the actual location
    of the failure.

commit c0a5e6177f8bb3209b06f85934bfc8cbd912de06
Author: Patrick Ohly <[email protected]>
Date:   Wed May 18 16:12:15 2011 +0200

    Cmdline: cleaned up unit testing
    
    Moved removal and creation of the test directory (= "CmdlineTest")
    into the test setup method. That way all tests are guaranteed to
    start in a clean state, without having to duplicate that all over
    the place.
    
    Motivated by the observation that at least one test didn't have the
    necessary cleanup, which caused a failure when creating more
    templates.

commit ec09f688fa283cff653972d7ebe1b987dff8d512
Author: Patrick Ohly <[email protected]>
Date:   Wed May 18 16:08:19 2011 +0200

    autotools: make src/templates a symlink
    
    If compilation and testing runs outside of the original source,
    the src/testcases must be made available to "client-test". This
    used to be done with a full copy, but that means that changes
    made later are not reflected in later tests. Better use a symlink.
    
    Also remember to remove it as part of "make clean".

commit 22a4f082e14bbce503c63f7b4ecc8263542af1fb
Author: Patrick Ohly <[email protected]>
Date:   Wed May 18 17:25:37 2011 +0200

    D-Bus + templates: on-disk templates were not listed
    
    Same bug as in command line (previous commit). Scanning
    for on-disk templates only considered Bluetooth devices.
    
    For server templates, only the ones built into SyncEvolution
    were returned.

-- 
Best Regards

Patrick Ohly
Senior Software Engineer

Intel GmbH
Open Source Technology Center               
Pützstr. 5                              Phone: +49-228-2493652
53129 Bonn
Germany

_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to