Merge
commit
0f7ca61386
|
|
@ -367,15 +367,15 @@ public:
|
|||
user_name->setValue( LLSD(av_name.mDisplayName ) );
|
||||
user_name->setToolTip( av_name.mUsername );
|
||||
|
||||
if (gSavedSettings.getBOOL("NameTagShowUsernames"))
|
||||
if (gSavedSettings.getBOOL("NameTagShowUsernames") && LLAvatarNameCache::useDisplayNames())
|
||||
{
|
||||
LLStyle::Params style_params_name;
|
||||
LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
|
||||
style_params_name.color(userNameColor);
|
||||
style_params_name.font.name("SansSerifSmall");
|
||||
style_params_name.font.style("NORMAL");
|
||||
style_params_name.readonly_color(userNameColor);
|
||||
user_name->appendText(" - " + av_name.mUsername, FALSE, style_params_name);
|
||||
LLStyle::Params style_params_name;
|
||||
LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
|
||||
style_params_name.color(userNameColor);
|
||||
style_params_name.font.name("SansSerifSmall");
|
||||
style_params_name.font.style("NORMAL");
|
||||
style_params_name.readonly_color(userNameColor);
|
||||
user_name->appendText(" - " + av_name.mUsername, FALSE, style_params_name);
|
||||
}
|
||||
setToolTip( av_name.mUsername );
|
||||
// name might have changed, update width
|
||||
|
|
|
|||
|
|
@ -176,6 +176,8 @@ LLPanelMyProfileEdit::LLPanelMyProfileEdit()
|
|||
buildFromFile( "panel_edit_profile.xml");
|
||||
|
||||
setAvatarId(gAgent.getID());
|
||||
|
||||
LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLPanelMyProfileEdit::onAvatarNameChanged, this));
|
||||
}
|
||||
|
||||
void LLPanelMyProfileEdit::onOpen(const LLSD& key)
|
||||
|
|
@ -186,11 +188,6 @@ void LLPanelMyProfileEdit::onOpen(const LLSD& key)
|
|||
// is loaded.
|
||||
enableEditing(false);
|
||||
|
||||
// Only allow changing name if this region/grid supports it
|
||||
bool use_display_names = LLAvatarNameCache::useDisplayNames();
|
||||
LLUICtrl* set_name = getChild<LLUICtrl>("set_name");
|
||||
set_name->setVisible(use_display_names);
|
||||
set_name->setEnabled(use_display_names);
|
||||
// force new avatar name fetch so we have latest update time
|
||||
LLAvatarNameCache::fetch(gAgent.getID());
|
||||
LLPanelMyProfile::onOpen(getAvatarId());
|
||||
|
|
@ -207,6 +204,23 @@ void LLPanelMyProfileEdit::onOpen(const LLSD& key)
|
|||
LLFirstUse::setDisplayName(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (LLAvatarNameCache::useDisplayNames())
|
||||
{
|
||||
getChild<LLUICtrl>("user_label")->setVisible( true );
|
||||
getChild<LLUICtrl>("user_slid")->setVisible( true );
|
||||
getChild<LLUICtrl>("display_name_label")->setVisible( true );
|
||||
getChild<LLUICtrl>("set_name")->setVisible( true );
|
||||
getChild<LLUICtrl>("set_name")->setEnabled( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
getChild<LLUICtrl>("user_label")->setVisible( false );
|
||||
getChild<LLUICtrl>("user_slid")->setVisible( false );
|
||||
getChild<LLUICtrl>("display_name_label")->setVisible( false );
|
||||
getChild<LLUICtrl>("set_name")->setVisible( false );
|
||||
getChild<LLUICtrl>("set_name")->setEnabled( false );
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelMyProfileEdit::onClose(const LLSD& key)
|
||||
|
|
@ -267,10 +281,27 @@ void LLPanelMyProfileEdit::onNameCache(const LLUUID& agent_id, const LLAvatarNam
|
|||
{
|
||||
getChild<LLUICtrl>("user_name_small")->setVisible( false );
|
||||
getChild<LLUICtrl>("user_name")->setVisible( true );
|
||||
}
|
||||
|
||||
if (LLAvatarNameCache::useDisplayNames())
|
||||
{
|
||||
getChild<LLUICtrl>("user_label")->setVisible( true );
|
||||
getChild<LLUICtrl>("user_slid")->setVisible( true );
|
||||
getChild<LLUICtrl>("display_name_label")->setVisible( true );
|
||||
getChild<LLUICtrl>("set_name")->setVisible( true );
|
||||
getChild<LLUICtrl>("set_name")->setEnabled( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
getChild<LLUICtrl>("user_label")->setVisible( false );
|
||||
getChild<LLUICtrl>("user_slid")->setVisible( false );
|
||||
getChild<LLUICtrl>("display_name_label")->setVisible( false );
|
||||
getChild<LLUICtrl>("set_name")->setVisible( false );
|
||||
getChild<LLUICtrl>("set_name")->setEnabled( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLPanelMyProfileEdit::onAvatarNameChanged()
|
||||
{
|
||||
LLAvatarNameCache::get(getAvatarId(),
|
||||
|
|
|
|||
|
|
@ -225,6 +225,22 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id,
|
|||
|
||||
}
|
||||
|
||||
if (LLAvatarNameCache::useDisplayNames())
|
||||
{
|
||||
getChild<LLUICtrl>("user_label")->setVisible( true );
|
||||
getChild<LLUICtrl>("user_slid")->setVisible( true );
|
||||
getChild<LLUICtrl>("display_name_label")->setVisible( true );
|
||||
getChild<LLUICtrl>("copy_to_clipboard")->setVisible( true );
|
||||
getChild<LLUICtrl>("copy_to_clipboard")->setEnabled( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
getChild<LLUICtrl>("user_label")->setVisible( false );
|
||||
getChild<LLUICtrl>("user_slid")->setVisible( false );
|
||||
getChild<LLUICtrl>("display_name_label")->setVisible( false );
|
||||
getChild<LLUICtrl>("copy_to_clipboard")->setVisible( false );
|
||||
getChild<LLUICtrl>("copy_to_clipboard")->setEnabled( false );
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
height="13"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="user_label"
|
||||
name="display_name_label"
|
||||
text_color="LtGray"
|
||||
value="Display Name:"
|
||||
width="80" />
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
height="13"
|
||||
layout="topleft"
|
||||
left="45"
|
||||
name="user_label"
|
||||
name="display_name_label"
|
||||
text_color="LtGray"
|
||||
value="Display Name:"
|
||||
width="80" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue