CHUI-367 : Completed : Show user name tooltip in all situations so to avoid the conversation name showing up
parent
166ff2b1b8
commit
7fc33cc47f
|
|
@ -870,18 +870,15 @@ BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask)
|
|||
std::string tooltip = getToolTip();
|
||||
if (!tooltip.empty())
|
||||
{
|
||||
if (tooltip != NO_TOOLTIP_STRING)
|
||||
{
|
||||
// allow "scrubbing" over ui by showing next tooltip immediately
|
||||
// if previous one was still visible
|
||||
F32 timeout = LLToolTipMgr::instance().toolTipVisible()
|
||||
? LLUI::sSettingGroups["config"]->getF32( "ToolTipFastDelay" )
|
||||
: LLUI::sSettingGroups["config"]->getF32( "ToolTipDelay" );
|
||||
LLToolTipMgr::instance().show(LLToolTip::Params()
|
||||
.message(tooltip)
|
||||
.sticky_rect(calcScreenRect())
|
||||
.delay_time(timeout));
|
||||
}
|
||||
// allow "scrubbing" over ui by showing next tooltip immediately
|
||||
// if previous one was still visible
|
||||
F32 timeout = LLToolTipMgr::instance().toolTipVisible()
|
||||
? LLUI::sSettingGroups["config"]->getF32( "ToolTipFastDelay" )
|
||||
: LLUI::sSettingGroups["config"]->getF32( "ToolTipDelay" );
|
||||
LLToolTipMgr::instance().show(LLToolTip::Params()
|
||||
.message(tooltip)
|
||||
.sticky_rect(calcScreenRect())
|
||||
.delay_time(timeout));
|
||||
handled = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,8 +67,6 @@ const BOOL NOT_MOUSE_OPAQUE = FALSE;
|
|||
|
||||
const U32 GL_NAME_UI_RESERVED = 2;
|
||||
|
||||
static const std::string NO_TOOLTIP_STRING = " ";
|
||||
|
||||
// maintains render state during traversal of UI tree
|
||||
class LLViewDrawContext
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) :
|
||||
LLFolderViewModelItemCommon(root_view_model),
|
||||
mName(display_name),
|
||||
mUseNameForSort(true),
|
||||
mUUID(uuid),
|
||||
mNeedsRefresh(true),
|
||||
mConvType(CONV_UNKNOWN),
|
||||
|
|
@ -47,7 +46,6 @@ LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& u
|
|||
LLConversationItem::LLConversationItem(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) :
|
||||
LLFolderViewModelItemCommon(root_view_model),
|
||||
mName(""),
|
||||
mUseNameForSort(true),
|
||||
mUUID(uuid),
|
||||
mNeedsRefresh(true),
|
||||
mConvType(CONV_UNKNOWN),
|
||||
|
|
@ -58,7 +56,6 @@ LLConversationItem::LLConversationItem(const LLUUID& uuid, LLFolderViewModelInte
|
|||
LLConversationItem::LLConversationItem(LLFolderViewModelInterface& root_view_model) :
|
||||
LLFolderViewModelItemCommon(root_view_model),
|
||||
mName(""),
|
||||
mUseNameForSort(true),
|
||||
mUUID(),
|
||||
mNeedsRefresh(true),
|
||||
mConvType(CONV_UNKNOWN),
|
||||
|
|
@ -254,9 +251,8 @@ LLConversationItemParticipant::LLConversationItemParticipant(const LLUUID& uuid,
|
|||
|
||||
void LLConversationItemParticipant::onAvatarNameCache(const LLAvatarName& av_name)
|
||||
{
|
||||
mUseNameForSort = !av_name.mUsername.empty();
|
||||
mName = (mUseNameForSort ? av_name.mUsername : NO_TOOLTIP_STRING);
|
||||
mDisplayName = (av_name.mDisplayName.empty() ? mName : av_name.mDisplayName);
|
||||
mName = (av_name.mUsername.empty() ? av_name.mDisplayName : av_name.mUsername);
|
||||
mDisplayName = (av_name.mDisplayName.empty() ? av_name.mUsername : av_name.mDisplayName);
|
||||
mNeedsRefresh = true;
|
||||
if (mParent)
|
||||
{
|
||||
|
|
@ -367,7 +363,7 @@ bool LLConversationSort::operator()(const LLConversationItem* const& a, const LL
|
|||
}
|
||||
// By default, in all other possible cases (including sort order type LLConversationFilter::SO_NAME of course),
|
||||
// we sort by name
|
||||
S32 compare = LLStringUtil::compareDict((a->useNameForSort() ? a->getName() : a->getDisplayName()), (b->useNameForSort() ? b->getName() : b->getDisplayName()));
|
||||
S32 compare = LLStringUtil::compareDict(a->getName(), b->getName());
|
||||
return (compare < 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,11 +123,9 @@ public:
|
|||
|
||||
void resetRefresh() { mNeedsRefresh = false; }
|
||||
bool needsRefresh() { return mNeedsRefresh; }
|
||||
bool const useNameForSort() const { return mUseNameForSort; }
|
||||
|
||||
protected:
|
||||
std::string mName; // Name of the session or the participant
|
||||
bool mUseNameForSort;
|
||||
LLUUID mUUID; // UUID of the session or the participant
|
||||
EConversationType mConvType; // Type of conversation item
|
||||
bool mNeedsRefresh; // Flag signaling to the view that something changed for this item
|
||||
|
|
|
|||
Loading…
Reference in New Issue