[opensource-dev] Review Request: Nearby chat history is displaying both Display Names and user.names when the Display Name is not changed from default.

Aleric Inglewood Aleric.Inglewood at gmail.com
Sun Feb 27 08:58:07 PST 2011



> On Feb. 27, 2011, 5:57 a.m., Boroondas Gupte wrote:
> > indra/llcommon/llavatarname.cpp, lines 93-108
> > <http://codereview.secondlife.com/r/153/diff/1/?file=981#file981line93>
> >
> >     This could be shortened to
> >     
> >     	if (!mUsername.empty() && !mIsDisplayNameDefault)
> >     	{
> >     		name = mDisplayName + " (" + mUsername + ")";
> >     	}
> >     	else
> >     	{
> >     		// Display names are off, so legacy name is in mDisplayName,
> >     		// or Display Name is not changed from (user name based)
> >     		// default, so also showing the user name would be redundant.
> >     		name = mDisplayName;
> >     	}
> >     
> >     but I guess the nested ifs make the intention more clear, so go for it.

Or even more readable(?):

	if (mIsDisplayNameDefault || mUsername.empty())
	{
		// Showing the user name when Display Names are off
                // is redundant, since in that case it's the same string.
		name = mDisplayName;
	}
	else
	{
		name = mDisplayName + " (" + mUsername + ")";
	}


- Aleric


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/153/#review392
-----------------------------------------------------------


On Feb. 19, 2011, 9:32 a.m., ardy.lay wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/153/
> -----------------------------------------------------------
> 
> (Updated Feb. 19, 2011, 9:32 a.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Summary
> -------
> 
> https://jira.secondlife.com/browse/VWR-24917
> I have been finding the redundent display of functionally equivalent names in nearby chat history and IM history quite tiresome.
> Simple proposal: If the resident's Display Name is at the default then do not display their user.name.
> https://bitbucket.org/ArdyLay/viewer-development-vwr-24917
> 
> Change is to: LLAvatarName::getCompleteName
> 
> I find the following Callers:
> LLAvatarActions::requestFriendshipDialog
> LLAvatarActions::startIM
> LLAvatarActions::startCall
> LLIMModel::LLIMSession
> LLIMModel::logToFile
> LLPostponedNotification::onAvatarNameCache
> LLUrlEntryAgent::onAvatarNameCache
> LLUrlEntryAgent::getLabel
> LLUrlEntryAgentCompleteName::getName
> 
> // Callback for name resolution of a god/estate message
> llviewermessage.cpp(2149): args["NAME"] = av_name.getCompleteName();
> llviewermessage.cpp(2154): chat.mText = av_name.getCompleteName() + ": " + message;
> 
> static void on_avatar_name_cache_toast ...
> llimview.cpp(108): args["FROM"] = av_name.getCompleteName();
> 
> Some of these make me wonder if this change will cause some defects and should be implimented as a seperate function.
> 
> 
> This addresses bug VWR-24917.
>     http://jira.secondlife.com/browse/VWR-24917
> 
> 
> Diffs
> -----
> 
>   doc/contributions.txt c10d5e37db1e 
>   indra/llcommon/llavatarname.cpp c10d5e37db1e 
> 
> Diff: http://codereview.secondlife.com/r/153/diff
> 
> 
> Testing
> -------
> 
> I have been using this trivial change and have shared it with a friend, via bitbucket.  We have both built the viewer on Windows 7 and find the resulting reduction in redundent text in chat and IM history on screen to be very helpful.
> 
> 
> Thanks,
> 
> ardy.lay
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20110227/a636a287/attachment-0001.htm 


More information about the opensource-dev mailing list