summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorKent Quirk <q@lindenlab.com>2007-11-15 19:10:29 +0000
committerKent Quirk <q@lindenlab.com>2007-11-15 19:10:29 +0000
commit138bf17c3c51cbf3826a05887d73c49908025f95 (patch)
treed47a36708813b3f93b4049d822f966c48de4e576 /indra/llui
parentc1920e3c1c60fb792cf091750b05de618b355878 (diff)
merge of age verification changes from QAR-76 to release; changes were originally made on the age_verification_2007xxxx branches; final changes were QA'd on age_verification_20071112.
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llpanel.cpp10
-rw-r--r--indra/llui/llpanel.h1
-rw-r--r--indra/llui/llview.cpp18
-rw-r--r--indra/llui/llview.h6
4 files changed, 25 insertions, 10 deletions
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 3a0ee9b013..ca1bc9c525 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -982,6 +982,16 @@ BOOL LLPanel::childSetLabelArg(const LLString& id, const LLString& key, const LL
return FALSE;
}
+BOOL LLPanel::childSetToolTipArg(const LLString& id, const LLString& key, const LLStringExplicit& text)
+{
+ LLView* child = getChildByName(id, true);
+ if (child)
+ {
+ return child->setToolTipArg(key, text);
+ }
+ return FALSE;
+}
+
void LLPanel::childSetMinValue(const LLString& id, LLSD min_value)
{
LLUICtrl* child = (LLUICtrl*)getChildByName(id, true);
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index dfd7a51529..78aa7cfc21 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -194,6 +194,7 @@ public:
// Not implemented for all types, defaults to noop, returns FALSE if not applicaple
BOOL childSetTextArg(const LLString& id, const LLString& key, const LLStringExplicit& text);
BOOL childSetLabelArg(const LLString& id, const LLString& key, const LLStringExplicit& text);
+ BOOL childSetToolTipArg(const LLString& id, const LLString& key, const LLStringExplicit& text);
// LLSlider / LLSpinCtrl
void childSetMinValue(const LLString& id, LLSD min_value);
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index ef91d9c85e..4d3bdaed98 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -224,11 +224,17 @@ void LLView::setMouseOpaque(BOOL b)
mMouseOpaque = b;
}
-void LLView::setToolTip(const LLString& msg)
+void LLView::setToolTip(const LLStringExplicit& msg)
{
mToolTipMsg = msg;
}
+BOOL LLView::setToolTipArg(const LLStringExplicit& key, const LLStringExplicit& text)
+{
+ mToolTipMsg.setArg(key, text);
+ return TRUE;
+}
+
// virtual
void LLView::setRect(const LLRect& rect)
{
@@ -288,7 +294,7 @@ void LLView::setSpanChildren( BOOL span_children )
const LLString& LLView::getToolTip()
{
- return mToolTipMsg;
+ return mToolTipMsg.getString();
}
// virtual
@@ -883,18 +889,14 @@ BOOL LLView::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_scre
}
}
- if (LLUI::sShowXUINames && (mToolTipMsg.find(".xml", 0) == LLString::npos) &&
+ tool_tip = mToolTipMsg.getString();
+ if (LLUI::sShowXUINames && (tool_tip.find(".xml", 0) == LLString::npos) &&
(mName.find("Drag", 0) == LLString::npos))
{
tool_tip = getShowNamesToolTip();
}
- else
- {
- tool_tip = mToolTipMsg;
- }
-
BOOL showNamesTextBox = LLUI::sShowXUINames && (getWidgetType() == WIDGET_TYPE_TEXT_BOX);
if( !handled && (mMouseOpaque || showNamesTextBox) && pointInView( x, y ) && !tool_tip.empty())
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 63c1efc296..8248d50d9d 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -45,6 +45,7 @@
#include "llstring.h"
#include "llrect.h"
#include "llui.h"
+#include "lluistring.h"
#include "lluixmltags.h"
#include "llviewquery.h"
#include "llxmlnode.h"
@@ -154,7 +155,7 @@ protected:
BOOL mEnabled; // Enabled means "accepts input that has an effect on the state of the application."
// A disabled view, for example, may still have a scrollbar that responds to mouse events.
BOOL mMouseOpaque; // Opaque views handle all mouse events that are over their rect.
- LLString mToolTipMsg; // isNull() is true if none.
+ LLUIString mToolTipMsg; // isNull() is true if none.
U8 mSoundFlags;
BOOL mSaveToXML;
@@ -214,7 +215,8 @@ public:
// MANIPULATORS
//
void setMouseOpaque( BOOL b );
- void setToolTip( const LLString& msg );
+ void setToolTip( const LLStringExplicit& msg );
+ BOOL setToolTipArg( const LLStringExplicit& key, const LLStringExplicit& text );
virtual void setRect(const LLRect &rect);
void setFollows(U32 flags);