[Adium-devl] libpurple account options in adium

Evan Schoenberg evan.s at dreskin.net
Tue Nov 27 01:46:53 UTC 2007


Eion,

On Nov 26, 2007, at 7:45 PM, Eion Robb wrote:

> Does adium not listen to the purple_account_option_xx_new functions?
No.  The UI in Cocoa is, generally, based around NIB files (and  
roughly equivalent XIB files as of Mac OS X 10.5) which define the  
interface graphically.  purple_account_option_XX_new tells the UI  
about options it should show for an account, but displaying options  
generated programatically in a way which looks good is thoroughly  
nontrivial.  I'd be happy to accept a patch which solved this  
problem!  In the meantime, options for the Adium account are displayed  
independent of the options specified by a libpurple prpl, though  
generally there is a one-to-one correlation.

Your AIService subclass specifies a PurpleAccountViewController  
subclass (itself a subclass of AIAccountVIewController) which then  
points out a nib file to load and configures its outlets  
appropriately.  It saves the settings from those controls within  
Adium's preferences.  Your CBPurpleAccount subclass loads those  
preferences and tells them to libpurple in configureLibpurpleAccount.   
Look within the Purple Service files for examples of this behavior.   
Does that help?

> Does adium not listen to the purple_account_set_username function too?
Nope.  You've got that bit backwards, I think; Adium tells libpurple  
the username to use, not the other way around.  If you need to tell  
libpurple a name other than the default (the Adium account's name),  
you can override - (const char *)purpleAccountName in your  
CBPurpleAccount subclass.

> Is is possible for a protocol in adium to not have a server/port/ 
> password?
Sure.  The Zephyr service does this.

Does that help?

Cheers,
Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20071126/876043e9/attachment-0001.html>


More information about the devel mailing list