summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-09-28 17:30:18 -0700
committerMerov Linden <merov@lindenlab.com>2012-09-28 17:30:18 -0700
commit7fc33cc47fdc080bbc7674cf118011b689ba1485 (patch)
tree5c5a74d7cfd06c23ee97ede9ad65011701624746
parent166ff2b1b8dc21ad1a88c715a480ce1d2c5c2e07 (diff)
CHUI-367 : Completed : Show user name tooltip in all situations so to avoid the conversation name showing up
-rw-r--r--indra/llui/llview.cpp21
-rw-r--r--indra/llui/llview.h2
-rw-r--r--indra/newview/llconversationmodel.cpp10
-rwxr-xr-xindra/newview/llconversationmodel.h2
4 files changed, 12 insertions, 23 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 49e7eaef99..8323bfc12f 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -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;
}
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index ba896b65a4..15b85a6418 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -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
{
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 176c05248d..9fa8758d11 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -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);
}
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index 82d4f0a710..30f94d51ae 100755
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -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