Opened 15 years ago

Closed 15 years ago

#1182 closed enhancement (fixed)

No default user name for new Bonjour accounts

Reported by: Owned by: nobody
Milestone: Adium X 1.0 Component: Adium UI
Version: Severity: minor
Keywords: bonjour Cc: support@…
Patch Status:


When you create a new Bonjour account, Adium does not choose a default user name for you. A reasonable default would be to use the long user name (e.g. NSFullUserName).

I have written a patch which implements this. The patch add a new method, -[AIService defaultUserName], which returns nil in the base class (as it's pretty much impossible to come up with a reasonable default for MSN, AIM and other protocols). The patch also overrides this method in AWBonjourService to return NSFullUserName.

The default account name is applied to new accounts in -[AdiumAccounts createAccountWithService:UID:]. I think I'm right in setting the new name via -setFormattedUID:notify: (with the notify parameter set to NotifyNever), but someone else might want to confirm this.

Attachments (1)

defaultAccountName.diff (2.3 KB) - added by calumr@… 15 years ago.
Default name patch

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by calumr@…

Attachment: defaultAccountName.diff added

Default name patch

comment:1 Changed 15 years ago by Evan Schoenberg

Cc: support@… added

The changers other than the one for AdiumAccounts.m look good. Setting the formatted UID as you in AdiumAccounts.m won't work as desired; you'll be changing how the account is displayed to the user but not the actual UID, so @"" will be sent to the other side while @"evands" is set locally (for example).

Try this and see if it works as desired:

return [service accountWithUID:((inUID && [inUID length]) ? inUID : [service defaultUserName])  internalObjectID:[self _generateUniqueInternalObjectID]]; 

I'd also change the default implementation to return @"" instead of nil so that the @"" UID passed normally for a new account doesn't get turned into a nil default name (could alternately have checking in the method above, but a proper default makes that unnecessary).

comment:2 Changed 15 years ago by Evan Schoenberg

Milestone: Adium X 0.90

comment:3 Changed 15 years ago by Evan Schoenberg

Resolution: fixed
Status: newclosed

(In [13356]) Using part of calumr@…'s patch from #1182, implemented a default user name for new Bonjour accounts of the full user name. Closes #1182

Note: See TracTickets for help on using tickets.