Address Book rewrite – The benefits: OS X AB searching/filtering.

As many folks will already know by now, we are currently rewriting a lot of the interfaces for the address book.

With Joshua’s most recent push, the “cardForEmailAddress” function has moved from the interface specific to local/mork address books, to the generic interface for all address books (nsIAbDirectory).

The benefits of this are great, with one simple function addition for the OS X address book interfaces, we now have support for searching and filtering against “is/isn’t in my OS X address book”.

One of the main aims of the rewrite has been to reduce the local/mork address book specialisations within the mailnews code base to make it work better with any type of address book. This first change does that, and we’ve got a few more to come.

The usefulness of fake servers

A while ago, Joshua created a “fake” news server for xpcshell tests in mailnews, then a few days ago I was reminded about Bug 327510 – XML Parsing Error: no element found/netError.xhtml on newsgroup msg download timout.

This was turning out to be a hard bug to reproduce to order, because it needed intermittent newsgroup connections. Having then remembered about the fake news server, and the fact it ran on xpcshell got me thinking.

In a couple of hours, I had written a wrapper around the fake news server (based on some of the existing unit tests) and got it up and running in xpcshell as a standalone process. Then I pointed Thunderbird at it, downloaded the message list, and before selecting the message, killed the server process, selecting the message then reproduced the bug.

This was good news, and having fixed a similar bug before, I’ve now fixed that bug (I’m currently investigating getting it in the SeaMonkey 1.1/Thunderbird 2.0 security/stability releases).

The great advantage with the fake server here was that I was able to (with some copy and paste) set it up to do exactly what I wanted and quickly; to have done this with a full server, or tried to manage my internet connection to a main server, it would have taken me longer, and I doubt it would have been so easy to consistently reproduce.

At some stage I want to have some scripts alongside the source code so that we can do this type of testing easily. However Joshua is working on something at the moment, and I’m waiting on seeing what that will give us as it is likely to be more useful than my scripts. If in the meantime you think you need something like this for a bug you’re working on, please drop me a line.

Internationalized domain name support for links in Thunderbird

(apologies for not blogging about this earlier, this has been in for a couple of weeks already)

In moving Thunderbird and SeaMonkey to the new comm-central repository, we were able to pick up the Gecko 1.9.1 development.

This allowed us to pick up some fixes in Gecko, which in turn allowed us to finish adding Internationalized domain name (IDN) support for links in messages within Thunderbird.

So now when you get sent a message with a link such as www.??????.lk you can click on it and it will open up in Firefox (or whatever you default browser is) and be loaded correctly.

Unfortunately we didn’t get this in for Shredder 3.0a2, it is already in the nightlies, and will be in Thunderbird 3.0 beta 1 when it comes out.

We still have work to do on supporting IDN based email addresses and hosts within Thunderbird, but this is a first step in the right direction.