New PurplePrefType: string with hint list

Ethan Blanton elb at
Wed Aug 8 12:23:46 EDT 2012

Tomasz Wasilczyk spake unto us the following wisdom:
> > This seems like a reasonable and valuable addition to me in general.
> > Some things to think about:
> >
> >  * In prefs.xml, you probably want to store only inactive entries that
> >    the *user* has added; inactive entries added by the prpl at
> >    initialization should be suppressed.
> Actually, I was rather thinking of storing only selected value. In
> that case, prpl could decide, if it wants a newly entered value to be
> stored or not (after validation). And it would store these values by
> itself, in i.e. in purple_prefs_*.

That sounds like a great way to handle this, actually.  That removes
such policy from the core.  We might want to think about ways to tell
the pref creator that the user wants to delete a user-added value,
though -- something like backspace over custom statuses in the status
box.  This can wait, though.

> >  * In some cases, we may have been able to take advantage of this in
> >    the past in ways that we don't necessarily *want* to; for example,
> >    there have been multiple possible auth servers for OSCAR
> >    (particularly for ICQ, I think?), but we generally don't want users
> >    using anything but the default, so we wouldn't want to provide
> >    alternation.  We need to think hard about what prefs get this sort
> >    of treatment -- the GG server makes me suspicious, for example.
> I'm not 100% sure, if i understand correctly. Gadu-Gadu have a lot of
> connection servers, this list is very mutable (and not published
> entirely anywhere, i think). I would like to save successfully
> connected server addresses to hint-list with allowing user to find a
> working server by himself, i.e. here [1]. This is mainly for case,
> when hub server goes down.

OK, so, it sounds like GG is a bit different in this respect.  That's
unfortunate for GG users, but makes a pref-with-hints reasonable in
this case.

My only other point is that a lot of string prefs in preferences are
preferences for testing and workarounds (e.g., bogus firewall or the
like), but they're not actually mutable in practice.  In those cases,
we really just want a string.  However, it sounds like the gg connect
server is a different deal.

> >  * Your point re: XMPP ports may fall into the point above, but if it
> >    does not, is this an argument for an int selector as well as a
> >    string selector?
> I'm again not completely sure, what are you asking about. Actually, an
> int selector would be better for port numbers than proposed solution.

That was my only additional point here.  So maybe an int hint list and
a string hint list, both, would be good?  I'm not really sure we want
to have a hint list for XMPP ports, specifically, though, because in
2012 basically everyone will just be using 5222.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: Digital signature
URL: <>

More information about the Devel mailing list