summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llcombobox.cpp2
-rw-r--r--indra/llui/lltabcontainer.cpp3
-rw-r--r--indra/llui/lluictrlfactory.cpp22
-rw-r--r--indra/llui/llview.cpp31
-rw-r--r--indra/llui/llview.h2
5 files changed, 54 insertions, 6 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index d64abfe698..fc7a29887b 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -747,7 +747,7 @@ BOOL LLComboBox::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_
if (LLUI::sShowXUINames)
{
- tool_tip = mName;
+ tool_tip = getShowNamesToolTip();
}
else
{
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 9c356f9524..1ba991f916 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -1048,7 +1048,7 @@ BOOL LLTabContainer::selectTab(S32 which)
// tuple->mTabPanel->setFocus(is_selected); // not clear that we want to do this here.
tuple->mButton->setToggleState( is_selected );
// RN: this limits tab-stops to active button only, which would require arrow keys to switch tabs
- tuple->mButton->setTabStop( is_selected && mTabList.size() > 1 );
+ tuple->mButton->setTabStop( is_selected );
if( is_selected && mMaxScrollPos > 0)
{
@@ -1466,4 +1466,3 @@ BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDrag
return LLView::handleDragAndDrop(x, y, mask, drop, type, cargo_data, accept, tooltip);
}
-
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index 7e286f0bee..7f62194e58 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -385,6 +385,7 @@ LLMenuGL *LLUICtrlFactory::buildMenu(const LLString &filename, LLView* parentp)
{
// TomY TODO: Break this function into buildMenu and buildMenuBar
LLXMLNodePtr root;
+ LLMenuGL* menu;
if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
{
@@ -398,12 +399,23 @@ LLMenuGL *LLUICtrlFactory::buildMenu(const LLString &filename, LLView* parentp)
return NULL;
}
+
+
if (root->hasName("menu"))
{
- return (LLMenuGL*)LLMenuGL::fromXML(root, parentp, this);
+ menu = (LLMenuGL*)LLMenuGL::fromXML(root, parentp, this);
+ }
+ else
+ {
+ menu = (LLMenuGL*)LLMenuBarGL::fromXML(root, parentp, this);
+ }
+
+ if (LLUI::sShowXUINames)
+ {
+ menu->mToolTipMsg = filename;
}
- return (LLMenuGL*)LLMenuBarGL::fromXML(root, parentp, this);
+ return menu;
}
//-----------------------------------------------------------------------------
@@ -432,6 +444,12 @@ LLPieMenu *LLUICtrlFactory::buildPieMenu(const LLString &filename, LLView* paren
LLPieMenu *menu = new LLPieMenu(name);
parentp->addChild(menu);
menu->initXML(root, parentp, this);
+
+ if (LLUI::sShowXUINames)
+ {
+ menu->mToolTipMsg = filename;
+ }
+
return menu;
}
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 6323a408bb..64ba319151 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -811,6 +811,35 @@ BOOL LLView::handleHover(S32 x, S32 y, MASK mask)
return handled;
}
+LLString LLView::getShowNamesToolTip()
+{
+ LLView* view = getParent();
+ LLString name;
+ LLString tool_tip = mName;
+
+ while (view)
+ {
+ name = view->getName();
+
+ if (name == "root") break;
+
+ if (view->getToolTip().find(".xml") != LLString::npos)
+ {
+ tool_tip = view->getToolTip() + "/" + tool_tip;
+ break;
+ }
+ else
+ {
+ tool_tip = view->getName() + "/" + tool_tip;
+ }
+
+ view = view->getParent();
+ }
+
+ return "/" + tool_tip;
+}
+
+
BOOL LLView::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_screen)
{
BOOL handled = FALSE;
@@ -834,7 +863,7 @@ BOOL LLView::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_scre
if (LLUI::sShowXUINames && (mToolTipMsg.find(".xml", 0) == LLString::npos) &&
(mName.find("Drag", 0) == LLString::npos))
{
- tool_tip = mName;
+ tool_tip = getShowNamesToolTip();
}
else
{
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 63d85fbcdc..9a36c56e3e 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -352,6 +352,8 @@ public:
// then display mToolTipMsg if no child handled it.
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect);
+ LLString getShowNamesToolTip();
+
virtual void draw();
void drawDebugRect();