Pi’s Blog

My blog about Thunderbird and GSoC 2008

Address Preferences in gContactSync 0.2

Google and Thunderbird store postal addresses differently, so converting one format to the other is difficult.  Google’s fields have multiple lines while Thunderbird has 6 separate fields.  gContactSync 0.1 would take Thunderbird’s 6 address fields (Address, Address2, City, State, Zip Code, and Country) and convert them into a new field that allows multiple lines like Google when a new contact from Thunderbird was first synchronized.  Contacts from Google would have their addresses directly synchronized with the new fields in Thunderbird.  However, it converted them in a hard-coded format (the standard US format) and removed the values in the old fields unless a hidden preference was changed.

0.2 will have a new preferences tab, probably similar to the screenshot below that allows for customization of how addresses are converted.

Preferences about postal addresses

Preferences about postal addresses

As you can see, you can customize how each address is created by placing the name of the property in brackets.  Anything not in brackets, such as spaces or punctuation,  is preserved.

You can find the properties used by Thunderbird here.

Here is the default for the home address, which is identical to the previous hard-coded method.

[HomeCity], [HomeState]  [HomeZipCode]

Lines that contain no letters are numbers are removed, so a contact with a HomeAddress and HomeCountry only will have two lines.

I’m going back home for the weekend so I won’t get much done with this over the weekend, but I would like to hear some opinions about how this looks and works.  If you don’t fully understand how it works from the description please let me know so I can make it more clear for you and everyone else.

I don’t have a version tested thoroughly enough and won’t for at least a week.  The newest source is in the CVS repository.


February 5, 2009 - Posted by | GSOC


  1. This sounds good, speaking as an Australian!

    It’s looking like multiple email addresses aren’t going to make it into TB3. Any chance you can find a way for us to use the email addresses past Thunderbird’s 2 per contact?

    Comment by Peter Hollo | February 5, 2009 | Reply

  2. So far I haven’t done anything to make the e-mail addresses useful other than making them a mailto link in the card view. I’m going to look, but I am not too confident that I’ll be able to make them more useful, unfortunately.

    Comment by pi | February 6, 2009 | Reply

  3. […] Customization of how addresses are synchronized […]

    Pingback by gContactSync 0.2.0a2 « Pi’s Blog | February 8, 2009 | Reply

  4. I’d been meaning to mention to you that synchronization wasn’t working at all on the Mac.
    This is on TB 3.0b1.
    When I click to sync it says “Synchronizing…” in the status bar, but that’s all it says, it just stays that way and nothing syncs.
    Also, the icon has reverted back to where it inherits a whole slew of icons like it was before.

    Comment by Mark | February 14, 2009 | Reply

  5. […] Customization of how addresses are synchronized […]

    Pingback by gContactSync 0.2.0b3 Released « Pi’s Blog | May 1, 2009 | Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: