Automatic Bonjour Account

Ka-Hing Cheung khc at hxbc.us
Fri May 9 16:17:08 EDT 2008


On Fri, 2008-05-09 at 14:37 -0500, Richard Laager wrote:
> One of the things I discussed last year with some people at Ubuntu Live
> is the idea of automatically adding a Bonjour account. Thus, everyone
> using Pidgin at the conference would automatically show up. What do you
> think about the following ideas?
> 
> 1. Automatically add a Bonjour account. In doing so, an flag (preference
> with no UI) would be set so that this would happen only once. This way,
> you could delete the Bonjour account and it wouldn't come back.

I don't like this kind of hidden preference. It seems that over time we
will just have more of these. Instead, what about a pref that stores the
current version, as some integer?

Let's say we assume all the prefs.xml out there are version 1. This code
that adds a Bonjour account would up the current version to 2, and
register an upgrade callback at version 2. When pidgin runs, it detects
that version 1 (which is in the old prefs.xml) is older than 2, so it
runs the upgrade callback (which may prompt the user), then sets the
current version to 2. If the user deletes the account, the upgrade
callback won't be run again anyway.

Generic upgrade callbacks also have another benefit. Imagine in later
versions we added couple features like this that would prompt the user
on upgrade. If the user skips couple upgrades. then he will get quite a
few dialogs when he decides to finally upgrade. UI can lump these
together if the callbacks are registered with a description.
Mini-dialogs can also workaround this problem, but I've always felt like
it's more of a hack (why is the font smaller! The buttons are so small!
Ugh!).

Going further we can have per-plugin versions, so distros can ship their
own muck-with-pref plugins that say, creates an IRC account and adds the
distro's channel to the buddy list.

And we can make our existing prefs upgrade code to not run most of the
time, too. Which may help people who share the same .purple with
different pidgin versions (those who use nfs home but local machines are
running different distros/versions). And perhaps some insignificant
start up speed up.

-khc





More information about the Devel mailing list