[Adium-devl] libpurple account options in adium

Evan Schoenberg evan.s at dreskin.net
Tue Nov 27 21:38:02 UTC 2007


Quoting Eion Robb <eion at bigfoot.com>:

>> The prpl definitely shouldn't be doing anything with CBPurpleAccount!
> Okie dokie, won't touch it :)
>> Perhaps you could describe further what you're trying to accomplish?
> The username is set from within the protocol itself after connection...
> Maybe I'll have to make a nib like you were talking about for it instead.

You could override formattedUID in your account subclass to return an  
NSString from purple_account_get_username(), but you'll likely run  
into some confusions that have to be worked around since a libpurple  
PurpleAccount doesn't exist before the Adium account first connects...

>
>> Libpurple is a tool used by Adium, not the driving force of its UI;
>> Adium stores all relevant data for an account on its own and tells
>> libpurple what it needs to know.
> Fair enough.  It was just a little shock seeing that
> purple_account_set_username changes the username in Pidgin but not in
> Adium :)
*nod* In most respects, Pidgin and Adium use libpurple very similarly;  
however, in some ways Pidgin and libpurple are much more tightly  
integrated because Pidgin is expressly the GTK+ UI for libpurple while  
Adium uses libpurple for most (but not all) of its protocol-level  
connectivity.

>> It doesn't present a server option, and its account subclass says:
>> //Zephyr connects to a local host so need not disconnect/reconnect as
>> the network changes
>> - (BOOL)connectivityBasedOnNetworkReachability
>> {
>> 	return NO;
>> }
>>
>> to interact properly with the autoconnect functionality.  Otherwise,
>> it should Just Work; your prpl doesn't expect a server to be
>> specified, and Adium doesn't specify one.
> Just to double-check, if I specify connectivityBasedOnNetworkReachability
> to return NO like above, Adium no longer requires me to have a server
> filled in, or will I still need to create a nib?

Adium won't require a server, correct. However, the default account  
setup - if you don't specify a nib at all - includes a field for the  
server, I believe (not at home at the moment to check that for sure;  
try it out yourself). You'll want to use a nib to override that part  
most likely. The field wouldn't technically hurt anything since you'd  
just ignore it in your prpl, but obviously it'd be confusing for the  
user.

-Evan



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.





More information about the devel mailing list