Make Buddy Auto-Encryption setting lookup more efficient
Brought to you by:
obobo
Instead of looking though all accounts, looking for a
buddy with the specified name for which to check the
Auto-Encryption settings, pass the GaimAccount to the
check as it is available.
Also a couple other minor cleanup and i18n changes.
This still depends on gaim patch
[ 855495 ] Tweaks to blist for new bool/int buddy
settings
However, i've talked to faceprint about it and he is
planning to apply the patch really soon now.
Logged In: YES
user_id=325843
I removed the warnings about the gaim-patch being
necessary, perhaps i shouldn't have. If the gaim patch
doesn't get committed before you look at this, please
remember to put them back.
Logged In: YES
user_id=21203
Cool, propogating the GaimAccount* through is a Good Thing.
The plugin currently uses just the buddy name in several
places (to keep track of keys, etc). Now that Gaim makes it
easy to know what account you're dealing with, this should
be taken further (always pairing a username with an
account), so that an AIM user "bob" isn't confused with MSN
user "bob". To do it right, though, I suspect that there
will need to be some key-file conversion, which gets a
little touchy....
I left the 2 callbacks -> 1 callback with lookup part of the
patch out: it's a matter of personal taste, I think, but I
prefer to have the lookup happen once, then be
deterministic. If there's a problem with the current way,
though, let me know.
I didn't see any i18n in the patch; did I miss something?
Logged In: YES
user_id=325843
yeah, of course the 2 callbacks -> 1 is a matter of style.
The i18n stuff basically is just wrapping the text in _() so
that gettext "sees" it (in this case only for the menu items, i
believe)
the other change that made was to use (GaimBlistNode *)
buddy instead of buddy->node (which is a matter of style as
well, but i think makes more logical sense).
Logged In: YES
user_id=21203
Yep, I prefer the explicit use of the buddy->node, so that
it won't break if Gaim changes what is in struct GaimBuddy.
Thanks again for the patch.