diff options
author | James Cook <james@lindenlab.com> | 2009-10-03 23:40:28 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-10-03 23:40:28 +0000 |
commit | ada0f4fa221f2c7070fb02a2b7ff903bdde11c45 (patch) | |
tree | 0ede83511c304110138c01d16da2fff55162ef31 /indra/newview/llfloateruipreview.cpp | |
parent | b1a280841e1823a19658923a8eefeb67d1d70735 (diff) |
Merge inspectors UI project, gooey-4, into viewer-2 trunk. Added new tooltips to 3D avatars, 2D avatar names, and 3D objects. Refactors tooltips and text boxes, line editors, and text editors. Breaks LLExpandableTextBox, but a fix is coming.
Resolved conflicts in lltexteditor.cpp, llchatitemscontainerctrl.cpp, llchatmsgbox.cpp, llfloaterbuycurrency.cpp, llnearbychat.cpp, floater_buy_currency.xml, and ru/strings.xml
Merging revisions 134925-135157 of svn+ssh://svn.lindenlab.com/svn/linden/branches/gooey/gooey-4 into C:\source\viewer-2.0.0-3, respecting ancestry
Diffstat (limited to 'indra/newview/llfloateruipreview.cpp')
-rw-r--r-- | indra/newview/llfloateruipreview.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 2eb4e7580e..266252efea 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -500,6 +500,14 @@ void LLFloaterUIPreview::refreshList() } } found = TRUE; + while(found) // for every inspector file that matches the pattern + { + if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "inspect_*.xml", name, FALSE))) // get next file matching pattern + { + addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path) + } + } + found = TRUE; while(found) // for every menu file that matches the pattern { if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "menu_*.xml", name, FALSE))) // get next file matching pattern @@ -596,20 +604,12 @@ void LLFloaterUIPreview::addFloaterEntry(const std::string& path) void LLFloaterUIPreview::onClickDisplayFloater(S32 caller_id) { displayFloater(TRUE, caller_id); - if(caller_id == PRIMARY_FLOATER) - { - mDisplayedFloater->center(); // move displayed floater to the center of the screen - } } // Saves the current floater/panel void LLFloaterUIPreview::onClickSaveFloater(S32 caller_id) { displayFloater(TRUE, caller_id, true); - if(caller_id == PRIMARY_FLOATER) - { - mDisplayedFloater->center(); // move displayed floater to the center of the screen - } } // Saves all floater/panels @@ -672,7 +672,8 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) *floaterp = new LLPreviewedFloater(this); - if(!strncmp(path.c_str(),"floater_",8)) // if it's a floater + if(!strncmp(path.c_str(),"floater_",8) + || !strncmp(path.c_str(), "inspect_", 8)) // if it's a floater { if (save) { @@ -774,13 +775,6 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) mCloseOtherButton_2->setEnabled(TRUE); } - // *TODO: Make the secondary floater pop up next to the primary one. Doesn't seem to always work if secondary was up first... - if((mDisplayedFloater && ID == 2) || (mDisplayedFloater_2 && ID == 1)) - { - mDisplayedFloater_2->setSnapTarget(mDisplayedFloater->getHandle()); - mDisplayedFloater->addDependentFloater(mDisplayedFloater_2); - } - // Add localization to title so user knows whether it's localized or defaulted to en std::string full_path = getLocalizedDirectory() + path; std::string floater_lang = "EN"; @@ -793,6 +787,9 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) (ID == 1 ? " - Primary" : " - Secondary") + std::string("]"); (*floaterp)->setTitle(new_title); + (*floaterp)->center(); + addDependentFloater(*floaterp); + if(click && ID == 1 && !save) { // set up live file to track it |