From 4b87c45298879b3c0206cb97c5fa06c501830375 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sat, 24 Dec 2011 00:31:14 -0500 Subject: [PATCH 01/28] Highlight for selected line should be visible without eyestrain. --- indra/newview/skins/gemini/colors_base.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/gemini/colors_base.xml b/indra/newview/skins/gemini/colors_base.xml index 529d37fea..f2df52367 100644 --- a/indra/newview/skins/gemini/colors_base.xml +++ b/indra/newview/skins/gemini/colors_base.xml @@ -66,7 +66,7 @@ - + From 9d367cf9f21f0c1c44055fc3060dcf037f5bdcf5 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sat, 24 Dec 2011 08:29:58 -0500 Subject: [PATCH 02/28] Spelling fix --- indra/llinventory/llinventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 78de49ed1..7cc29bac8 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -226,7 +226,7 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream) } // exportFile should be replaced with exportLegacyStream -// not sure whether exportLegacyStream(llofstream(fp)) would work, fp may need to get icramented... +// not sure whether exportLegacyStream(llofstream(fp)) would work, fp may need to get incremented... BOOL LLInventoryObject::exportFile(LLFILE* fp, BOOL) const { std::string uuid_str; From ca96e00135a636227ec2152ce31d74eb6353be90 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Mon, 26 Dec 2011 23:40:18 -0600 Subject: [PATCH 03/28] Enable gl sync fence. Missed a vertexbuffer flush. moved LLMultiFloater out of llfloater.(h|cpp) and into its own header and source file, matching v2. --- indra/llrender/llvertexbuffer.cpp | 4 +- indra/llrender/llvertexbuffer.h | 2 +- indra/llui/CMakeLists.txt | 2 + indra/llui/llfloater.cpp | 526 +--------------------- indra/llui/llfloater.h | 78 +--- indra/llui/llmultifloater.cpp | 547 +++++++++++++++++++++++ indra/llui/llmultifloater.h | 103 +++++ indra/llui/lltabcontainer.cpp | 1 + indra/newview/llflexibleobject.h | 1 - indra/newview/llfloaterproperties.h | 2 +- indra/newview/llfloaterscriptdebug.h | 2 +- indra/newview/llfloatersearchreplace.cpp | 1 + indra/newview/llhudobject.h | 2 +- indra/newview/llimview.h | 2 +- indra/newview/llmorphview.cpp | 26 +- indra/newview/llpreview.h | 2 +- indra/newview/llviewermessage.cpp | 15 +- indra/newview/llvoground.cpp | 2 +- indra/newview/llvosurfacepatch.cpp | 2 +- 19 files changed, 696 insertions(+), 624 deletions(-) create mode 100644 indra/llui/llmultifloater.cpp create mode 100644 indra/llui/llmultifloater.h diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 9e30f1893..51543c924 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -88,8 +88,6 @@ BOOL LLVertexBuffer::sPreferStreamDraw = FALSE; const U32 FENCE_WAIT_TIME_NANOSECONDS = 10000; //1 ms -#undef GL_ARB_sync - class LLGLSyncFence : public LLGLFence { public: @@ -2115,7 +2113,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) } // virtual (default) -void LLVertexBuffer::setupVertexBuffer(U32 data_mask) const +void LLVertexBuffer::setupVertexBuffer(U32 data_mask) { LLMemType mt(LLMemType::MTYPE_VERTEX_DATA); stop_glerror(); diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index 310904ce7..85ad44693 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -192,7 +192,7 @@ protected: virtual ~LLVertexBuffer(); // use unref() - virtual void setupVertexBuffer(U32 data_mask) const; // pure virtual, called from mapBuffer() + virtual void setupVertexBuffer(U32 data_mask); // pure virtual, called from mapBuffer() void setupVertexArray(); void genBuffer(U32 size); diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 8ca2aa726..409ffa4f1 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -41,6 +41,7 @@ set(llui_SOURCE_FILES lllineeditor.cpp llmenugl.cpp llmodaldialog.cpp + llmultifloater.cpp llmultislider.cpp llmultisliderctrl.cpp llnotifications.cpp @@ -101,6 +102,7 @@ set(llui_HEADER_FILES llmemberlistener.h llmenugl.h llmodaldialog.h + llmultifloater.h llmultisliderctrl.h llmultislider.h llnotificationptr.h diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index dfc6f2c6e..32af5ca47 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -35,7 +35,7 @@ #include "linden_common.h" -#include "llfloater.h" +#include "llmultifloater.h" #include "llfocusmgr.h" @@ -2480,519 +2480,7 @@ void LLFloaterView::popVisibleAll(const skip_list_t& skip_list) } } -// -// LLMultiFloater -// -LLMultiFloater::LLMultiFloater() : - mTabContainer(NULL), - mTabPos(LLTabContainer::TOP), - mAutoResize(TRUE), - mOrigMinWidth(0), - mOrigMinHeight(0) -{ - -} - -LLMultiFloater::LLMultiFloater(LLTabContainer::TabPosition tab_pos) : - mTabContainer(NULL), - mTabPos(tab_pos), - mAutoResize(TRUE), - mOrigMinWidth(0), - mOrigMinHeight(0) -{ - -} - -LLMultiFloater::LLMultiFloater(const std::string &name) : - LLFloater(name), - mTabContainer(NULL), - mTabPos(LLTabContainer::TOP), - mAutoResize(FALSE), - mOrigMinWidth(0), - mOrigMinHeight(0) -{ -} - -LLMultiFloater::LLMultiFloater( - const std::string& name, - const LLRect& rect, - LLTabContainer::TabPosition tab_pos, - BOOL auto_resize) : - LLFloater(name, rect, name), - mTabContainer(NULL), - mTabPos(LLTabContainer::TOP), - mAutoResize(auto_resize), - mOrigMinWidth(0), - mOrigMinHeight(0) -{ - mTabContainer = new LLTabContainer(std::string("Preview Tabs"), - LLRect(LLPANEL_BORDER_WIDTH, getRect().getHeight() - LLFLOATER_HEADER_SIZE, getRect().getWidth() - LLPANEL_BORDER_WIDTH, 0), - mTabPos, - FALSE, - FALSE); - mTabContainer->setFollowsAll(); - if (isResizable()) - { - mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH); - } - - addChild(mTabContainer); -} - -LLMultiFloater::LLMultiFloater( - const std::string& name, - const std::string& rect_control, - LLTabContainer::TabPosition tab_pos, - BOOL auto_resize) : - LLFloater(name, rect_control, name), - mTabContainer(NULL), - mTabPos(tab_pos), - mAutoResize(auto_resize), - mOrigMinWidth(0), - mOrigMinHeight(0) -{ - mTabContainer = new LLTabContainer(std::string("Preview Tabs"), - LLRect(LLPANEL_BORDER_WIDTH, getRect().getHeight() - LLFLOATER_HEADER_SIZE, getRect().getWidth() - LLPANEL_BORDER_WIDTH, 0), - mTabPos, - FALSE, - FALSE); - mTabContainer->setFollowsAll(); - if (isResizable() && mTabPos == LLTabContainer::BOTTOM) - { - mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH); - } - - addChild(mTabContainer); - -} - -// virtual -LLXMLNodePtr LLMultiFloater::getXML(bool save_children) const -{ - LLXMLNodePtr node = LLFloater::getXML(); - - node->setName(LL_MULTI_FLOATER_TAG); - - return node; -} - -void LLMultiFloater::open() /* Flawfinder: ignore */ -{ - if (mTabContainer->getTabCount() > 0) - { - LLFloater::open(); /* Flawfinder: ignore */ - } - else - { - // for now, don't allow multifloaters - // without any child floaters - close(); - } -} - -void LLMultiFloater::onClose(bool app_quitting) -{ - if(closeAllFloaters() == TRUE) - { - LLFloater::onClose(app_quitting); - }//else not all tabs could be closed... -} - -void LLMultiFloater::draw() -{ - if (mTabContainer->getTabCount() == 0) - { - //RN: could this potentially crash in draw hierarchy? - close(); - } - else - { - for (S32 i = 0; i < mTabContainer->getTabCount(); i++) - { - LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(i); - if (floaterp->getShortTitle() != mTabContainer->getPanelTitle(i)) - { - mTabContainer->setPanelTitle(i, floaterp->getShortTitle()); - } - } - LLFloater::draw(); - } -} - -BOOL LLMultiFloater::closeAllFloaters() -{ - S32 tabToClose = 0; - S32 lastTabCount = mTabContainer->getTabCount(); - while (tabToClose < mTabContainer->getTabCount()) - { - LLFloater* first_floater = (LLFloater*)mTabContainer->getPanelByIndex(tabToClose); - first_floater->close(); - if(lastTabCount == mTabContainer->getTabCount()) - { - //Tab did not actually close, possibly due to a pending Save Confirmation dialog.. - //so try and close the next one in the list... - tabToClose++; - }else - { - //Tab closed ok. - lastTabCount = mTabContainer->getTabCount(); - } - } - if( mTabContainer->getTabCount() != 0 ) - return FALSE; // Couldn't close all the tabs (pending save dialog?) so return FALSE. - return TRUE; //else all tabs were successfully closed... -} - -void LLMultiFloater::growToFit(S32 content_width, S32 content_height) -{ - S32 new_width = llmax(getRect().getWidth(), content_width + LLPANEL_BORDER_WIDTH * 2); - S32 new_height = llmax(getRect().getHeight(), content_height + LLFLOATER_HEADER_SIZE + TABCNTR_HEADER_HEIGHT); - - if (isMinimized()) - { - LLRect newrect; - newrect.setLeftTopAndSize(getExpandedRect().mLeft, getExpandedRect().mTop, new_width, new_height); - setExpandedRect(newrect); - } - else - { - S32 old_height = getRect().getHeight(); - reshape(new_width, new_height); - // keep top left corner in same position - translate(0, old_height - new_height); - } -} - -/** - void addFloater(LLFloater* floaterp, BOOL select_added_floater) - - Adds the LLFloater pointed to by floaterp to this. - If floaterp is already hosted by this, then it is re-added to get - new titles, etc. - If select_added_floater is true, the LLFloater pointed to by floaterp will - become the selected tab in this - - Affects: mTabContainer, floaterp -**/ -void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point) -{ - if (!floaterp) - { - return; - } - - if (!mTabContainer) - { - llerrs << "Tab Container used without having been initialized." << llendl; - return; - } - - if (floaterp->getHost() == this) - { - // already hosted by me, remove - // do this so we get updated title, etc. - mFloaterDataMap.erase(floaterp->getHandle()); - mTabContainer->removeTabPanel(floaterp); - } - else if (floaterp->getHost()) - { - // floaterp is hosted by somebody else and - // this is adding it, so remove it from it's old host - floaterp->getHost()->removeFloater(floaterp); - } - else if (floaterp->getParent() == gFloaterView) - { - // rehost preview floater as child panel - gFloaterView->removeChild(floaterp); - } - - // store original configuration - LLFloaterData floater_data; - floater_data.mWidth = floaterp->getRect().getWidth(); - floater_data.mHeight = floaterp->getRect().getHeight(); - floater_data.mCanMinimize = floaterp->isMinimizeable(); - floater_data.mCanResize = floaterp->isResizable(); - - // remove minimize and close buttons - floaterp->setCanMinimize(FALSE); - floaterp->setCanResize(FALSE); - floaterp->setCanDrag(FALSE); - floaterp->storeRectControl(); - // avoid double rendering of floater background (makes it more opaque) - floaterp->setBackgroundVisible(FALSE); - - if (mAutoResize) - { - growToFit(floater_data.mWidth, floater_data.mHeight); - } - - //add the panel, add it to proper maps - mTabContainer->addTabPanel(floaterp, floaterp->getShortTitle(), FALSE, onTabSelected, this, 0, FALSE, insertion_point); - mFloaterDataMap[floaterp->getHandle()] = floater_data; - - updateResizeLimits(); - - if ( select_added_floater ) - { - mTabContainer->selectTabPanel(floaterp); - } - else - { - // reassert visible tab (hiding new floater if necessary) - mTabContainer->selectTab(mTabContainer->getCurrentPanelIndex()); - } - - floaterp->setHost(this); - if (isMinimized()) - { - floaterp->setVisible(FALSE); - } -} - -/** - BOOL selectFloater(LLFloater* floaterp) - - If the LLFloater pointed to by floaterp is hosted by this, - then its tab is selected and returns true. Otherwise returns false. - - Affects: mTabContainer -**/ -BOOL LLMultiFloater::selectFloater(LLFloater* floaterp) -{ - return mTabContainer->selectTabPanel(floaterp); -} - -// virtual -void LLMultiFloater::selectNextFloater() -{ - mTabContainer->selectNextTab(); -} - -// virtual -void LLMultiFloater::selectPrevFloater() -{ - mTabContainer->selectPrevTab(); -} - -void LLMultiFloater::showFloater(LLFloater* floaterp) -{ - // we won't select a panel that already is selected - // it is hard to do this internally to tab container - // as tab selection is handled via index and the tab at a given - // index might have changed - if (floaterp != mTabContainer->getCurrentPanel() && - !mTabContainer->selectTabPanel(floaterp)) - { - addFloater(floaterp, TRUE); - } -} - -void LLMultiFloater::removeFloater(LLFloater* floaterp) -{ - if ( floaterp->getHost() != this ) - return; - - floater_data_map_t::iterator found_data_it = mFloaterDataMap.find(floaterp->getHandle()); - if (found_data_it != mFloaterDataMap.end()) - { - LLFloaterData& floater_data = found_data_it->second; - floaterp->setCanMinimize(floater_data.mCanMinimize); - if (!floater_data.mCanResize) - { - // restore original size - floaterp->reshape(floater_data.mWidth, floater_data.mHeight); - } - floaterp->setCanResize(floater_data.mCanResize); - mFloaterDataMap.erase(found_data_it); - } - mTabContainer->removeTabPanel(floaterp); - floaterp->setBackgroundVisible(TRUE); - floaterp->setCanDrag(TRUE); - floaterp->setHost(NULL); - floaterp->applyRectControl(); - - updateResizeLimits(); - - tabOpen((LLFloater*)mTabContainer->getCurrentPanel(), false); -} - -void LLMultiFloater::tabOpen(LLFloater* opened_floater, bool from_click) -{ - // default implementation does nothing -} - -void LLMultiFloater::tabClose() -{ - if (mTabContainer->getTabCount() == 0) - { - // no more children, close myself - close(); - } -} - -void LLMultiFloater::setVisible(BOOL visible) -{ - // *FIX: shouldn't have to do this, fix adding to minimized multifloater - LLFloater::setVisible(visible); - - if (mTabContainer) - { - LLPanel* cur_floaterp = mTabContainer->getCurrentPanel(); - - if (cur_floaterp) - { - cur_floaterp->setVisible(visible); - } - - // if no tab selected, and we're being shown, - // select last tab to be added - if (visible && !cur_floaterp) - { - mTabContainer->selectLastTab(); - } - } -} - -BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask) -{ - if (key == 'W' && mask == MASK_CONTROL) - { - LLFloater* floater = getActiveFloater(); - // is user closeable and is system closeable - if (floater && floater->canClose() && floater->isCloseable()) - { - floater->close(); - } - return TRUE; - } - - return LLFloater::handleKeyHere(key, mask); -} - -LLFloater* LLMultiFloater::getActiveFloater() -{ - return (LLFloater*)mTabContainer->getCurrentPanel(); -} - -S32 LLMultiFloater::getFloaterCount() -{ - return mTabContainer->getTabCount(); -} - -/** - BOOL isFloaterFlashing(LLFloater* floaterp) - - Returns true if the LLFloater pointed to by floaterp - is currently in a flashing state and is hosted by this. - False otherwise. - - Requires: floaterp != NULL -**/ -BOOL LLMultiFloater::isFloaterFlashing(LLFloater* floaterp) -{ - if ( floaterp && floaterp->getHost() == this ) - return mTabContainer->getTabPanelFlashing(floaterp); - - return FALSE; -} - -/** - BOOL setFloaterFlashing(LLFloater* floaterp, BOOL flashing) - - Sets the current flashing state of the LLFloater pointed - to by floaterp to be the BOOL flashing if the LLFloater pointed - to by floaterp is hosted by this. - - Requires: floaterp != NULL -**/ -void LLMultiFloater::setFloaterFlashing(LLFloater* floaterp, BOOL flashing) -{ - if ( floaterp && floaterp->getHost() == this ) - mTabContainer->setTabPanelFlashing(floaterp, flashing); -} - -//static -void LLMultiFloater::onTabSelected(void* userdata, bool from_click) -{ - LLMultiFloater* floaterp = (LLMultiFloater*)userdata; - - floaterp->tabOpen((LLFloater*)floaterp->mTabContainer->getCurrentPanel(), from_click); -} - -void LLMultiFloater::setCanResize(BOOL can_resize) -{ - LLFloater::setCanResize(can_resize); - if (isResizable() && mTabContainer->getTabPosition() == LLTabContainer::BOTTOM) - { - mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH); - } - else - { - mTabContainer->setRightTabBtnOffset(0); - } -} - -BOOL LLMultiFloater::postBuild() -{ - // remember any original xml minimum size - getResizeLimits(&mOrigMinWidth, &mOrigMinHeight); - - if (mTabContainer) - { - return TRUE; - } - - requires("Preview Tabs"); - if (checkRequirements()) - { - mTabContainer = getChild("Preview Tabs"); - return TRUE; - } - - return FALSE; -} - -void LLMultiFloater::updateResizeLimits() -{ - // initialize minimum size constraint to the original xml values. - S32 new_min_width = mOrigMinWidth; - S32 new_min_height = mOrigMinHeight; - // possibly increase minimum size constraint due to children's minimums. - for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) - { - LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(tab_idx); - if (floaterp) - { - new_min_width = llmax(new_min_width, floaterp->getMinWidth() + LLPANEL_BORDER_WIDTH * 2); - new_min_height = llmax(new_min_height, floaterp->getMinHeight() + LLFLOATER_HEADER_SIZE + TABCNTR_HEADER_HEIGHT); - } - } - setResizeLimits(new_min_width, new_min_height); - - S32 cur_height = getRect().getHeight(); - S32 new_width = llmax(getRect().getWidth(), new_min_width); - S32 new_height = llmax(getRect().getHeight(), new_min_height); - - if (isMinimized()) - { - const LLRect& expanded = getExpandedRect(); - LLRect newrect; - newrect.setLeftTopAndSize(expanded.mLeft, expanded.mTop, llmax(expanded.getWidth(), new_width), llmax(expanded.getHeight(), new_height)); - setExpandedRect(newrect); - } - else - { - reshape(new_width, new_height); - - // make sure upper left corner doesn't move - translate(0, cur_height - getRect().getHeight()); - - // make sure this window is visible on screen when it has been modified - // (tab added, etc) - gFloaterView->adjustToFitScreen(this, TRUE); - } -} // virtual LLXMLNodePtr LLFloater::getXML(bool save_children) const @@ -3129,3 +2617,15 @@ void LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor moveResizeHandlesToFront(); } + +/*static */void VisibilityPolicy::show(LLFloater* instance, const LLSD& key) +{ + if (instance) + { + instance->open(); + if (instance->getHost()) + { + instance->getHost()->open(); + } + } +} diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 315ca14de..939071b0f 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -90,7 +90,8 @@ private: class LLFloater : public LLPanel { -friend class LLFloaterView; + friend class LLFloaterView; + friend class LLMultiFloater; public: enum EFloaterButtons { @@ -395,69 +396,6 @@ private: S32 mSnapOffsetBottom; }; -// https://wiki.lindenlab.com/mediawiki/index.php?title=LLMultiFloater&oldid=81376 -class LLMultiFloater : public LLFloater -{ -public: - LLMultiFloater(); - LLMultiFloater(LLTabContainer::TabPosition tab_pos); - LLMultiFloater(const std::string& name); - LLMultiFloater(const std::string& name, const LLRect& rect, LLTabContainer::TabPosition tab_pos = LLTabContainer::TOP, BOOL auto_resize = TRUE); - LLMultiFloater(const std::string& name, const std::string& rect_control, LLTabContainer::TabPosition tab_pos = LLTabContainer::TOP, BOOL auto_resize = TRUE); - virtual ~LLMultiFloater() {}; - - virtual BOOL postBuild(); - virtual LLXMLNodePtr getXML(bool save_children = true) const; - /*virtual*/ void open(); /* Flawfinder: ignore */ - /*virtual*/ void onClose(bool app_quitting); - /*virtual*/ void draw(); - /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); - - virtual void setCanResize(BOOL can_resize); - virtual void growToFit(S32 content_width, S32 content_height); - virtual void addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); - - virtual void showFloater(LLFloater* floaterp); - virtual void removeFloater(LLFloater* floaterp); - - virtual void tabOpen(LLFloater* opened_floater, bool from_click); - virtual void tabClose(); - - virtual BOOL selectFloater(LLFloater* floaterp); - virtual void selectNextFloater(); - virtual void selectPrevFloater(); - - virtual LLFloater* getActiveFloater(); - virtual BOOL isFloaterFlashing(LLFloater* floaterp); - virtual S32 getFloaterCount(); - - virtual void setFloaterFlashing(LLFloater* floaterp, BOOL flashing); - virtual BOOL closeAllFloaters(); //Returns FALSE if the floater could not be closed due to pending confirmation dialogs - void setTabContainer(LLTabContainer* tab_container) { if (!mTabContainer) mTabContainer = tab_container; } - static void onTabSelected(void* userdata, bool); - - virtual void updateResizeLimits(); - -protected: - struct LLFloaterData - { - S32 mWidth; - S32 mHeight; - BOOL mCanMinimize; - BOOL mCanResize; - }; - - LLTabContainer* mTabContainer; - - typedef std::map, LLFloaterData> floater_data_map_t; - floater_data_map_t mFloaterDataMap; - - LLTabContainer::TabPosition mTabPos; - BOOL mAutoResize; - S32 mOrigMinWidth, mOrigMinHeight; // logically const but initialized late -}; - // visibility policy specialized for floaters template<> class VisibilityPolicy @@ -473,17 +411,7 @@ public: return FALSE; } - static void show(LLFloater* instance, const LLSD& key) - { - if (instance) - { - instance->open(); - if (instance->getHost()) - { - instance->getHost()->open(); - } - } - } + static void show(LLFloater* instance, const LLSD& key); static void hide(LLFloater* instance, const LLSD& key) { diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp new file mode 100644 index 000000000..29ea32816 --- /dev/null +++ b/indra/llui/llmultifloater.cpp @@ -0,0 +1,547 @@ +/** + * @file llmultifloater.cpp + * @brief LLFloater that hosts other floaters + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +// Floating "windows" within the GL display, like the inventory floater, +// mini-map floater, etc. + +#include "linden_common.h" + +#include "llmultifloater.h" +#include "llresizehandle.h" + +// +// LLMultiFloater +// + +LLMultiFloater::LLMultiFloater() : + mTabContainer(NULL), + mTabPos(LLTabContainer::TOP), + mAutoResize(TRUE), + mOrigMinWidth(0), + mOrigMinHeight(0) +{ + +} + +LLMultiFloater::LLMultiFloater(LLTabContainer::TabPosition tab_pos) : + mTabContainer(NULL), + mTabPos(tab_pos), + mAutoResize(TRUE), + mOrigMinWidth(0), + mOrigMinHeight(0) +{ + +} + +LLMultiFloater::LLMultiFloater(const std::string &name) : + LLFloater(name), + mTabContainer(NULL), + mTabPos(LLTabContainer::TOP), + mAutoResize(FALSE), + mOrigMinWidth(0), + mOrigMinHeight(0) +{ +} + +LLMultiFloater::LLMultiFloater( + const std::string& name, + const LLRect& rect, + LLTabContainer::TabPosition tab_pos, + BOOL auto_resize) : + LLFloater(name, rect, name), + mTabContainer(NULL), + mTabPos(LLTabContainer::TOP), + mAutoResize(auto_resize), + mOrigMinWidth(0), + mOrigMinHeight(0) +{ + mTabContainer = new LLTabContainer(std::string("Preview Tabs"), + LLRect(LLPANEL_BORDER_WIDTH, getRect().getHeight() - LLFLOATER_HEADER_SIZE, getRect().getWidth() - LLPANEL_BORDER_WIDTH, 0), + mTabPos, + FALSE, + FALSE); + mTabContainer->setFollowsAll(); + if (isResizable()) + { + mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH); + } + + addChild(mTabContainer); +} + +LLMultiFloater::LLMultiFloater( + const std::string& name, + const std::string& rect_control, + LLTabContainer::TabPosition tab_pos, + BOOL auto_resize) : + LLFloater(name, rect_control, name), + mTabContainer(NULL), + mTabPos(tab_pos), + mAutoResize(auto_resize), + mOrigMinWidth(0), + mOrigMinHeight(0) +{ + mTabContainer = new LLTabContainer(std::string("Preview Tabs"), + LLRect(LLPANEL_BORDER_WIDTH, getRect().getHeight() - LLFLOATER_HEADER_SIZE, getRect().getWidth() - LLPANEL_BORDER_WIDTH, 0), + mTabPos, + FALSE, + FALSE); + mTabContainer->setFollowsAll(); + if (isResizable() && mTabPos == LLTabContainer::BOTTOM) + { + mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH); + } + + addChild(mTabContainer); + +} + +// virtual +LLXMLNodePtr LLMultiFloater::getXML(bool save_children) const +{ + LLXMLNodePtr node = LLFloater::getXML(); + + node->setName(LL_MULTI_FLOATER_TAG); + + return node; +} + +void LLMultiFloater::open() /* Flawfinder: ignore */ +{ + if (mTabContainer->getTabCount() > 0) + { + LLFloater::open(); /* Flawfinder: ignore */ + } + else + { + // for now, don't allow multifloaters + // without any child floaters + close(); + } +} + +void LLMultiFloater::onClose(bool app_quitting) +{ + if(closeAllFloaters() == TRUE) + { + LLFloater::onClose(app_quitting); + }//else not all tabs could be closed... +} + +void LLMultiFloater::draw() +{ + if (mTabContainer->getTabCount() == 0) + { + //RN: could this potentially crash in draw hierarchy? + close(); + } + else + { + for (S32 i = 0; i < mTabContainer->getTabCount(); i++) + { + LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(i); + if (floaterp->getShortTitle() != mTabContainer->getPanelTitle(i)) + { + mTabContainer->setPanelTitle(i, floaterp->getShortTitle()); + } + } + LLFloater::draw(); + } +} + +BOOL LLMultiFloater::closeAllFloaters() +{ + S32 tabToClose = 0; + S32 lastTabCount = mTabContainer->getTabCount(); + while (tabToClose < mTabContainer->getTabCount()) + { + LLFloater* first_floater = (LLFloater*)mTabContainer->getPanelByIndex(tabToClose); + first_floater->close(); + if(lastTabCount == mTabContainer->getTabCount()) + { + //Tab did not actually close, possibly due to a pending Save Confirmation dialog.. + //so try and close the next one in the list... + tabToClose++; + }else + { + //Tab closed ok. + lastTabCount = mTabContainer->getTabCount(); + } + } + if( mTabContainer->getTabCount() != 0 ) + return FALSE; // Couldn't close all the tabs (pending save dialog?) so return FALSE. + return TRUE; //else all tabs were successfully closed... +} + +void LLMultiFloater::growToFit(S32 content_width, S32 content_height) +{ + S32 new_width = llmax(getRect().getWidth(), content_width + LLPANEL_BORDER_WIDTH * 2); + S32 new_height = llmax(getRect().getHeight(), content_height + LLFLOATER_HEADER_SIZE + TABCNTR_HEADER_HEIGHT); + + if (isMinimized()) + { + LLRect newrect; + newrect.setLeftTopAndSize(getExpandedRect().mLeft, getExpandedRect().mTop, new_width, new_height); + setExpandedRect(newrect); + } + else + { + S32 old_height = getRect().getHeight(); + reshape(new_width, new_height); + // keep top left corner in same position + translate(0, old_height - new_height); + } +} + +/** + void addFloater(LLFloater* floaterp, BOOL select_added_floater) + + Adds the LLFloater pointed to by floaterp to this. + If floaterp is already hosted by this, then it is re-added to get + new titles, etc. + If select_added_floater is true, the LLFloater pointed to by floaterp will + become the selected tab in this + + Affects: mTabContainer, floaterp +**/ +void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point) +{ + if (!floaterp) + { + return; + } + + if (!mTabContainer) + { + llerrs << "Tab Container used without having been initialized." << llendl; + return; + } + + if (floaterp->getHost() == this) + { + // already hosted by me, remove + // do this so we get updated title, etc. + mFloaterDataMap.erase(floaterp->getHandle()); + mTabContainer->removeTabPanel(floaterp); + } + else if (floaterp->getHost()) + { + // floaterp is hosted by somebody else and + // this is adding it, so remove it from it's old host + floaterp->getHost()->removeFloater(floaterp); + } + else if (floaterp->getParent() == gFloaterView) + { + // rehost preview floater as child panel + gFloaterView->removeChild(floaterp); + } + + // store original configuration + LLFloaterData floater_data; + floater_data.mWidth = floaterp->getRect().getWidth(); + floater_data.mHeight = floaterp->getRect().getHeight(); + floater_data.mCanMinimize = floaterp->isMinimizeable(); + floater_data.mCanResize = floaterp->isResizable(); + + // remove minimize and close buttons + floaterp->setCanMinimize(FALSE); + floaterp->setCanResize(FALSE); + floaterp->setCanDrag(FALSE); + floaterp->storeRectControl(); + // avoid double rendering of floater background (makes it more opaque) + floaterp->setBackgroundVisible(FALSE); + + if (mAutoResize) + { + growToFit(floater_data.mWidth, floater_data.mHeight); + } + + //add the panel, add it to proper maps + mTabContainer->addTabPanel(floaterp, floaterp->getShortTitle(), FALSE, onTabSelected, this, 0, FALSE, insertion_point); + mFloaterDataMap[floaterp->getHandle()] = floater_data; + + updateResizeLimits(); + + if ( select_added_floater ) + { + mTabContainer->selectTabPanel(floaterp); + } + else + { + // reassert visible tab (hiding new floater if necessary) + mTabContainer->selectTab(mTabContainer->getCurrentPanelIndex()); + } + + floaterp->setHost(this); + if (isMinimized()) + { + floaterp->setVisible(FALSE); + } +} + +/** + BOOL selectFloater(LLFloater* floaterp) + + If the LLFloater pointed to by floaterp is hosted by this, + then its tab is selected and returns true. Otherwise returns false. + + Affects: mTabContainer +**/ +BOOL LLMultiFloater::selectFloater(LLFloater* floaterp) +{ + return mTabContainer->selectTabPanel(floaterp); +} + +// virtual +void LLMultiFloater::selectNextFloater() +{ + mTabContainer->selectNextTab(); +} + +// virtual +void LLMultiFloater::selectPrevFloater() +{ + mTabContainer->selectPrevTab(); +} + +void LLMultiFloater::showFloater(LLFloater* floaterp) +{ + // we won't select a panel that already is selected + // it is hard to do this internally to tab container + // as tab selection is handled via index and the tab at a given + // index might have changed + if (floaterp != mTabContainer->getCurrentPanel() && + !mTabContainer->selectTabPanel(floaterp)) + { + addFloater(floaterp, TRUE); + } +} + +void LLMultiFloater::removeFloater(LLFloater* floaterp) +{ + if (!floaterp || floaterp->getHost() != this ) + return; + + floater_data_map_t::iterator found_data_it = mFloaterDataMap.find(floaterp->getHandle()); + if (found_data_it != mFloaterDataMap.end()) + { + LLFloaterData& floater_data = found_data_it->second; + floaterp->setCanMinimize(floater_data.mCanMinimize); + if (!floater_data.mCanResize) + { + // restore original size + floaterp->reshape(floater_data.mWidth, floater_data.mHeight); + } + floaterp->setCanResize(floater_data.mCanResize); + mFloaterDataMap.erase(found_data_it); + } + mTabContainer->removeTabPanel(floaterp); + floaterp->setBackgroundVisible(TRUE); + floaterp->setCanDrag(TRUE); + floaterp->setHost(NULL); + floaterp->applyRectControl(); + + updateResizeLimits(); + + tabOpen((LLFloater*)mTabContainer->getCurrentPanel(), false); +} + +void LLMultiFloater::tabOpen(LLFloater* opened_floater, bool from_click) +{ + // default implementation does nothing +} + +void LLMultiFloater::tabClose() +{ + if (mTabContainer->getTabCount() == 0) + { + // no more children, close myself + close(); + } +} + +void LLMultiFloater::setVisible(BOOL visible) +{ + // *FIX: shouldn't have to do this, fix adding to minimized multifloater + LLFloater::setVisible(visible); + + if (mTabContainer) + { + LLPanel* cur_floaterp = mTabContainer->getCurrentPanel(); + + if (cur_floaterp) + { + cur_floaterp->setVisible(visible); + } + + // if no tab selected, and we're being shown, + // select last tab to be added + if (visible && !cur_floaterp) + { + mTabContainer->selectLastTab(); + } + } +} + +BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask) +{ + if (key == 'W' && mask == MASK_CONTROL) + { + LLFloater* floater = getActiveFloater(); + // is user closeable and is system closeable + if (floater && floater->canClose() && floater->isCloseable()) + { + floater->close(); + } + return TRUE; + } + + return LLFloater::handleKeyHere(key, mask); +} + +LLFloater* LLMultiFloater::getActiveFloater() +{ + return (LLFloater*)mTabContainer->getCurrentPanel(); +} + +S32 LLMultiFloater::getFloaterCount() +{ + return mTabContainer->getTabCount(); +} + +/** + BOOL isFloaterFlashing(LLFloater* floaterp) + + Returns true if the LLFloater pointed to by floaterp + is currently in a flashing state and is hosted by this. + False otherwise. + + Requires: floaterp != NULL +**/ +BOOL LLMultiFloater::isFloaterFlashing(LLFloater* floaterp) +{ + if ( floaterp && floaterp->getHost() == this ) + return mTabContainer->getTabPanelFlashing(floaterp); + + return FALSE; +} + +/** + BOOL setFloaterFlashing(LLFloater* floaterp, BOOL flashing) + + Sets the current flashing state of the LLFloater pointed + to by floaterp to be the BOOL flashing if the LLFloater pointed + to by floaterp is hosted by this. + + Requires: floaterp != NULL +**/ +void LLMultiFloater::setFloaterFlashing(LLFloater* floaterp, BOOL flashing) +{ + if ( floaterp && floaterp->getHost() == this ) + mTabContainer->setTabPanelFlashing(floaterp, flashing); +} + +//static +void LLMultiFloater::onTabSelected(void* userdata, bool from_click) +{ + LLMultiFloater* floaterp = (LLMultiFloater*)userdata; + + floaterp->tabOpen((LLFloater*)floaterp->mTabContainer->getCurrentPanel(), from_click); +} + +void LLMultiFloater::setCanResize(BOOL can_resize) +{ + LLFloater::setCanResize(can_resize); + if (isResizable() && mTabContainer->getTabPosition() == LLTabContainer::BOTTOM) + { + mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH); + } + else + { + mTabContainer->setRightTabBtnOffset(0); + } +} + +BOOL LLMultiFloater::postBuild() +{ + // remember any original xml minimum size + getResizeLimits(&mOrigMinWidth, &mOrigMinHeight); + + if (mTabContainer) + { + return TRUE; + } + + requires("Preview Tabs"); + if (checkRequirements()) + { + mTabContainer = getChild("Preview Tabs"); + return TRUE; + } + + return FALSE; +} + +void LLMultiFloater::updateResizeLimits() +{ + // initialize minimum size constraint to the original xml values. + S32 new_min_width = mOrigMinWidth; + S32 new_min_height = mOrigMinHeight; + // possibly increase minimum size constraint due to children's minimums. + for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) + { + LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(tab_idx); + if (floaterp) + { + new_min_width = llmax(new_min_width, floaterp->getMinWidth() + LLPANEL_BORDER_WIDTH * 2); + new_min_height = llmax(new_min_height, floaterp->getMinHeight() + LLFLOATER_HEADER_SIZE + TABCNTR_HEADER_HEIGHT); + } + } + setResizeLimits(new_min_width, new_min_height); + + S32 cur_height = getRect().getHeight(); + S32 new_width = llmax(getRect().getWidth(), new_min_width); + S32 new_height = llmax(getRect().getHeight(), new_min_height); + + if (isMinimized()) + { + const LLRect& expanded = getExpandedRect(); + LLRect newrect; + newrect.setLeftTopAndSize(expanded.mLeft, expanded.mTop, llmax(expanded.getWidth(), new_width), llmax(expanded.getHeight(), new_height)); + setExpandedRect(newrect); + } + else + { + reshape(new_width, new_height); + + // make sure upper left corner doesn't move + translate(0, cur_height - getRect().getHeight()); + + // make sure this window is visible on screen when it has been modified + // (tab added, etc) + gFloaterView->adjustToFitScreen(this, TRUE); + } +} diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h new file mode 100644 index 000000000..29c03b3c4 --- /dev/null +++ b/indra/llui/llmultifloater.h @@ -0,0 +1,103 @@ +/** + * @file llmultifloater.h + * @brief LLFloater that hosts other floaters + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +// Floating "windows" within the GL display, like the inventory floater, +// mini-map floater, etc. + + +#ifndef LL_MULTI_FLOATER_H +#define LL_MULTI_FLOATER_H + +#include "llfloater.h" +#include "lltabcontainer.h" // for LLTabContainer::eInsertionPoint + +// https://wiki.lindenlab.com/mediawiki/index.php?title=LLMultiFloater&oldid=81376 +class LLMultiFloater : public LLFloater +{ +public: + LLMultiFloater(); + LLMultiFloater(LLTabContainer::TabPosition tab_pos); + LLMultiFloater(const std::string& name); + LLMultiFloater(const std::string& name, const LLRect& rect, LLTabContainer::TabPosition tab_pos = LLTabContainer::TOP, BOOL auto_resize = TRUE); + LLMultiFloater(const std::string& name, const std::string& rect_control, LLTabContainer::TabPosition tab_pos = LLTabContainer::TOP, BOOL auto_resize = TRUE); + virtual ~LLMultiFloater() {}; + + virtual BOOL postBuild(); + virtual LLXMLNodePtr getXML(bool save_children = true) const; + /*virtual*/ void open(); /* Flawfinder: ignore */ + /*virtual*/ void onClose(bool app_quitting); + /*virtual*/ void draw(); + /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + + virtual void setCanResize(BOOL can_resize); + virtual void growToFit(S32 content_width, S32 content_height); + virtual void addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); + + virtual void showFloater(LLFloater* floaterp); + virtual void removeFloater(LLFloater* floaterp); + + virtual void tabOpen(LLFloater* opened_floater, bool from_click); + virtual void tabClose(); + + virtual BOOL selectFloater(LLFloater* floaterp); + virtual void selectNextFloater(); + virtual void selectPrevFloater(); + + virtual LLFloater* getActiveFloater(); + virtual BOOL isFloaterFlashing(LLFloater* floaterp); + virtual S32 getFloaterCount(); + + virtual void setFloaterFlashing(LLFloater* floaterp, BOOL flashing); + virtual BOOL closeAllFloaters(); //Returns FALSE if the floater could not be closed due to pending confirmation dialogs + void setTabContainer(LLTabContainer* tab_container) { if (!mTabContainer) mTabContainer = tab_container; } + static void onTabSelected(void* userdata, bool); + + virtual void updateResizeLimits(); + +protected: + struct LLFloaterData + { + S32 mWidth; + S32 mHeight; + BOOL mCanMinimize; + BOOL mCanResize; + }; + + LLTabContainer* mTabContainer; + + typedef std::map, LLFloaterData> floater_data_map_t; + floater_data_map_t mFloaterDataMap; + + LLTabContainer::TabPosition mTabPos; + BOOL mAutoResize; + S32 mOrigMinWidth, mOrigMinHeight; // logically const but initialized late +}; + +#endif // LL_MULTI_FLOATER_H + + + diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index e1bf4d4aa..ebef5bb5d 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -42,6 +42,7 @@ #include "lluictrlfactory.h" #include "lltabcontainervertical.h" #include "llrender.h" +#include "llmultifloater.h" const F32 SCROLL_STEP_TIME = 0.4f; const F32 SCROLL_DELAY_TIME = 0.5f; diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h index 375658143..bdfbded82 100644 --- a/indra/newview/llflexibleobject.h +++ b/indra/newview/llflexibleobject.h @@ -43,7 +43,6 @@ #ifndef LL_LLFLEXIBLEOBJECT_H #define LL_LLFLEXIBLEOBJECT_H -#include "llmemory.h" #include "llprimitive.h" #include "llvovolume.h" #include "llwind.h" diff --git a/indra/newview/llfloaterproperties.h b/indra/newview/llfloaterproperties.h index c82b2a7e7..cf72ddecc 100644 --- a/indra/newview/llfloaterproperties.h +++ b/indra/newview/llfloaterproperties.h @@ -34,7 +34,7 @@ #define LL_LLFLOATERPROPERTIES_H #include -#include "llfloater.h" +#include "llmultifloater.h" #include "lliconctrl.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/newview/llfloaterscriptdebug.h b/indra/newview/llfloaterscriptdebug.h index 59c0ba1c8..0d5bc7411 100644 --- a/indra/newview/llfloaterscriptdebug.h +++ b/indra/newview/llfloaterscriptdebug.h @@ -33,7 +33,7 @@ #ifndef LL_LLFLOATERSCRIPTDEBUG_H #define LL_LLFLOATERSCRIPTDEBUG_H -#include "llfloater.h" +#include "llmultifloater.h" class LLTextEditor; class LLUUID; diff --git a/indra/newview/llfloatersearchreplace.cpp b/indra/newview/llfloatersearchreplace.cpp index a339a54a8..d5a33f534 100644 --- a/indra/newview/llfloatersearchreplace.cpp +++ b/indra/newview/llfloatersearchreplace.cpp @@ -2,6 +2,7 @@ #include "llcheckboxctrl.h" #include "llfocusmgr.h" #include "lluictrlfactory.h" +#include "llmultifloater.h" #include "llfloatersearchreplace.h" diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h index d16945ef9..edaa64504 100644 --- a/indra/newview/llhudobject.h +++ b/indra/newview/llhudobject.h @@ -37,7 +37,7 @@ * Base class and manager for in-world 2.5D non-interactive objects */ -#include "llmemory.h" +#include "llpointer.h" #include "v4color.h" #include "v3math.h" diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index e8cd3404b..be8db650a 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -33,7 +33,7 @@ #ifndef LL_LLIMVIEW_H #define LL_LLIMVIEW_H -#include "llfloater.h" +#include "llmultifloater.h" #include "llinstantmessage.h" #include "lluuid.h" diff --git a/indra/newview/llmorphview.cpp b/indra/newview/llmorphview.cpp index ec7428918..822b18264 100644 --- a/indra/newview/llmorphview.cpp +++ b/indra/newview/llmorphview.cpp @@ -91,15 +91,14 @@ void LLMorphView::initialize() mCameraYaw = 0.f; mCameraDist = -1.f; - LLVOAvatar *avatarp = gAgentAvatarp; - if (!avatarp || avatarp->isDead()) + if (!isAgentAvatarValid() || gAgentAvatarp->isDead()) { gAgentCamera.changeCameraToDefault(); return; } - avatarp->stopMotion( ANIM_AGENT_BODY_NOISE ); - avatarp->mSpecialRenderMode = 3; + gAgentAvatarp->stopMotion( ANIM_AGENT_BODY_NOISE ); + gAgentAvatarp->mSpecialRenderMode = 3; // set up camera for close look at avatar mOldCameraNearClip = LLViewerCamera::getInstance()->getNear(); @@ -113,11 +112,10 @@ void LLMorphView::shutdown() { LLVOAvatar::onCustomizeEnd(); - LLVOAvatar *avatarp = gAgentAvatarp; - if(avatarp && !avatarp->isDead()) + if (isAgentAvatarValid()) { - avatarp->startMotion( ANIM_AGENT_BODY_NOISE ); - avatarp->mSpecialRenderMode = 0; + gAgentAvatarp->startMotion( ANIM_AGENT_BODY_NOISE ); + gAgentAvatarp->mSpecialRenderMode = 0; // reset camera LLViewerCamera::getInstance()->setNear(mOldCameraNearClip); } @@ -167,14 +165,10 @@ void LLMorphView::updateCamera() if (!mCameraTargetJoint) { setCameraTargetJoint(gAgentAvatarp->getJoint("mHead")); - } - - LLVOAvatar* avatar = gAgentAvatarp; - if( !avatar ) - { - return; - } - LLJoint* root_joint = avatar->getRootJoint(); + } + if (!isAgentAvatarValid()) return; + + LLJoint* root_joint = gAgentAvatarp->getRootJoint(); if( !root_joint ) { return; diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h index 70dffc666..7d28f028c 100644 --- a/indra/newview/llpreview.h +++ b/indra/newview/llpreview.h @@ -33,7 +33,7 @@ #ifndef LL_LLPREVIEW_H #define LL_LLPREVIEW_H -#include "llfloater.h" +#include "llmultifloater.h" #include "llresizehandle.h" #include "llmap.h" #include "lluuid.h" diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index df51698f2..6d9dbfbc6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3820,8 +3820,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) std::string version_channel; msg->getString("SimData", "ChannelVersion", version_channel); - LLVOAvatar* avatarp = gAgentAvatarp; - if (!avatarp) + if (!isAgentAvatarValid()) { // Could happen if you were immediately god-teleported away on login, // maybe other cases. Continue, but warn. @@ -3882,7 +3881,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) gAgent.sendAgentSetAppearance(); // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) - if ( (avatarp) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) + if ( (gAgentAvatarp) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) // [/RLVa:KB] // if (avatarp) { @@ -3892,9 +3891,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) LLFloaterChat::addChatHistory(chat); // Set the new position - avatarp->setPositionAgent(agent_pos); - avatarp->clearChat(); - avatarp->slamPosition(); + gAgentAvatarp->setPositionAgent(agent_pos); + gAgentAvatarp->clearChat(); + gAgentAvatarp->slamPosition(); } // add teleport destination to the list of visited places @@ -3968,9 +3967,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) gAgent.clearBusy(); } - if (avatarp) + if (isAgentAvatarValid()) { - avatarp->mFootPlane.clearVec(); + gAgentAvatarp->mFootPlane.clearVec(); } // send walk-vs-run status diff --git a/indra/newview/llvoground.cpp b/indra/newview/llvoground.cpp index 2c22deb7c..ebb7bfda7 100644 --- a/indra/newview/llvoground.cpp +++ b/indra/newview/llvoground.cpp @@ -168,7 +168,7 @@ BOOL LLVOGround::updateGeometry(LLDrawable *drawable) *(texCoordsp++) = LLVector2(0.f, 1.f); *(texCoordsp++) = LLVector2(0.5f, 0.5f); - face->getVertexBuffer()->setBuffer(0); + face->getVertexBuffer()->flush(); LLPipeline::sCompiles++; return TRUE; } diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 04f51c93e..0381a7c90 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -63,7 +63,7 @@ public: }; // virtual - void setupVertexBuffer(U32 data_mask) const + void setupVertexBuffer(U32 data_mask) { if (LLGLSLShader::sNoFixedFunction) { //just use default if shaders are in play From aad10c9b8dabb66480155dfab0b80804ce63338d Mon Sep 17 00:00:00 2001 From: CobraElDiablo Date: Fri, 9 Dec 2011 11:50:26 +0000 Subject: [PATCH 04/28] SH-2516 Fix: Full Bright Geometry Rendering Increases Rapidly, Destroying Frame Rate. By Bao Linden --- indra/newview/llviewertexture.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 9e6f849e3..6174e70eb 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -3207,6 +3207,12 @@ void LLViewerLODTexture::processTextureStats() S32 current_discard = getDiscardLevel(); if (sDesiredDiscardBias > 0.0f && mBoostLevel < LLViewerTexture::BOOST_SCULPTED && current_discard >= 0) { + // SH-2516 fix. + if(desired_discard_bias_max <= sDesiredDiscardBias && !mForceToSaveRawImage) + { + //needs to release texture memory urgently + scaleDown() ; + } // Limit the amount of GL memory bound each frame if ( BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) > sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale && (!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel)) @@ -3218,7 +3224,6 @@ void LLViewerLODTexture::processTextureStats() (!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel)) { scaleDown() ; - } } } From c6ce417fac0c5901101af878d7b5daca5fdf9477 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Thu, 29 Dec 2011 13:38:41 +0100 Subject: [PATCH 05/28] Attempt at fixing a Linux build botch in ReleaseSSE2 --- indra/cmake/00-Common.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index cf2f63d1e..fa0871ddc 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -201,7 +201,7 @@ if (LINUX) set(MARCH_FLAG " -march=pentium4") endif (NOT STANDALONE) set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2}${MARCH_FLAG} -mfpmath=sse -msse2 ${GCC_EXTRA_OPTIMIZATIONS}") - set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2}${MARCH_FLAG} -mfpmath=sse -msse2 "${GCC_EXTRA_OPTIMIZATIONS}) + set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2}${MARCH_FLAG} -mfpmath=sse -msse2 ${GCC_EXTRA_OPTIMIZATIONS}") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse -msse2 ${GCC_EXTRA_OPTIMIZATIONS}") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse -msse2 ${GCC_EXTRA_OPTIMIZATIONS}") endif (${ARCH} STREQUAL "x86_64") From 566152c230e38fd350c1c874d5f684236f72b5a4 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 5 Jan 2012 21:56:48 -0500 Subject: [PATCH 06/28] Almost completely stripped, saving the final piece for tomorrow ((Double clicking from list of chat people on right of chats)) --- indra/newview/llfloateractivespeakers.cpp | 2 +- indra/newview/llfloateravatarlist.cpp | 5 +---- indra/newview/llfloaterfriends.cpp | 2 +- indra/newview/llviewermenu.cpp | 4 +--- indra/newview/llviewermessage.cpp | 4 ++-- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/indra/newview/llfloateractivespeakers.cpp b/indra/newview/llfloateractivespeakers.cpp index 27d35c6bb..282f9f842 100644 --- a/indra/newview/llfloateractivespeakers.cpp +++ b/indra/newview/llfloateractivespeakers.cpp @@ -123,7 +123,7 @@ void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const LLAvatarName& avatar_ // Also set the legacy name. We will need it to initiate a new // IM session. - speaker_ptr->mLegacyName = avatar_name.getLegacyName(); + speaker_ptr->mLegacyName = LLCacheName::cleanFullName(avatar_name.getLegacyName()); // [/Ansariel: Display name support] // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-1.0.0g diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 6f640b4c9..398b4a846 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -878,15 +878,12 @@ void LLFloaterAvatarList::onClickIM(void* userdata) // Single avatar LLUUID agent_id = ids[0]; - char buffer[MAX_STRING]; // [Ansariel: Display name support] - // snprintf(buffer, MAX_STRING, "%s", avlist->mAvatars[agent_id].getName().c_str()); LLAvatarName avatar_name; if (LLAvatarNameCache::get(agent_id, &avatar_name)) { - snprintf(buffer, MAX_STRING, "%s", avatar_name.getLegacyName().c_str()); gIMMgr->setFloaterOpen(TRUE); - gIMMgr->addSession(buffer,IM_NOTHING_SPECIAL,agent_id); + gIMMgr->addSession(LLCacheName::cleanFullName(avatar_name.getLegacyName()),IM_NOTHING_SPECIAL,agent_id); } // [Ansariel: Display name support] } diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp index 03eaa4ac5..28c79d928 100644 --- a/indra/newview/llfloaterfriends.cpp +++ b/indra/newview/llfloaterfriends.cpp @@ -914,7 +914,7 @@ void LLPanelFriends::onClickIM(void* user_data) if (info && LLAvatarNameCache::get(agent_id, &avatar_name)) { gIMMgr->setFloaterOpen(TRUE); - gIMMgr->addSession(avatar_name.getLegacyName(),IM_NOTHING_SPECIAL,agent_id); + gIMMgr->addSession(LLCacheName::cleanFullName(avatar_name.getLegacyName()),IM_NOTHING_SPECIAL,agent_id); } // [/Ansariel: Display name support] } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9b3186ba2..5c69b103a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7368,9 +7368,7 @@ class LLAvatarSendIM : public view_listener_t gIMMgr->setFloaterOpen(TRUE); //EInstantMessage type = have_agent_callingcard(gLastHitObjectID) // ? IM_SESSION_ADD : IM_SESSION_CARDLESS_START; - gIMMgr->addSession(name, - IM_NOTHING_SPECIAL, - avatar->getID()); + gIMMgr->addSession(LLCacheName::cleanFullName(name),IM_NOTHING_SPECIAL,avatar->getID()); } return true; } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8db1665d1..0dbcc6cbd 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1657,7 +1657,7 @@ static std::string clean_name_from_im(const std::string& name, EInstantMessage t case IM_FRIENDSHIP_OFFERED: case IM_FRIENDSHIP_ACCEPTED: case IM_FRIENDSHIP_DECLINED_DEPRECATED: - //IM_TYPING_START + case IM_TYPING_START: //IM_TYPING_STOP return LLCacheName::cleanFullName(name); default: @@ -3888,7 +3888,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) LL_DEBUGS("Messaging") << "process_agent_movement_complete()" << LL_ENDL; - // *TODO: check timestamp to make sure the movement compleation + // *TODO: check timestamp to make sure the movement completion // makes sense. LLVector3 agent_pos; msg->getVector3Fast(_PREHASH_Data, _PREHASH_Position, agent_pos); From 900d063d4fa9e2432eb02915a8e74353a49b7eea Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Fri, 6 Jan 2012 11:18:31 -0500 Subject: [PATCH 07/28] Just fixed this file up a bit to look a bit nicer... Won't affect performance. --- indra/llui/llradiogroup.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 5f5a2acd8..5c715d3ff 100644 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -47,11 +47,9 @@ static LLRegisterWidget r("radio_group"); LLRadioGroup::LLRadioGroup(const std::string& name, const LLRect& rect, - const std::string& control_name, - LLUICtrlCallback callback, - void* userdata, - BOOL border) -: LLUICtrl(name, rect, TRUE, callback, userdata, FOLLOWS_LEFT | FOLLOWS_TOP), + const std::string& control_name, LLUICtrlCallback callback, + void* userdata, BOOL border) : + LLUICtrl(name, rect, TRUE, callback, userdata, FOLLOWS_LEFT | FOLLOWS_TOP), mSelectedIndex(0) { setControlName(control_name, NULL); @@ -59,10 +57,8 @@ LLRadioGroup::LLRadioGroup(const std::string& name, const LLRect& rect, } LLRadioGroup::LLRadioGroup(const std::string& name, const LLRect& rect, - S32 initial_index, - LLUICtrlCallback callback, - void* userdata, - BOOL border) : + S32 initial_index, LLUICtrlCallback callback, + void* userdata, BOOL border) : LLUICtrl(name, rect, TRUE, callback, userdata, FOLLOWS_LEFT | FOLLOWS_TOP), mSelectedIndex(initial_index) { @@ -74,10 +70,8 @@ void LLRadioGroup::init(BOOL border) if (border) { addChild( new LLViewBorder( std::string("radio group border"), - LLRect(0, getRect().getHeight(), getRect().getWidth(), 0), - LLViewBorder::BEVEL_NONE, - LLViewBorder::STYLE_LINE, - 1 ) ); + LLRect(0, getRect().getHeight(), getRect().getWidth(), 0), + LLViewBorder::BEVEL_NONE, LLViewBorder::STYLE_LINE, 1 )); } mHasBorder = border; } @@ -257,8 +251,7 @@ void LLRadioGroup::draw() LLRadioCtrl* LLRadioGroup::addRadioButton(const std::string& name, const std::string& label, const LLRect& rect, const LLFontGL* font ) { // Highlight will get fixed in draw method above - LLRadioCtrl* radio = new LLRadioCtrl(name, rect, label, font, - onClickButton, this); + LLRadioCtrl* radio = new LLRadioCtrl(name, rect, label, font, onClickButton, this); addChild(radio); mRadioButtons.push_back(radio); return radio; From a6f36abab0c01d0446d70188d39ab462606fbe75 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sat, 7 Jan 2012 23:44:46 +0100 Subject: [PATCH 08/28] Semicolon care and feeding --- indra/llaudio/llstreamingaudio_fmod.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llaudio/llstreamingaudio_fmod.h b/indra/llaudio/llstreamingaudio_fmod.h index c8a940eed..0478a79ac 100644 --- a/indra/llaudio/llstreamingaudio_fmod.h +++ b/indra/llaudio/llstreamingaudio_fmod.h @@ -58,7 +58,7 @@ class LLStreamingAudio_FMOD : public LLStreamingAudioInterface /*virtual*/ bool supportsMetaData(){return true;} /*virtual*/ const LLSD *getMetaData(){return mMetaData;} //return NULL if not playing. /*virtual*/ bool supportsWaveData(){return false;} - /*virtual*/ bool getWaveData(float* arr, S32 count, S32 stride = 1){return false}; + /*virtual*/ bool getWaveData(float* arr, S32 count, S32 stride = 1){return false;} private: LLAudioStreamManagerFMOD *mCurrentInternetStreamp; int mFMODInternetStreamChannel; From f14e6cdb608b4871c7d66fa925737b1a635b3ab2 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Sat, 7 Jan 2012 18:14:36 -0500 Subject: [PATCH 09/28] Pretty sure all I did was fix some things that didn't look nice to me or poor syntax highlighters, shouldn't affect performance... --- indra/newview/llimpanel.cpp | 4 ++-- indra/newview/llviewermessage.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 9a4e36244..879301a88 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -336,7 +336,7 @@ void LLVoiceCallCapResponder::result(const LLSD& content) LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mSessionID); if (channelp) { - //*TODO: DEBUG SPAM + // *TODO: DEBUG SPAM LLSD::map_const_iterator iter; for(iter = content.beginMap(); iter != content.endMap(); ++iter) { @@ -746,7 +746,7 @@ void LLVoiceChannelGroup::setChannelInfo( } else { - //*TODO: notify user + // *TODO: notify user llwarns << "Received invalid credentials for channel " << mSessionName << llendl; deactivate(); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ef5999267..258be0e6f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2171,7 +2171,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) case IM_MESSAGEBOX: { // This is a block, modeless dialog. - //*TODO:translate + // *TODO:translate args["MESSAGE"] = message; LLNotificationsUtil::add("SystemMessage", args); } From 9fd813267e7c19cc3254744b75e2de5c013733e2 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Sun, 8 Jan 2012 18:21:43 -0500 Subject: [PATCH 10/28] Added three macros, two to help the final one which exists to show file and line on llassert messages; Changed the presentation of said messages to look nicer. --- indra/llcommon/llerrorlegacy.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/indra/llcommon/llerrorlegacy.h b/indra/llcommon/llerrorlegacy.h index 476d75380..8ed94312b 100644 --- a/indra/llcommon/llerrorlegacy.h +++ b/indra/llcommon/llerrorlegacy.h @@ -107,7 +107,14 @@ const int LL_ERR_PRICE_MISMATCH = -23018; #define llwarning(msg, num) llwarns << "Warning # " << num << ": " << msg << llendl; -#define llassert_always(func) if (LL_UNLIKELY(!(func))) llerrs << "ASSERT (" << #func << ")" << llendl; +#define liru_slashpos std::string(__FILE__).find_last_of("/\\") +#define liru_slashpos2 std::string(__FILE__).substr(0,liru_slashpos).find_last_of("/\\") +#define liru_assert_strip /*strip path down to lastlevel directory and filename for assert.*/\ + liru_slashpos == std::string::npos ? std::string(__FILE__)/*just filename, print as is*/\ + : liru_slashpos2 == std::string::npos ? std::string(__FILE__)/*Apparently, we're in / or perhaps the top of the drive, print as is*/\ + : std::string(__FILE__).substr(1+liru_slashpos2)/*print foo/bar.cpp or perhaps foo\bar.cpp*/ + +#define llassert_always(func) if (LL_UNLIKELY(!(func))) llerrs <<"\nASSERT(" #func ")\nfile:"<<(liru_assert_strip)<<" line:"<<__LINE__ << llendl; #ifdef SHOW_ASSERT #define llassert(func) llassert_always(func) From d505e515e4dd67749a88d031402949acfefa9e1d Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Sun, 8 Jan 2012 21:03:13 -0500 Subject: [PATCH 11/28] Moved parentheses into liru_assert_strip for usability. --- indra/llcommon/llerrorlegacy.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llcommon/llerrorlegacy.h b/indra/llcommon/llerrorlegacy.h index 8ed94312b..fa41c5b3d 100644 --- a/indra/llcommon/llerrorlegacy.h +++ b/indra/llcommon/llerrorlegacy.h @@ -110,11 +110,11 @@ const int LL_ERR_PRICE_MISMATCH = -23018; #define liru_slashpos std::string(__FILE__).find_last_of("/\\") #define liru_slashpos2 std::string(__FILE__).substr(0,liru_slashpos).find_last_of("/\\") #define liru_assert_strip /*strip path down to lastlevel directory and filename for assert.*/\ - liru_slashpos == std::string::npos ? std::string(__FILE__)/*just filename, print as is*/\ + (liru_slashpos == std::string::npos ? std::string(__FILE__)/*just filename, print as is*/\ : liru_slashpos2 == std::string::npos ? std::string(__FILE__)/*Apparently, we're in / or perhaps the top of the drive, print as is*/\ - : std::string(__FILE__).substr(1+liru_slashpos2)/*print foo/bar.cpp or perhaps foo\bar.cpp*/ + : std::string(__FILE__).substr(1+liru_slashpos2))/*print foo/bar.cpp or perhaps foo\bar.cpp*/ -#define llassert_always(func) if (LL_UNLIKELY(!(func))) llerrs <<"\nASSERT(" #func ")\nfile:"<<(liru_assert_strip)<<" line:"<<__LINE__ << llendl; +#define llassert_always(func) if (LL_UNLIKELY(!(func))) llerrs <<"\nASSERT(" #func ")\nfile:"< Date: Mon, 9 Jan 2012 05:18:01 -0500 Subject: [PATCH 12/28] Spelling fix, while changing comment styling. --- indra/newview/llpanelobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 864c2d091..eec36f941 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -130,7 +130,7 @@ enum { MI_HOLE_COUNT }; -//*TODO:translate (depricated, so very low priority) +// *TODO:translate (deprecated, so very low priority) static const std::string LEGACY_FULLBRIGHT_DESC("Fullbright (Legacy)"); LLVector3 LLPanelObject::mClipboardPos; From 35333f01054d4964a1b47921966c414e78fd112f Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Mon, 9 Jan 2012 05:20:12 -0500 Subject: [PATCH 13/28] Spelling fix --- indra/newview/lltoolbrush.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index 06ed99a8b..41096c3d3 100644 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -106,7 +106,7 @@ LLToolBrushLand::LLToolBrushLand() U8 LLToolBrushLand::getBrushIndex() { // find the best index for desired size - // (compatibility with old sims, brush_index is now depricated - DEV-8252) + // (compatibility with old sims, brush_index is now deprecated - DEV-8252) U8 index = 0; for (U8 i = 0; i < LAND_BRUSH_SIZE_COUNT; i++) { From 61beedd3d9b2c14a27794cfcc3b71fea928efc6e Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Mon, 9 Jan 2012 05:40:03 -0500 Subject: [PATCH 14/28] Changed style of comments with asterisks to avoid highlighting errors on //* with weak highlighters, change is to all files that could potentially break highlights Most were needed, though some were just for possible problems with highlighting, should not affect performance whatsoever. --- indra/llaudio/llvorbisdecode.cpp | 8 ++-- indra/llaudio/llvorbisencode.cpp | 8 ++-- indra/llcharacter/llmotioncontroller.cpp | 16 ++++---- indra/llcommon/llapr.cpp | 4 +- indra/llcommon/llapr.h | 4 +- indra/llcrashlogger/llcrashlogger.cpp | 2 +- indra/llmath/llvolume.cpp | 8 ++-- indra/llmessage/llclassifiedflags.cpp | 4 +- indra/llmessage/llcurl.cpp | 4 +- indra/llprimitive/lltreeparams.h | 20 +++++----- indra/llrender/llimagegl.cpp | 12 +++--- indra/llrender/llimagegl.h | 8 ++-- indra/llrender/llpostprocess.cpp | 2 +- indra/llui/llcombobox.cpp | 2 +- indra/llui/llfloater.cpp | 2 +- indra/llui/llmenugl.cpp | 4 +- indra/llui/llpanel.cpp | 4 +- indra/llui/llscrolllistctrl.cpp | 2 +- indra/llxml/llxmlnode.cpp | 4 +- indra/newview/llagent.cpp | 8 ++-- indra/newview/llagent.h | 2 +- indra/newview/llappviewer.cpp | 4 +- indra/newview/llfloatercustomize.cpp | 2 +- indra/newview/llfloatergodtools.cpp | 16 ++++---- indra/newview/llfloatermodelpreview.cpp | 2 +- indra/newview/llpanelgrouplandmoney.cpp | 42 ++++++++++---------- indra/newview/llpanelgroupvoting.cpp | 16 ++++---- indra/newview/llpanelinventory.cpp | 4 +- indra/newview/llpanelinventory.h | 4 +- indra/newview/llstartup.cpp | 2 +- indra/newview/lltooldraganddrop.cpp | 2 +- indra/newview/lltoolindividual.cpp | 4 +- indra/newview/lltoolview.cpp | 2 +- indra/newview/llviewertexture.cpp | 2 +- indra/newview/llvoclouds.cpp | 8 ++-- indra/newview/llvopartgroup.cpp | 8 ++-- indra/newview/llwindebug.cpp | 16 ++++---- indra/plugins/webkit/media_plugin_webkit.cpp | 2 +- indra/test/lldatapacker_tut.cpp | 6 +-- indra/test/lljoint_tut.cpp | 4 +- indra/test/llpartdata_tut.cpp | 2 +- 41 files changed, 138 insertions(+), 138 deletions(-) diff --git a/indra/llaudio/llvorbisdecode.cpp b/indra/llaudio/llvorbisdecode.cpp index 4bf70f41f..8055be96c 100644 --- a/indra/llaudio/llvorbisdecode.cpp +++ b/indra/llaudio/llvorbisdecode.cpp @@ -133,10 +133,10 @@ BOOL decode_vorbis_file(LLVFS *vfs, const LLUUID &in_uuid, char *out_fname) return(FALSE); } - //********************************** + // ********************************** LLAPRFile outfile ; outfile.open(out_fname,LL_APR_WPB); - //********************************** + // ********************************** if (!outfile.getFileHandle()) { llwarning("unable to open vorbis destination file for writing",0); @@ -308,9 +308,9 @@ BOOL decode_vorbis_file(LLVFS *vfs, const LLUUID &in_uuid, char *out_fname) outfile.seek(SEEK_END,-fade_length*2); outfile.write(pcmout,2*fade_length); //write back xfaded last 16 samples - //******************* + // ******************* outfile.close(); - //******************* + // ******************* if ((36 == data_length) || (!(eof))) { diff --git a/indra/llaudio/llvorbisencode.cpp b/indra/llaudio/llvorbisencode.cpp index 2fcaf97a8..8682664b6 100644 --- a/indra/llaudio/llvorbisencode.cpp +++ b/indra/llaudio/llvorbisencode.cpp @@ -87,10 +87,10 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro error_msg.clear(); - //******************************** + // ******************************** LLAPRFile infile ; infile.open(in_fname,LL_APR_RB); - //******************************** + // ******************************** if (!infile.getFileHandle()) { error_msg = "CannotUploadSoundFile"; @@ -159,9 +159,9 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro file_pos += (chunk_length + 8); chunk_length = 0; } - //**************** + // **************** infile.close(); - //**************** + // **************** if (!uncompressed_pcm) { diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index ab2f87275..3b7dbec33 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -637,9 +637,9 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty motionp->fadeIn(); } - //********************** + // ********************** // MOTION INACTIVE - //********************** + // ********************** if (motionp->isStopped() && mAnimTime > motionp->getStopTime() + motionp->getEaseOutDuration()) { // this motion has gone on too long, deactivate it @@ -659,9 +659,9 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty } } - //********************** + // ********************** // MOTION EASE OUT - //********************** + // ********************** else if (motionp->isStopped() && mAnimTime > motionp->getStopTime()) { // is this the first iteration in the ease out phase? @@ -684,9 +684,9 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); } - //********************** + // ********************** // MOTION ACTIVE - //********************** + // ********************** else if (mAnimTime > motionp->mActivationTimestamp + motionp->getEaseInDuration()) { posep->setWeight(motionp->getFadeWeight()); @@ -707,9 +707,9 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); } - //********************** + // ********************** // MOTION EASE IN - //********************** + // ********************** else if (mAnimTime >= motionp->mActivationTimestamp) { if (mLastTime < motionp->mActivationTimestamp) diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp index 32b189ff6..ee7717f12 100644 --- a/indra/llcommon/llapr.cpp +++ b/indra/llcommon/llapr.cpp @@ -249,7 +249,7 @@ S32 LLAPRFile::seek(apr_seek_where_t where, S32 offset) } // -//******************************************************************************************************************************* +// ******************************************************************************************************************************* //static components of LLAPRFile // @@ -504,5 +504,5 @@ bool LLAPRFile::removeDir(const std::string& dirname) } // //end of static components of LLAPRFile -//******************************************************************************************************************************* +// ******************************************************************************************************************************* // diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h index 7b6696034..e7c3c53f1 100644 --- a/indra/llcommon/llapr.h +++ b/indra/llcommon/llapr.h @@ -168,7 +168,7 @@ public: apr_file_t* getFileHandle() {return mFile;} // -//******************************************************************************************************************************* +// ******************************************************************************************************************************* //static components // private: @@ -185,7 +185,7 @@ public: // Returns bytes read/written, 0 if read/write fails: static S32 readEx(const std::string& filename, void *buf, S32 offset, S32 nbytes); static S32 writeEx(const std::string& filename, void *buf, S32 offset, S32 nbytes); -//******************************************************************************************************************************* +// ******************************************************************************************************************************* }; /** diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index c43ee3382..a8be44313 100644 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -347,7 +347,7 @@ bool LLCrashLogger::sendCrashLogs() bool sent = false; - //*TODO: Translate + // *TODO: Translate if(mCrashHost != "") { sent = runCrashLogPost(mCrashHost, post_data, std::string("Sending to server"), 3, 5); diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index a7018687e..11673f20e 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2182,7 +2182,7 @@ BOOL LLVolume::generate() mLODScaleBias.setVec(0.6f, 0.6f, 0.6f); } - //******************************************************************** + // ******************************************************************** //debug info, to be removed if((U32)(mPathp->mPath.size() * mProfilep->mProfile.size()) > (1u << 20)) { @@ -2194,7 +2194,7 @@ BOOL LLVolume::generate() llerrs << "LLVolume corrupted!" << llendl ; } - //******************************************************************** + // ******************************************************************** BOOL regenPath = mPathp->generate(mParams.getPathParams(), path_detail, split); BOOL regenProf = mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(),profile_detail, split); @@ -2204,7 +2204,7 @@ BOOL LLVolume::generate() S32 sizeS = mPathp->mPath.size(); S32 sizeT = mProfilep->mProfile.size(); - //******************************************************************** + // ******************************************************************** //debug info, to be removed if((U32)(sizeS * sizeT) > (1u << 20)) { @@ -2217,7 +2217,7 @@ BOOL LLVolume::generate() llerrs << "LLVolume corrupted!" << llendl ; } - //******************************************************************** + // ******************************************************************** sNumMeshPoints -= mMesh.size(); mMesh.resize(sizeT * sizeS); diff --git a/indra/llmessage/llclassifiedflags.cpp b/indra/llmessage/llclassifiedflags.cpp index da608e490..f827f4b34 100644 --- a/indra/llmessage/llclassifiedflags.cpp +++ b/indra/llmessage/llclassifiedflags.cpp @@ -30,13 +30,13 @@ * $/LicenseInfo$ */ -//***************************************************************************** +// ***************************************************************************** // llclassifiedflags.cpp // // Some exported symbols and functions for dealing with classified flags. // // Copyright 2005, Linden Research, Inc -//***************************************************************************** +// ***************************************************************************** #include "linden_common.h" diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 1f06135a8..dee90dd5b 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -395,7 +395,7 @@ U32 LLCurl::Easy::report(CURLcode code) if (code == CURLE_OK) { check_curl_code(curl_easy_getinfo(mCurlEasyHandle, CURLINFO_RESPONSE_CODE, &responseCode)); - //*TODO: get reason from first line of mHeaderOutput + // *TODO: get reason from first line of mHeaderOutput } else { @@ -715,7 +715,7 @@ S32 LLCurl::Multi::process() else { response = 499; - //*TODO: change to llwarns + // *TODO: change to llwarns llerrs << "cleaned up curl request completed!" << llendl; } if (response >= 400) diff --git a/indra/llprimitive/lltreeparams.h b/indra/llprimitive/lltreeparams.h index 9ca2c81ec..9644c6312 100644 --- a/indra/llprimitive/lltreeparams.h +++ b/indra/llprimitive/lltreeparams.h @@ -84,25 +84,25 @@ public: // LOBING - //*! number of peaks in the radial distance about the perimeter + // *! number of peaks in the radial distance about the perimeter U8 mLobes; // even numbers = obvius symmetry ... use odd numbers - //*! magnitude of the variations as a fraction of the radius + // *! magnitude of the variations as a fraction of the radius F32 mLobeDepth; // FLARE - //*! causes exponential expansion near base of trunk + // *! causes exponential expansion near base of trunk F32 mFlare; // scales radius base by min 1 to '1 + flare' - //*! percentage of the height of the trunk to flair -- likely less than baseSize + // *! percentage of the height of the trunk to flair -- likely less than baseSize F32 mFlarePercentage; - //*! number of cross sections to make for the flair + // *! number of cross sections to make for the flair U8 mFlareRes; @@ -140,7 +140,7 @@ public: //!~ ratio and ratiopower determine radius/length F32 mRatio, mRatioPower; - //*! taper of branches + // *! taper of branches F32 mTaper[MAX_NUM_LEVELS]; // 0 - non-tapering cylinder // 1 - taper to a point @@ -154,10 +154,10 @@ public: F32 mSplitAngleV[MAX_NUM_LEVELS]; //~ variance of the splits // CURVE - F32 mCurve[MAX_NUM_LEVELS]; //* general, 1-axis, overall curve of branch - F32 mCurveV[MAX_NUM_LEVELS]; //* curve variance at each cross section from general overall curve - U8 mCurveRes[MAX_NUM_LEVELS]; //* number of cross sections for curve - F32 mCurveBack[MAX_NUM_LEVELS]; //* curveback is amount branch curves back towards + F32 mCurve[MAX_NUM_LEVELS]; // * general, 1-axis, overall curve of branch + F32 mCurveV[MAX_NUM_LEVELS]; // * curve variance at each cross section from general overall curve + U8 mCurveRes[MAX_NUM_LEVELS]; // * number of cross sections for curve + F32 mCurveBack[MAX_NUM_LEVELS]; // * curveback is amount branch curves back towards // vertices per cross section U8 mVertices[MAX_NUM_LEVELS]; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 17da07381..9cb9a2dcd 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -65,9 +65,9 @@ LLImageGL* LLImageGL::sDefaultGLTexture = NULL ; std::set LLImageGL::sImageList; -//**************************************************************************************************** +// **************************************************************************************************** //The below for texture auditing use only -//**************************************************************************************************** +// **************************************************************************************************** //----------------------- //debug use BOOL gAuditTexture = FALSE ; @@ -84,11 +84,11 @@ std::vector LLImageGL::sTextureMemByCategory; std::vector LLImageGL::sTextureMemByCategoryBound ; std::vector LLImageGL::sTextureCurMemByCategoryBound ; //------------------------ -//**************************************************************************************************** +// **************************************************************************************************** //End for texture auditing use only -//**************************************************************************************************** +// **************************************************************************************************** -//************************************************************************************** +// ************************************************************************************** //below are functions for debug use //do not delete them even though they are not currently being used. void check_all_images() @@ -167,7 +167,7 @@ void LLImageGL::checkTexSize(bool forced) const } } //end of debug functions -//************************************************************************************** +// ************************************************************************************** //---------------------------------------------------------------------------- BOOL is_little_endian() diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index cc36b7a74..a472c6262 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -257,9 +257,9 @@ private: //can be removed if we do not use that function at all. static BOOL sAllowReadBackRaw ; // -//**************************************************************************************************** +// **************************************************************************************************** //The below for texture auditing use only -//**************************************************************************************************** +// **************************************************************************************************** private: S32 mCategory ; public: @@ -290,9 +290,9 @@ public: static std::vector sTextureMemByCategoryBound ; static std::vector sTextureCurMemByCategoryBound ; //---------------------------------------- -//**************************************************************************************************** +// **************************************************************************************************** //End of definitions for texture auditing use only -//**************************************************************************************************** +// **************************************************************************************************** }; diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp index ee06d32b9..25e775c1e 100644 --- a/indra/llrender/llpostprocess.cpp +++ b/indra/llrender/llpostprocess.cpp @@ -105,7 +105,7 @@ LLPostProcess::LLPostProcess(void) : } setSelectedEffect("default"); - //*/ + // */ } LLPostProcess::~LLPostProcess(void) diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 144732525..507414958 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -700,7 +700,7 @@ void LLComboBox::hideList() #if 0 // Don't do this! mTextEntry->getText() can be truncated, in which case selectItemByLabel // fails and this only resets the selection :/ - //*HACK: store the original value explicitly somewhere, not just in label + // *HACK: store the original value explicitly somewhere, not just in label std::string orig_selection = mAllowTextEntry ? mTextEntry->getText() : mButton->getLabelSelected(); // assert selection in list diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 32af5ca47..2053e6a06 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1648,7 +1648,7 @@ void LLFloater::updateButtons() mButtons[i]->setEnabled(mButtonsEnabled[i]); if (mButtonsEnabled[i] - //*HACK: always render close button for hosted floaters + // *HACK: always render close button for hosted floaters // so that users don't accidentally hit the button when closing multiple windows // in the chatterbox || (i == BUTTON_CLOSE && mButtonScale != 1.f)) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index de6d988b2..9b60fbaaa 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -30,7 +30,7 @@ * $/LicenseInfo$ */ -//***************************************************************************** +// ***************************************************************************** // // This file contains the opengl based menu implementation. // @@ -39,7 +39,7 @@ // column is used for displaying boolean values for toggle and check // controls. The right column is used for submenus. // -//***************************************************************************** +// ***************************************************************************** //#include "llviewerprecompiledheaders.h" #include "linden_common.h" diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index adeb437c9..cc0b9faf5 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -623,7 +623,7 @@ std::string LLPanel::getString(const std::string& name, const LLStringUtil::form formatted_string.setArgList(args); return formatted_string.getString(); } - std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate + std::string err_str("Failed to find string " + name + " in panel " + getName()); // *TODO: Translate // *TODO: once the QAR-369 ui-cleanup work on settings is in we need to change the following line to be //if(LLUI::sConfigGroup->getBOOL("QAMode")) if(LLUI::sQAMode) @@ -644,7 +644,7 @@ std::string LLPanel::getString(const std::string& name) const { return found_it->second; } - std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate + std::string err_str("Failed to find string " + name + " in panel " + getName()); // *TODO: Translate if(LLUI::sQAMode) { llerrs << err_str << llendl; diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 02f11c9b7..e356d3c44 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -299,7 +299,7 @@ S32 LLScrollListSeparator::getHeight() const void LLScrollListSeparator::draw(const LLColor4& color, const LLColor4& highlight_color) const { - //*FIXME: use dynamic item heights and make separators narrow, and inactive + // *FIXME: use dynamic item heights and make separators narrow, and inactive gl_line_2d(5, 8, llmax(5, getWidth() - 5), 8, color); } diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp index a33da9dea..db9caf8c0 100644 --- a/indra/llxml/llxmlnode.cpp +++ b/indra/llxml/llxmlnode.cpp @@ -2658,9 +2658,9 @@ U32 LLXMLNode::getChildCount() const return 0; } -//*************************************************** +// *************************************************** // UNIT TESTING -//*************************************************** +// *************************************************** U32 get_rand(U32 max_value) { diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f6b8670a1..a2721a511 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1215,7 +1215,7 @@ void LLAgent::setAFK() gAwayTimer.start(); if (gAFKMenu) { - //*TODO:Translate + // *TODO:Translate gAFKMenu->setLabel(std::string("Set Not Away")); } } @@ -1241,7 +1241,7 @@ void LLAgent::clearAFK() LL_INFOS("AFK") << "Clearing Away" << LL_ENDL; if (gAFKMenu) { - //*TODO:Translate + // *TODO:Translate gAFKMenu->setLabel(std::string("Set Away")); } } @@ -1264,7 +1264,7 @@ void LLAgent::setBusy() mIsBusy = TRUE; if (gBusyMenu) { - //*TODO:Translate + // *TODO:Translate gBusyMenu->setLabel(std::string("Set Not Busy")); } LLFloaterMute::getInstance()->updateButtons(); @@ -1279,7 +1279,7 @@ void LLAgent::clearBusy() sendAnimationRequest(ANIM_AGENT_BUSY, ANIM_REQUEST_STOP); if (gBusyMenu) { - //*TODO:Translate + // *TODO:Translate gBusyMenu->setLabel(std::string("Set Busy")); } LLFloaterMute::getInstance()->updateButtons(); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 2c87d27b7..846edf8d4 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -156,7 +156,7 @@ public: public: void getName(std::string& name); //Legacy void buildFullname(std::string &name) const; //Legacy - //*TODO remove, is not used as of August 20, 2009 + // *TODO remove, is not used as of August 20, 2009 void buildFullnameAndTitle(std::string &name) const; //-------------------------------------------------------------------- diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 74622e9b1..6d12b371c 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2000,7 +2000,7 @@ bool LLAppViewer::initConfiguration() } #endif - //*FIX:Mani - Set default to disabling watchdog mainloop + // *FIX:Mani - Set default to disabling watchdog mainloop // timeout for mac and linux. There is no call stack info // on these platform to help debug. #ifndef LL_RELEASE_FOR_DOWNLOAD @@ -2401,7 +2401,7 @@ bool LLAppViewer::initConfiguration() void LLAppViewer::checkForCrash(void) { #if LL_SEND_CRASH_REPORTS - //*NOTE:Mani The current state of the crash handler has the MacOSX + // *NOTE:Mani The current state of the crash handler has the MacOSX // sending all crash reports as freezes, in order to let // the MacOSX CrashRepoter generate stacks before spawning the // SL crash logger. diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index 2a768f631..ac42bfce2 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -82,7 +82,7 @@ using namespace LLVOAvatarDefines; -//*TODO:translate : The ui xml for this really needs to be integrated with the appearance paramaters +// *TODO:translate : The ui xml for this really needs to be integrated with the appearance paramaters // Globals LLFloaterCustomize* gFloaterCustomize = NULL; diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index 9eff1a2c4..fd78d69bc 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -84,9 +84,9 @@ const F32 SECONDS_BETWEEN_UPDATE_REQUESTS = 5.0f; static LLFloaterGodTools* sGodTools = NULL; -//***************************************************************************** +// ***************************************************************************** // LLFloaterGodTools -//***************************************************************************** +// ***************************************************************************** // static LLFloaterGodTools* LLFloaterGodTools::instance() @@ -398,9 +398,9 @@ void LLFloaterGodTools::sendGodUpdateRegionInfo() } } -//***************************************************************************** +// ***************************************************************************** // LLPanelRegionTools -//***************************************************************************** +// ***************************************************************************** // || Region |______________________________________ @@ -876,9 +876,9 @@ void LLPanelRegionTools::onSelectRegion(void* userdata) } -//***************************************************************************** +// ***************************************************************************** // Class LLPanelGridTools -//***************************************************************************** +// ***************************************************************************** // || Grid |_____________________________________ // | | @@ -1001,9 +1001,9 @@ bool LLPanelGridTools::flushMapVisibilityCachesConfirm(const LLSD& notification, } -//***************************************************************************** +// ***************************************************************************** // LLPanelObjectTools -//***************************************************************************** +// ***************************************************************************** // || Object |_______________________________________________________ diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 424b0eee8..53f30735e 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3186,7 +3186,7 @@ LLModelPreview::~LLModelPreview() mModelLoader->mPreview = NULL; mModelLoader = NULL; } - //*HACK : *TODO : turn this back on when we understand why this crashes + // *HACK : *TODO : turn this back on when we understand why this crashes //glodShutdown(); } diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 4ef930a41..474c98ec2 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -188,9 +188,9 @@ public: std::string mCantViewAccountsText; }; -//******************************************* -//** LLPanelGroupLandMoney::impl Functions ** -//******************************************* +// ******************************************* +// ** LLPanelGroupLandMoney::impl Functions ** +// ******************************************* LLPanelGroupLandMoney::impl::impl(LLPanelGroupLandMoney& panel, const LLUUID& group_id) : mPanel(panel), mGroupID(group_id) @@ -485,9 +485,9 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) } } -//************************************* -//** LLPanelGroupLandMoney Functions ** -//************************************* +// ************************************* +// ** LLPanelGroupLandMoney Functions ** +// ************************************* //static void* LLPanelGroupLandMoney::createTab(void* data) @@ -794,9 +794,9 @@ void LLPanelGroupLandMoney::processPlacesReply(LLMessageSystem* msg, void**) selfp->mImplementationp->processGroupLand(msg); } -//************************************************* -//** LLGroupMoneyTabEventHandler::impl Functions ** -//************************************************* +// ************************************************* +// ** LLGroupMoneyTabEventHandler::impl Functions ** +// ************************************************* class LLGroupMoneyTabEventHandler::impl { @@ -884,9 +884,9 @@ void LLGroupMoneyTabEventHandler::impl::updateButtons() } } -//******************************************* -//** LLGroupMoneyTabEventHandler Functions ** -//******************************************* +// ******************************************* +// ** LLGroupMoneyTabEventHandler Functions ** +// ******************************************* LLMap LLGroupMoneyTabEventHandler::sInstanceIDs; std::map LLGroupMoneyTabEventHandler::sTabsToHandlers; @@ -1004,9 +1004,9 @@ void LLGroupMoneyTabEventHandler::clickTabCallback(void* data, bool from_click) if ( selfp ) selfp->onClickTab(); } -//************************************************** -//** LLGroupMoneyDetailsTabEventHandler Functions ** -//************************************************** +// ************************************************** +// ** LLGroupMoneyDetailsTabEventHandler Functions ** +// ************************************************** LLGroupMoneyDetailsTabEventHandler::LLGroupMoneyDetailsTabEventHandler(LLButton* earlier_buttonp, LLButton* later_buttonp, @@ -1141,9 +1141,9 @@ void LLPanelGroupLandMoney::processGroupAccountDetailsReply(LLMessageSystem* msg selfp->processReply(msg, data); } -//************************************************ -//** LLGroupMoneySalesTabEventHandler Functions ** -//************************************************ +// ************************************************ +// ** LLGroupMoneySalesTabEventHandler Functions ** +// ************************************************ LLGroupMoneySalesTabEventHandler::LLGroupMoneySalesTabEventHandler(LLButton* earlier_buttonp, LLButton* later_buttonp, @@ -1317,9 +1317,9 @@ void LLPanelGroupLandMoney::processGroupAccountTransactionsReply(LLMessageSystem self->processReply(msg, data); } -//*************************************************** -//** LLGroupMoneyPlanningTabEventHandler Functions ** -//*************************************************** +// *************************************************** +// ** LLGroupMoneyPlanningTabEventHandler Functions ** +// *************************************************** LLGroupMoneyPlanningTabEventHandler::LLGroupMoneyPlanningTabEventHandler(LLTextEditor* text_editorp, LLTabContainer* tab_containerp, diff --git a/indra/newview/llpanelgroupvoting.cpp b/indra/newview/llpanelgroupvoting.cpp index 5094d1c26..d3d24b7d0 100644 --- a/indra/newview/llpanelgroupvoting.cpp +++ b/indra/newview/llpanelgroupvoting.cpp @@ -762,7 +762,7 @@ void LLPanelGroupVoting::impl::sendStartGroupProposal() S32 quorum = llfloor(mQuorum->get()); - //*************************************Conversion to capability + // *************************************Conversion to capability LLSD body; std::string url = gAgent.getRegion()->getCapability("StartGroupProposal"); @@ -901,7 +901,7 @@ void LLPanelGroupVoting::impl::addPendingActiveScrollListItem(unsigned int curre EAddPosition pos) { std::stringstream pending; - //*TODO: translate + // *TODO: translate pending << "Retrieving active proposals (" << current << "\\" << expected << ")"; @@ -911,13 +911,13 @@ void LLPanelGroupVoting::impl::addPendingActiveScrollListItem(unsigned int curre void LLPanelGroupVoting::impl::addNoActiveScrollListItem(EAddPosition pos) { - //*TODO: translate + // *TODO: translate mProposals->addCommentText(std::string("There are currently no active proposals"), pos); } void LLPanelGroupVoting::impl::addNoHistoryScrollListItem(EAddPosition pos) { - //*TODO: translate + // *TODO: translate mVotesHistory->addCommentText(std::string("There are currently no archived proposals"), pos); } @@ -925,7 +925,7 @@ void LLPanelGroupVoting::impl::addPendingHistoryScrollListItem(unsigned int curr unsigned int expected, EAddPosition pos) { - //*TODO: translate + // *TODO: translate std::stringstream pending; pending << "Retrieving archived proposals (" << current @@ -1454,9 +1454,9 @@ void LLPanelGroupVoting::impl::onClickViewHistoryList(void *userdata) if ( self) self->setEnableHistoryList(); } -//********************************** -//** LLPanelGroupVoting Functions ** -//********************************** +// ********************************** +// ** LLPanelGroupVoting Functions ** +// ********************************** // static void* LLPanelGroupVoting::createTab(void* data) diff --git a/indra/newview/llpanelinventory.cpp b/indra/newview/llpanelinventory.cpp index bfb4ca1d1..6617fb8c5 100644 --- a/indra/newview/llpanelinventory.cpp +++ b/indra/newview/llpanelinventory.cpp @@ -30,12 +30,12 @@ * $/LicenseInfo$ */ -//***************************************************************************** +// ***************************************************************************** // // Implementation of the panel inventory - used to view and control a // task's inventory. // -//***************************************************************************** +// ***************************************************************************** #include "llviewerprecompiledheaders.h" diff --git a/indra/newview/llpanelinventory.h b/indra/newview/llpanelinventory.h index 287221e35..d06d716aa 100644 --- a/indra/newview/llpanelinventory.h +++ b/indra/newview/llpanelinventory.h @@ -30,12 +30,12 @@ * $/LicenseInfo$ */ -//***************************************************************************** +// ***************************************************************************** // // This class represents the panel used to view and control a // particular task's inventory. // -//***************************************************************************** +// ***************************************************************************** #ifndef LL_LLPANELINVENTORY_H #define LL_LLPANELINVENTORY_H diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 5d550181e..03b6cfffa 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3232,7 +3232,7 @@ void update_app(BOOL mandatory, const std::string& auth_msg) std::ostringstream message; - //*TODO:translate + // *TODO:translate std::string msg; if (!auth_msg.empty()) { diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index fa096d5a5..b42ec4c17 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -780,7 +780,7 @@ BOOL LLToolDragAndDrop::handleToolTip(S32 x, S32 y, std::string& msg, LLRect *st if (!mToolTipMsg.empty()) { msg = mToolTipMsg; - //*sticky_rect_screen = gViewerWindow->getWindowRect(); + // *sticky_rect_screen = gViewerWindow->getWindowRect(); return TRUE; } return FALSE; diff --git a/indra/newview/lltoolindividual.cpp b/indra/newview/lltoolindividual.cpp index 8382e0d72..7d176d755 100644 --- a/indra/newview/lltoolindividual.cpp +++ b/indra/newview/lltoolindividual.cpp @@ -30,13 +30,13 @@ * $/LicenseInfo$ */ -//***************************************************************************** +// ***************************************************************************** // // This is a tool for selecting individual object from the // toolbox. Handy for when you want to deal with child object // inventory... // -//***************************************************************************** +// ***************************************************************************** #include "llviewerprecompiledheaders.h" #include "lltoolindividual.h" diff --git a/indra/newview/lltoolview.cpp b/indra/newview/lltoolview.cpp index 9f6a77d24..0672f9ce8 100644 --- a/indra/newview/lltoolview.cpp +++ b/indra/newview/lltoolview.cpp @@ -77,7 +77,7 @@ LLToolView::~LLToolView() mContainList.clear(); } -//*TODO:translate? +// *TODO:translate? // void LLToolView::addTool(const std::string& icon_off, const std::string& icon_on, LLPanel* panel, LLTool* tool, LLView* hoverView, const char* label) // { // llassert(tool); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 6174e70eb..2faefc19b 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1266,7 +1266,7 @@ void LLViewerFetchedTexture::init(bool firstinit) LLViewerFetchedTexture::~LLViewerFetchedTexture() { - //*NOTE getTextureFetch can return NULL when Viewer is shutting down. + // *NOTE getTextureFetch can return NULL when Viewer is shutting down. // This is due to LLWearableList is singleton and is destroyed after // LLAppViewer::cleanup() was called. (see ticket EXT-177) if (mHasFetcher && LLAppViewer::getTextureFetch()) diff --git a/indra/newview/llvoclouds.cpp b/indra/newview/llvoclouds.cpp index 615e77fcb..9bfe6f8e9 100644 --- a/indra/newview/llvoclouds.cpp +++ b/indra/newview/llvoclouds.cpp @@ -249,10 +249,10 @@ void LLVOClouds::getGeometry(S32 idx, verticesp->setAdd(ppamu, right); (*verticesp++).getF32ptr()[3] = 0.f; - //*verticesp++ = puff_pos_agent - right + up; - //*verticesp++ = puff_pos_agent - right - up; - //*verticesp++ = puff_pos_agent + right + up; - //*verticesp++ = puff_pos_agent + right - up; + // *verticesp++ = puff_pos_agent - right + up; + // *verticesp++ = puff_pos_agent - right - up; + // *verticesp++ = puff_pos_agent + right + up; + // *verticesp++ = puff_pos_agent + right - up; *colorsp++ = color; *colorsp++ = color; diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 0db46ddee..8eb22554c 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -360,10 +360,10 @@ void LLVOPartGroup::getGeometry(S32 idx, verticesp->setAdd(ppamu, right); (*verticesp++).getF32ptr()[3] = 0.f; - //*verticesp++ = part_pos_agent + up - right; - //*verticesp++ = part_pos_agent - up - right; - //*verticesp++ = part_pos_agent + up + right; - //*verticesp++ = part_pos_agent - up + right; + // *verticesp++ = part_pos_agent + up - right; + // *verticesp++ = part_pos_agent - up - right; + // *verticesp++ = part_pos_agent + up + right; + // *verticesp++ = part_pos_agent - up + right; *colorsp++ = part.mColor; *colorsp++ = part.mColor; diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp index 4d175a071..5c7ee642d 100644 --- a/indra/newview/llwindebug.cpp +++ b/indra/newview/llwindebug.cpp @@ -238,9 +238,9 @@ BOOL GetThreadCallStack(DWORD thread_id, LLSD& info) //Windows Call Stack Construction idea from //http://www.codeproject.com/tools/minidump.asp -//**************************************************************************************** +// **************************************************************************************** BOOL WINAPI Get_Module_By_Ret_Addr(PBYTE Ret_Addr, LPWSTR Module_Name, PBYTE & Module_Addr) -//**************************************************************************************** +// **************************************************************************************** // Find module by Ret_Addr (address in the module). // Return Module_Name (full path) and Module_Addr (start address). // Return TRUE if found. @@ -371,11 +371,11 @@ bool shouldUseStackWalker(PSTACK Ebp, int max_depth) return false; } -//****************************************************************** +// ****************************************************************** void WINAPI Get_Call_Stack(const EXCEPTION_RECORD* exception_record, const CONTEXT* context_record, LLSD& info) -//****************************************************************** +// ****************************************************************** // Fill Str with call stack info. // pException can be either GetExceptionInformation() or NULL. // If pException = NULL - get current call stack. @@ -503,9 +503,9 @@ void WINAPI Get_Call_Stack(const EXCEPTION_RECORD* exception_record, } //Get_Call_Stack -//*********************************** +// *********************************** void WINAPI Get_Version_Str(LLSD& info) -//*********************************** +// *********************************** // Fill Str with Windows version. { OSVERSIONINFOEX V = {sizeof(OSVERSIONINFOEX)}; //EX for NT 5.0 and later @@ -524,9 +524,9 @@ void WINAPI Get_Version_Str(LLSD& info) V.dwMajorVersion, V.dwMinorVersion, V.dwBuildNumber, V.wServicePackMajor, V.wServicePackMinor, V.wProductType); } //Get_Version_Str -//************************************************************* +// ************************************************************* LLSD WINAPI Get_Exception_Info(PEXCEPTION_POINTERS pException) -//************************************************************* +// ************************************************************* // Allocate Str[DUMP_SIZE_MAX] and return Str with dump, if !pException - just return call stack in Str. { LLSD info; diff --git a/indra/plugins/webkit/media_plugin_webkit.cpp b/indra/plugins/webkit/media_plugin_webkit.cpp index 4bab56090..8568e1c59 100755 --- a/indra/plugins/webkit/media_plugin_webkit.cpp +++ b/indra/plugins/webkit/media_plugin_webkit.cpp @@ -230,7 +230,7 @@ private: #endif #if LL_WINDOWS - //*NOTE:Mani - On windows, at least, the component path is the + // *NOTE:Mani - On windows, at least, the component path is the // location of this dll's image file. std::string component_dir; char dll_path[_MAX_PATH]; diff --git a/indra/test/lldatapacker_tut.cpp b/indra/test/lldatapacker_tut.cpp index 6c0fa56d5..620d7f1ea 100644 --- a/indra/test/lldatapacker_tut.cpp +++ b/indra/test/lldatapacker_tut.cpp @@ -53,7 +53,7 @@ namespace tut typedef datapacker_test_t::object datapacker_test_object_t; tut::datapacker_test_t tut_datapacker_test("datapacker_test"); - //*********LLDataPackerBinaryBuffer + // *********LLDataPackerBinaryBuffer template<> template<> void datapacker_test_object_t::test<1>() { @@ -219,7 +219,7 @@ namespace tut ensure_equals("2.LLDataPackerBinaryBuffer::operator= failed", str,unpkbuf); } - //*********LLDataPackerAsciiBuffer + // *********LLDataPackerAsciiBuffer template<> template<> void datapacker_test_object_t::test<7>() @@ -345,7 +345,7 @@ namespace tut ensure("LLDataPackerAsciiBuffer::assignBuffer failed" , ((lldp.getBufferSize() == size) && (1 == lldp.getCurrentSize()))) ; } - //*********LLDataPackerAsciiFile + // *********LLDataPackerAsciiFile template<> template<> void datapacker_test_object_t::test<11>() diff --git a/indra/test/lljoint_tut.cpp b/indra/test/lljoint_tut.cpp index a84d2b6ac..72071ebbf 100644 --- a/indra/test/lljoint_tut.cpp +++ b/indra/test/lljoint_tut.cpp @@ -228,7 +228,7 @@ namespace tut } - //* + // * Test cases for the following not added. They perform operations on underlying LLXformMatrix and LLVector3 elements which have been unit tested separately. @@ -243,6 +243,6 @@ namespace tut 6) void setConstraintSilhouette(LLDynamicArray& silhouette); 7) void clampRotation(LLQuaternion old_rot, LLQuaternion new_rot); - //* + // * } #endif // THIS_DOESNT_LINK diff --git a/indra/test/llpartdata_tut.cpp b/indra/test/llpartdata_tut.cpp index cb31b81c0..bec25a028 100644 --- a/indra/test/llpartdata_tut.cpp +++ b/indra/test/llpartdata_tut.cpp @@ -152,7 +152,7 @@ namespace tut } -//*********llpartsysdata*********** +// *********llpartsysdata*********** template<> template<> void partdata_test_object_t::test<3>() From d6e9b50b99be15853e7ec0f1e5e85c8d50bf82f3 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Mon, 9 Jan 2012 16:14:33 -0500 Subject: [PATCH 15/28] Spelling fix --- indra/llcommon/doublelinkedlist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llcommon/doublelinkedlist.h b/indra/llcommon/doublelinkedlist.h index a87860cf3..f8aa9df80 100644 --- a/indra/llcommon/doublelinkedlist.h +++ b/indra/llcommon/doublelinkedlist.h @@ -124,7 +124,7 @@ public: // NOTE: This next two funtions are only included here // for those too familiar with the LLLinkedList template class. - // They are depreciated. resetList() is unecessary while + // They are deprecated. resetList() is unecessary while // getCurrentData() is identical to getNextData() and has // a misleading name. // @@ -604,7 +604,7 @@ BOOL LLDoubleLinkedList::checkData(const DATA_TYPE *data) // NOTE: This next two funtions are only included here // for those too familiar with the LLLinkedList template class. -// They are depreciated. resetList() is unecessary while +// They are deprecated. resetList() is unecessary while // getCurrentData() is identical to getNextData() and has // a misleading name. // From 4de23007a5485289073fb18d90cbe40f63e56cdc Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Wed, 11 Jan 2012 11:04:12 -0500 Subject: [PATCH 16/28] Added crouch toggle, global bool called isCrouch, function agent_toggle_down bound to toggle_down. Shift+crouch=toggle, crouch doesn't work while toggle crouched, at the moment. Formatted keys.ini to be completely aligned. --- indra/newview/app_settings/keys.ini | 424 ++++++++++++++-------------- indra/newview/llagent.cpp | 1 + indra/newview/llappviewer.cpp | 2 + indra/newview/llviewerkeyboard.cpp | 24 +- indra/newview/llviewerkeyboard.h | 2 +- 5 files changed, 239 insertions(+), 214 deletions(-) diff --git a/indra/newview/app_settings/keys.ini b/indra/newview/app_settings/keys.ini index b79e5bf50..2cdc5e8d9 100644 --- a/indra/newview/app_settings/keys.ini +++ b/indra/newview/app_settings/keys.ini @@ -23,13 +23,13 @@ FIRST_PERSON E NONE jump FIRST_PERSON C NONE push_down FIRST_PERSON F NONE toggle_fly -FIRST_PERSON LEFT NONE slide_left -FIRST_PERSON RIGHT NONE slide_right +FIRST_PERSON LEFT NONE slide_left +FIRST_PERSON RIGHT NONE slide_right FIRST_PERSON UP NONE push_forward -FIRST_PERSON DOWN NONE push_backward -FIRST_PERSON PGUP NONE jump -FIRST_PERSON PGDN NONE push_down -FIRST_PERSON HOME NONE toggle_fly +FIRST_PERSON DOWN NONE push_backward +FIRST_PERSON PGUP NONE jump +FIRST_PERSON PGDN NONE push_down +FIRST_PERSON HOME NONE toggle_fly FIRST_PERSON PAD_LEFT NONE slide_left FIRST_PERSON PAD_RIGHT NONE slide_right @@ -47,26 +47,26 @@ FIRST_PERSON D SHIFT slide_right FIRST_PERSON W SHIFT push_forward FIRST_PERSON S SHIFT push_backward FIRST_PERSON E SHIFT jump -FIRST_PERSON C SHIFT push_down +FIRST_PERSON C SHIFT toggle_down FIRST_PERSON F SHIFT toggle_fly -FIRST_PERSON SPACE NONE stop_moving -FIRST_PERSON ENTER NONE start_chat -FIRST_PERSON DIVIDE NONE start_gesture +FIRST_PERSON SPACE NONE stop_moving +FIRST_PERSON ENTER NONE start_chat +FIRST_PERSON DIVIDE NONE start_gesture -FIRST_PERSON LEFT SHIFT slide_left -FIRST_PERSON RIGHT SHIFT slide_right +FIRST_PERSON LEFT SHIFT slide_left +FIRST_PERSON RIGHT SHIFT slide_right FIRST_PERSON UP SHIFT push_forward -FIRST_PERSON DOWN SHIFT push_backward -FIRST_PERSON PGUP SHIFT jump -FIRST_PERSON PGDN SHIFT push_down +FIRST_PERSON DOWN SHIFT push_backward +FIRST_PERSON PGUP SHIFT jump +FIRST_PERSON PGDN SHIFT toggle_down FIRST_PERSON PAD_LEFT SHIFT slide_left FIRST_PERSON PAD_RIGHT SHIFT slide_right FIRST_PERSON PAD_UP SHIFT push_forward FIRST_PERSON PAD_DOWN SHIFT push_backward FIRST_PERSON PAD_PGUP SHIFT jump -FIRST_PERSON PAD_PGDN SHIFT push_down +FIRST_PERSON PAD_PGDN SHIFT toggle_down FIRST_PERSON PAD_HOME SHIFT toggle_fly FIRST_PERSON PAD_ENTER SHIFT start_chat FIRST_PERSON PAD_DIVIDE SHIFT start_gesture @@ -82,29 +82,29 @@ THIRD_PERSON S SHIFT push_backward THIRD_PERSON E NONE jump THIRD_PERSON C NONE push_down THIRD_PERSON E SHIFT jump -THIRD_PERSON C SHIFT push_down +THIRD_PERSON C SHIFT toggle_down THIRD_PERSON F NONE toggle_fly THIRD_PERSON F SHIFT toggle_fly -THIRD_PERSON SPACE NONE stop_moving -THIRD_PERSON ENTER NONE start_chat -THIRD_PERSON DIVIDE NONE start_gesture +THIRD_PERSON SPACE NONE stop_moving +THIRD_PERSON ENTER NONE start_chat +THIRD_PERSON DIVIDE NONE start_gesture -THIRD_PERSON LEFT NONE turn_left -THIRD_PERSON LEFT SHIFT slide_left -THIRD_PERSON RIGHT NONE turn_right -THIRD_PERSON RIGHT SHIFT slide_right +THIRD_PERSON LEFT NONE turn_left +THIRD_PERSON LEFT SHIFT slide_left +THIRD_PERSON RIGHT NONE turn_right +THIRD_PERSON RIGHT SHIFT slide_right THIRD_PERSON UP NONE push_forward -THIRD_PERSON DOWN NONE push_backward +THIRD_PERSON DOWN NONE push_backward THIRD_PERSON UP SHIFT push_forward -THIRD_PERSON DOWN SHIFT push_backward -THIRD_PERSON PGUP NONE jump -THIRD_PERSON PGDN NONE push_down -THIRD_PERSON PGUP SHIFT jump -THIRD_PERSON PGDN SHIFT push_down -THIRD_PERSON HOME SHIFT toggle_fly -THIRD_PERSON HOME NONE toggle_fly +THIRD_PERSON DOWN SHIFT push_backward +THIRD_PERSON PGUP NONE jump +THIRD_PERSON PGDN NONE push_down +THIRD_PERSON PGUP SHIFT jump +THIRD_PERSON PGDN SHIFT toggle_down +THIRD_PERSON HOME SHIFT toggle_fly +THIRD_PERSON HOME NONE toggle_fly THIRD_PERSON PAD_LEFT NONE turn_left THIRD_PERSON PAD_LEFT SHIFT slide_left @@ -117,7 +117,7 @@ THIRD_PERSON PAD_DOWN SHIFT push_backward THIRD_PERSON PAD_PGUP NONE jump THIRD_PERSON PAD_PGDN NONE push_down THIRD_PERSON PAD_PGUP SHIFT jump -THIRD_PERSON PAD_PGDN SHIFT push_down +THIRD_PERSON PAD_PGDN SHIFT toggle_down THIRD_PERSON PAD_HOME NONE toggle_fly THIRD_PERSON PAD_HOME SHIFT toggle_fly THIRD_PERSON PAD_CENTER NONE stop_moving @@ -128,52 +128,52 @@ THIRD_PERSON PAD_DIVIDE NONE start_gesture THIRD_PERSON PAD_DIVIDE SHIFT start_gesture # Camera controls in third person on Alt -THIRD_PERSON LEFT ALT spin_around_cw -THIRD_PERSON RIGHT ALT spin_around_ccw -THIRD_PERSON UP ALT move_forward -THIRD_PERSON DOWN ALT move_backward -THIRD_PERSON PGUP ALT spin_over -THIRD_PERSON PGDN ALT spin_under +THIRD_PERSON LEFT ALT spin_around_cw +THIRD_PERSON RIGHT ALT spin_around_ccw +THIRD_PERSON UP ALT move_forward +THIRD_PERSON DOWN ALT move_backward +THIRD_PERSON PGUP ALT spin_over +THIRD_PERSON PGDN ALT spin_under -THIRD_PERSON A ALT spin_around_cw -THIRD_PERSON D ALT spin_around_ccw -THIRD_PERSON W ALT move_forward -THIRD_PERSON S ALT move_backward -THIRD_PERSON E ALT spin_over -THIRD_PERSON C ALT spin_under +THIRD_PERSON A ALT spin_around_cw +THIRD_PERSON D ALT spin_around_ccw +THIRD_PERSON W ALT move_forward +THIRD_PERSON S ALT move_backward +THIRD_PERSON E ALT spin_over +THIRD_PERSON C ALT spin_under -THIRD_PERSON PAD_LEFT ALT spin_around_cw -THIRD_PERSON PAD_RIGHT ALT spin_around_ccw -THIRD_PERSON PAD_UP ALT move_forward -THIRD_PERSON PAD_DOWN ALT move_backward -THIRD_PERSON PAD_PGUP ALT spin_over -THIRD_PERSON PAD_PGDN ALT spin_under -THIRD_PERSON PAD_ENTER ALT start_chat -THIRD_PERSON PAD_DIVIDE ALT start_gesture +THIRD_PERSON PAD_LEFT ALT spin_around_cw +THIRD_PERSON PAD_RIGHT ALT spin_around_ccw +THIRD_PERSON PAD_UP ALT move_forward +THIRD_PERSON PAD_DOWN ALT move_backward +THIRD_PERSON PAD_PGUP ALT spin_over +THIRD_PERSON PAD_PGDN ALT spin_under +THIRD_PERSON PAD_ENTER ALT start_chat +THIRD_PERSON PAD_DIVIDE ALT start_gesture # mimic alt zoom behavior with keyboard only -THIRD_PERSON A CTL_ALT spin_around_cw -THIRD_PERSON D CTL_ALT spin_around_ccw -THIRD_PERSON W CTL_ALT spin_over -THIRD_PERSON S CTL_ALT spin_under -THIRD_PERSON E CTL_ALT spin_over -THIRD_PERSON C CTL_ALT spin_under +THIRD_PERSON A CTL_ALT spin_around_cw +THIRD_PERSON D CTL_ALT spin_around_ccw +THIRD_PERSON W CTL_ALT spin_over +THIRD_PERSON S CTL_ALT spin_under +THIRD_PERSON E CTL_ALT spin_over +THIRD_PERSON C CTL_ALT spin_under -THIRD_PERSON LEFT CTL_ALT spin_around_cw -THIRD_PERSON RIGHT CTL_ALT spin_around_ccw -THIRD_PERSON UP CTL_ALT spin_over -THIRD_PERSON DOWN CTL_ALT spin_under -THIRD_PERSON PGUP CTL_ALT spin_over -THIRD_PERSON PGDN CTL_ALT spin_under +THIRD_PERSON LEFT CTL_ALT spin_around_cw +THIRD_PERSON RIGHT CTL_ALT spin_around_ccw +THIRD_PERSON UP CTL_ALT spin_over +THIRD_PERSON DOWN CTL_ALT spin_under +THIRD_PERSON PGUP CTL_ALT spin_over +THIRD_PERSON PGDN CTL_ALT spin_under -THIRD_PERSON PAD_LEFT CTL_ALT spin_around_cw -THIRD_PERSON PAD_RIGHT CTL_ALT spin_around_ccw -THIRD_PERSON PAD_UP CTL_ALT spin_over -THIRD_PERSON PAD_DOWN CTL_ALT spin_under -THIRD_PERSON PAD_PGUP CTL_ALT spin_over -THIRD_PERSON PAD_PGDN CTL_ALT spin_under -THIRD_PERSON PAD_ENTER CTL_ALT start_chat -THIRD_PERSON PAD_DIVIDE CTL_ALT start_gesture +THIRD_PERSON PAD_LEFT CTL_ALT spin_around_cw +THIRD_PERSON PAD_RIGHT CTL_ALT spin_around_ccw +THIRD_PERSON PAD_UP CTL_ALT spin_over +THIRD_PERSON PAD_DOWN CTL_ALT spin_under +THIRD_PERSON PAD_PGUP CTL_ALT spin_over +THIRD_PERSON PAD_PGDN CTL_ALT spin_under +THIRD_PERSON PAD_ENTER CTL_ALT start_chat +THIRD_PERSON PAD_DIVIDE CTL_ALT start_gesture # Therefore pan on Alt-Shift THIRD_PERSON A CTL_ALT_SHIFT pan_left @@ -181,10 +181,10 @@ THIRD_PERSON D CTL_ALT_SHIFT pan_right THIRD_PERSON W CTL_ALT_SHIFT pan_up THIRD_PERSON S CTL_ALT_SHIFT pan_down -THIRD_PERSON LEFT CTL_ALT_SHIFT pan_left -THIRD_PERSON RIGHT CTL_ALT_SHIFT pan_right +THIRD_PERSON LEFT CTL_ALT_SHIFT pan_left +THIRD_PERSON RIGHT CTL_ALT_SHIFT pan_right THIRD_PERSON UP CTL_ALT_SHIFT pan_up -THIRD_PERSON DOWN CTL_ALT_SHIFT pan_down +THIRD_PERSON DOWN CTL_ALT_SHIFT pan_down THIRD_PERSON PAD_LEFT CTL_ALT_SHIFT pan_left THIRD_PERSON PAD_RIGHT CTL_ALT_SHIFT pan_right @@ -194,164 +194,164 @@ THIRD_PERSON PAD_ENTER CTL_ALT_SHIFT start_chat THIRD_PERSON PAD_DIVIDE CTL_ALT_SHIFT start_gesture # Basic editing camera control -EDIT A NONE spin_around_cw -EDIT D NONE spin_around_ccw -EDIT W NONE move_forward -EDIT S NONE move_backward -EDIT E NONE spin_over -EDIT C NONE spin_under -EDIT ENTER NONE start_chat -EDIT DIVIDE NONE start_gesture -EDIT PAD_ENTER NONE start_chat -EDIT PAD_DIVIDE NONE start_gesture +EDIT A NONE spin_around_cw +EDIT D NONE spin_around_ccw +EDIT W NONE move_forward +EDIT S NONE move_backward +EDIT E NONE spin_over +EDIT C NONE spin_under +EDIT ENTER NONE start_chat +EDIT DIVIDE NONE start_gesture +EDIT PAD_ENTER NONE start_chat +EDIT PAD_DIVIDE NONE start_gesture -EDIT LEFT NONE spin_around_cw -EDIT RIGHT NONE spin_around_ccw -EDIT UP NONE move_forward -EDIT DOWN NONE move_backward -EDIT PGUP NONE spin_over -EDIT PGDN NONE spin_under +EDIT LEFT NONE spin_around_cw +EDIT RIGHT NONE spin_around_ccw +EDIT UP NONE move_forward +EDIT DOWN NONE move_backward +EDIT PGUP NONE spin_over +EDIT PGDN NONE spin_under -EDIT A SHIFT pan_left -EDIT D SHIFT pan_right -EDIT W SHIFT pan_up -EDIT S SHIFT pan_down +EDIT A SHIFT pan_left +EDIT D SHIFT pan_right +EDIT W SHIFT pan_up +EDIT S SHIFT pan_down -EDIT LEFT SHIFT pan_left -EDIT RIGHT SHIFT pan_right -EDIT UP SHIFT pan_up -EDIT DOWN SHIFT pan_down +EDIT LEFT SHIFT pan_left +EDIT RIGHT SHIFT pan_right +EDIT UP SHIFT pan_up +EDIT DOWN SHIFT pan_down # Walking works with ALT held down. -EDIT A ALT slide_left -EDIT D ALT slide_right -EDIT W ALT push_forward -EDIT S ALT push_backward -EDIT E ALT jump -EDIT C ALT push_down +EDIT A ALT slide_left +EDIT D ALT slide_right +EDIT W ALT push_forward +EDIT S ALT push_backward +EDIT E ALT jump +EDIT C ALT push_down -EDIT LEFT ALT slide_left -EDIT RIGHT ALT slide_right -EDIT UP ALT push_forward -EDIT DOWN ALT push_backward -EDIT PGUP ALT jump -EDIT PGDN ALT push_down -EDIT HOME ALT toggle_fly +EDIT LEFT ALT slide_left +EDIT RIGHT ALT slide_right +EDIT UP ALT push_forward +EDIT DOWN ALT push_backward +EDIT PGUP ALT jump +EDIT PGDN ALT push_down +EDIT HOME ALT toggle_fly -EDIT PAD_LEFT ALT slide_left -EDIT PAD_RIGHT ALT slide_right -EDIT PAD_UP ALT push_forward -EDIT PAD_DOWN ALT push_backward -EDIT PAD_PGUP ALT jump -EDIT PAD_PGDN ALT push_down -EDIT PAD_ENTER ALT start_chat -EDIT PAD_DIVIDE ALT start_gesture +EDIT PAD_LEFT ALT slide_left +EDIT PAD_RIGHT ALT slide_right +EDIT PAD_UP ALT push_forward +EDIT PAD_DOWN ALT push_backward +EDIT PAD_PGUP ALT jump +EDIT PAD_PGDN ALT push_down +EDIT PAD_ENTER ALT start_chat +EDIT PAD_DIVIDE ALT start_gesture -SITTING A ALT spin_around_cw -SITTING D ALT spin_around_ccw -SITTING W ALT move_forward -SITTING S ALT move_backward -SITTING E ALT spin_over_sitting -SITTING C ALT spin_under_sitting +SITTING A ALT spin_around_cw +SITTING D ALT spin_around_ccw +SITTING W ALT move_forward +SITTING S ALT move_backward +SITTING E ALT spin_over_sitting +SITTING C ALT spin_under_sitting -SITTING LEFT ALT spin_around_cw -SITTING RIGHT ALT spin_around_ccw -SITTING UP ALT move_forward -SITTING DOWN ALT move_backward -SITTING PGUP ALT spin_over -SITTING PGDN ALT spin_under +SITTING LEFT ALT spin_around_cw +SITTING RIGHT ALT spin_around_ccw +SITTING UP ALT move_forward +SITTING DOWN ALT move_backward +SITTING PGUP ALT spin_over +SITTING PGDN ALT spin_under -SITTING A CTL_ALT spin_around_cw -SITTING D CTL_ALT spin_around_ccw -SITTING W CTL_ALT spin_over -SITTING S CTL_ALT spin_under -SITTING E CTL_ALT spin_over -SITTING C CTL_ALT spin_under +SITTING A CTL_ALT spin_around_cw +SITTING D CTL_ALT spin_around_ccw +SITTING W CTL_ALT spin_over +SITTING S CTL_ALT spin_under +SITTING E CTL_ALT spin_over +SITTING C CTL_ALT spin_under -SITTING LEFT CTL_ALT spin_around_cw -SITTING RIGHT CTL_ALT spin_around_ccw -SITTING UP CTL_ALT spin_over -SITTING DOWN CTL_ALT spin_under -SITTING PGUP CTL_ALT spin_over -SITTING PGDN CTL_ALT spin_under +SITTING LEFT CTL_ALT spin_around_cw +SITTING RIGHT CTL_ALT spin_around_ccw +SITTING UP CTL_ALT spin_over +SITTING DOWN CTL_ALT spin_under +SITTING PGUP CTL_ALT spin_over +SITTING PGDN CTL_ALT spin_under -SITTING A NONE spin_around_cw_sitting -SITTING D NONE spin_around_ccw_sitting -SITTING W NONE move_forward_sitting -SITTING S NONE move_backward_sitting -SITTING E NONE spin_over_sitting -SITTING C NONE spin_under_sitting +SITTING A NONE spin_around_cw_sitting +SITTING D NONE spin_around_ccw_sitting +SITTING W NONE move_forward_sitting +SITTING S NONE move_backward_sitting +SITTING E NONE spin_over_sitting +SITTING C NONE spin_under_sitting -SITTING LEFT NONE spin_around_cw_sitting -SITTING RIGHT NONE spin_around_ccw_sitting -SITTING UP NONE move_forward_sitting -SITTING DOWN NONE move_backward_sitting -SITTING PGUP NONE spin_over_sitting -SITTING PGDN NONE spin_under_sitting +SITTING LEFT NONE spin_around_cw_sitting +SITTING RIGHT NONE spin_around_ccw_sitting +SITTING UP NONE move_forward_sitting +SITTING DOWN NONE move_backward_sitting +SITTING PGUP NONE spin_over_sitting +SITTING PGDN NONE spin_under_sitting -SITTING PAD_LEFT NONE spin_around_cw_sitting -SITTING PAD_RIGHT NONE spin_around_ccw_sitting -SITTING PAD_UP NONE move_forward_sitting -SITTING PAD_DOWN NONE move_backward_sitting -SITTING PAD_PGUP NONE spin_over_sitting -SITTING PAD_PGDN NONE spin_under_sitting -SITTING PAD_CENTER NONE stop_moving -SITTING PAD_ENTER NONE start_chat -SITTING PAD_DIVIDE NONE start_gesture +SITTING PAD_LEFT NONE spin_around_cw_sitting +SITTING PAD_RIGHT NONE spin_around_ccw_sitting +SITTING PAD_UP NONE move_forward_sitting +SITTING PAD_DOWN NONE move_backward_sitting +SITTING PAD_PGUP NONE spin_over_sitting +SITTING PAD_PGDN NONE spin_under_sitting +SITTING PAD_CENTER NONE stop_moving +SITTING PAD_ENTER NONE start_chat +SITTING PAD_DIVIDE NONE start_gesture # these are for passing controls when sitting on vehicles -SITTING A SHIFT slide_left -SITTING D SHIFT slide_right -SITTING LEFT SHIFT slide_left -SITTING RIGHT SHIFT slide_right +SITTING A SHIFT slide_left +SITTING D SHIFT slide_right +SITTING LEFT SHIFT slide_left +SITTING RIGHT SHIFT slide_right -SITTING PAD_LEFT SHIFT slide_left -SITTING PAD_RIGHT SHIFT slide_right -SITTING PAD_ENTER SHIFT start_chat -SITTING PAD_DIVIDE SHIFT start_gesture +SITTING PAD_LEFT SHIFT slide_left +SITTING PAD_RIGHT SHIFT slide_right +SITTING PAD_ENTER SHIFT start_chat +SITTING PAD_DIVIDE SHIFT start_gesture # pan on Alt-Shift -SITTING A CTL_ALT_SHIFT pan_left -SITTING D CTL_ALT_SHIFT pan_right -SITTING W CTL_ALT_SHIFT pan_up -SITTING S CTL_ALT_SHIFT pan_down +SITTING A CTL_ALT_SHIFT pan_left +SITTING D CTL_ALT_SHIFT pan_right +SITTING W CTL_ALT_SHIFT pan_up +SITTING S CTL_ALT_SHIFT pan_down -SITTING LEFT CTL_ALT_SHIFT pan_left -SITTING RIGHT CTL_ALT_SHIFT pan_right -SITTING UP CTL_ALT_SHIFT pan_up -SITTING DOWN CTL_ALT_SHIFT pan_down +SITTING LEFT CTL_ALT_SHIFT pan_left +SITTING RIGHT CTL_ALT_SHIFT pan_right +SITTING UP CTL_ALT_SHIFT pan_up +SITTING DOWN CTL_ALT_SHIFT pan_down -SITTING PAD_LEFT CTL_ALT_SHIFT pan_left -SITTING PAD_RIGHT CTL_ALT_SHIFT pan_right -SITTING PAD_UP CTL_ALT_SHIFT pan_up -SITTING PAD_DOWN CTL_ALT_SHIFT pan_down -SITTING PAD_ENTER CTL_ALT_SHIFT start_chat -SITTING PAD_DIVIDE CTL_ALT_SHIFT start_gesture +SITTING PAD_LEFT CTL_ALT_SHIFT pan_left +SITTING PAD_RIGHT CTL_ALT_SHIFT pan_right +SITTING PAD_UP CTL_ALT_SHIFT pan_up +SITTING PAD_DOWN CTL_ALT_SHIFT pan_down +SITTING PAD_ENTER CTL_ALT_SHIFT start_chat +SITTING PAD_DIVIDE CTL_ALT_SHIFT start_gesture -SITTING ENTER NONE start_chat -SITTING DIVIDE NONE start_gesture +SITTING ENTER NONE start_chat +SITTING DIVIDE NONE start_gesture # Avatar editing camera controls -EDIT_AVATAR A NONE edit_avatar_spin_cw -EDIT_AVATAR D NONE edit_avatar_spin_ccw -EDIT_AVATAR W NONE edit_avatar_move_forward -EDIT_AVATAR S NONE edit_avatar_move_backward -EDIT_AVATAR E NONE edit_avatar_spin_over -EDIT_AVATAR C NONE edit_avatar_spin_under -EDIT_AVATAR LEFT NONE edit_avatar_spin_cw -EDIT_AVATAR RIGHT NONE edit_avatar_spin_ccw -EDIT_AVATAR UP NONE edit_avatar_move_forward -EDIT_AVATAR DOWN NONE edit_avatar_move_backward -EDIT_AVATAR PGUP NONE edit_avatar_spin_over -EDIT_AVATAR PGDN NONE edit_avatar_spin_under -EDIT_AVATAR ENTER NONE start_chat -EDIT_AVATAR DIVIDE NONE start_gesture -EDIT_AVATAR PAD_LEFT NONE edit_avatar_spin_cw -EDIT_AVATAR PAD_RIGHT NONE edit_avatar_spin_ccw -EDIT_AVATAR PAD_UP NONE edit_avatar_move_forward -EDIT_AVATAR PAD_DOWN NONE edit_avatar_move_backward -EDIT_AVATAR PAD_PGUP NONE edit_avatar_spin_over -EDIT_AVATAR PAD_PGDN NONE edit_avatar_spin_under -EDIT_AVATAR PAD_ENTER NONE start_chat -EDIT_AVATAR PAD_DIVIDE NONE start_gesture +EDIT_AVATAR A NONE edit_avatar_spin_cw +EDIT_AVATAR D NONE edit_avatar_spin_ccw +EDIT_AVATAR W NONE edit_avatar_move_forward +EDIT_AVATAR S NONE edit_avatar_move_backward +EDIT_AVATAR E NONE edit_avatar_spin_over +EDIT_AVATAR C NONE edit_avatar_spin_under +EDIT_AVATAR LEFT NONE edit_avatar_spin_cw +EDIT_AVATAR RIGHT NONE edit_avatar_spin_ccw +EDIT_AVATAR UP NONE edit_avatar_move_forward +EDIT_AVATAR DOWN NONE edit_avatar_move_backward +EDIT_AVATAR PGUP NONE edit_avatar_spin_over +EDIT_AVATAR PGDN NONE edit_avatar_spin_under +EDIT_AVATAR ENTER NONE start_chat +EDIT_AVATAR DIVIDE NONE start_gesture +EDIT_AVATAR PAD_LEFT NONE edit_avatar_spin_cw +EDIT_AVATAR PAD_RIGHT NONE edit_avatar_spin_ccw +EDIT_AVATAR PAD_UP NONE edit_avatar_move_forward +EDIT_AVATAR PAD_DOWN NONE edit_avatar_move_backward +EDIT_AVATAR PAD_PGUP NONE edit_avatar_spin_over +EDIT_AVATAR PAD_PGDN NONE edit_avatar_spin_under +EDIT_AVATAR PAD_ENTER NONE start_chat +EDIT_AVATAR PAD_DIVIDE NONE start_gesture diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index a2721a511..a80cb3b43 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -69,6 +69,7 @@ #include "llviewercontrol.h" #include "llviewerdisplay.h" #include "llviewerjoystick.h" +#include "llviewerkeyboard.h" //For crouch toggle #include "llviewermediafocus.h" #include "llviewermenu.h" #include "llviewerobjectlist.h" diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 2b24eabe0..ed43400df 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1098,6 +1098,8 @@ bool LLAppViewer::mainLoop() && !gFocusMgr.focusLocked()) { joystick->scanJoystick(); + if(isCrouch) + gAgent.moveUp(-1); gKeyboard->scanKeyboard(); } diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index 622063aa9..e9289ad09 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -45,6 +45,7 @@ #include "lltoolfocus.h" #include "llviewerwindow.h" #include "llvoavatarself.h" +#include "lllslconstants.h" // // Constants @@ -60,12 +61,14 @@ const F32 YAW_NUDGE_RATE = 0.05f; // fraction of normal speed LLViewerKeyboard gViewerKeyboard; +bool isCrouch = 0; //Shouldn't start crouched. + void agent_jump( EKeystate s ) { if( KEYSTATE_UP == s ) return; F32 time = gKeyboard->getCurKeyElapsedTime(); S32 frame_count = llround(gKeyboard->getCurKeyElapsedFrameCount()); - + if(isCrouch) isCrouch=0; if( time < FLY_TIME || frame_count <= FLY_FRAMES || gAgent.upGrabbed() @@ -79,6 +82,23 @@ void agent_jump( EKeystate s ) gAgent.moveUp(1); } } +void agent_toggle_down( EKeystate s ) +{ + if(KEYSTATE_UP == s) return; + else if(KEYSTATE_DOWN == s && !(gAgent.getControlFlags() & AGENT_SITTING)) + if(isCrouch) isCrouch=0; + else if(!gAgent.getFlying()) + { + isCrouch=1; + gAgent.moveUp(-1); + } + else + gAgent.moveUp(-1); + else + { + gAgent.moveUp(-1); + } +} void agent_push_down( EKeystate s ) { @@ -226,6 +246,7 @@ void agent_toggle_fly( EKeystate s ) if (KEYSTATE_DOWN == s ) { gAgent.toggleFlying(); + if(isCrouch) isCrouch=0; } } @@ -530,6 +551,7 @@ void bind_keyboard_functions() gViewerKeyboard.bindNamedFunction("push_backward", agent_push_backward); gViewerKeyboard.bindNamedFunction("look_up", agent_look_up); gViewerKeyboard.bindNamedFunction("look_down", agent_look_down); + gViewerKeyboard.bindNamedFunction("toggle_down", agent_toggle_down); gViewerKeyboard.bindNamedFunction("toggle_fly", agent_toggle_fly); gViewerKeyboard.bindNamedFunction("turn_left", agent_turn_left); gViewerKeyboard.bindNamedFunction("turn_right", agent_turn_right); diff --git a/indra/newview/llviewerkeyboard.h b/indra/newview/llviewerkeyboard.h index e5d834597..b52b738bd 100644 --- a/indra/newview/llviewerkeyboard.h +++ b/indra/newview/llviewerkeyboard.h @@ -93,5 +93,5 @@ protected: }; extern LLViewerKeyboard gViewerKeyboard; - +extern bool isCrouch; #endif // LL_LLVIEWERKEYBOARD_H From d93f0bb56a2d7c47fbaacb484c9e6df868a5eeca Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Wed, 11 Jan 2012 11:18:23 -0500 Subject: [PATCH 17/28] Rubber-band camera in crouchtoggle avoided. --- indra/newview/llagent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index a80cb3b43..c432e3a4b 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -439,7 +439,7 @@ void LLAgent::moveUp(S32 direction) setControlFlags(AGENT_CONTROL_UP_NEG | AGENT_CONTROL_FAST_UP); } - gAgentCamera.resetView(); + if (!isCrouch) gAgentCamera.resetView(); } //----------------------------------------------------------------------------- From 09213950c37745e765e2dbbdec3de3f7dff1ab7f Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Wed, 11 Jan 2012 11:30:18 -0500 Subject: [PATCH 18/28] May or may not fix a lack of AO stand animations caused by my last commit... probably does --- indra/newview/llviewerkeyboard.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index e9289ad09..c73c12da4 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -97,6 +97,7 @@ void agent_toggle_down( EKeystate s ) else { gAgent.moveUp(-1); + if(isCrouch) isCrouch=0; } } From 4eea8624b7ab51aece9fa5af185353fa3231aa0b Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Thu, 12 Jan 2012 01:37:13 +0100 Subject: [PATCH 19/28] Fix keyboard shortcuts like ctrl+w for floaters --- indra/llui/llfloater.cpp | 17 ++++++++++++++++- indra/llui/llfloater.h | 1 + indra/llui/llmultifloater.cpp | 16 ---------------- indra/llui/llmultifloater.h | 1 - indra/newview/llimpanel.cpp | 4 +--- 5 files changed, 18 insertions(+), 21 deletions(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 32af5ca47..fccddcb79 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1201,7 +1201,6 @@ BOOL LLFloater::handleMiddleMouseDown(S32 x, S32 y, MASK mask) return LLPanel::handleMiddleMouseDown( x, y, mask ); } - // virtual BOOL LLFloater::handleDoubleClick(S32 x, S32 y, MASK mask) { @@ -1210,6 +1209,22 @@ BOOL LLFloater::handleDoubleClick(S32 x, S32 y, MASK mask) return was_minimized || LLPanel::handleDoubleClick(x, y, mask); } +// virtual +BOOL LLFloater::handleKeyHere(KEY key, MASK mask) +{ + if (key == 'W' && mask == MASK_CONTROL) + { + if (canClose() && isCloseable()) + { + close(); + } + return TRUE; + } + + return LLPanel::handleKeyHere(key, mask); +} + + void LLFloater::bringToFront( S32 x, S32 y ) { if (getVisible() && pointInView(x, y)) diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 939071b0f..40d8c7ecd 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -197,6 +197,7 @@ public: virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); virtual void draw(); virtual void onOpen() {} diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp index 29ea32816..92823fd33 100644 --- a/indra/llui/llmultifloater.cpp +++ b/indra/llui/llmultifloater.cpp @@ -406,22 +406,6 @@ void LLMultiFloater::setVisible(BOOL visible) } } -BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask) -{ - if (key == 'W' && mask == MASK_CONTROL) - { - LLFloater* floater = getActiveFloater(); - // is user closeable and is system closeable - if (floater && floater->canClose() && floater->isCloseable()) - { - floater->close(); - } - return TRUE; - } - - return LLFloater::handleKeyHere(key, mask); -} - LLFloater* LLMultiFloater::getActiveFloater() { return (LLFloater*)mTabContainer->getCurrentPanel(); diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h index 29c03b3c4..ccf5f462f 100644 --- a/indra/llui/llmultifloater.h +++ b/indra/llui/llmultifloater.h @@ -51,7 +51,6 @@ public: /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void draw(); /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); virtual void setCanResize(BOOL can_resize); virtual void growToFit(S32 content_width, S32 content_height); diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 9a4e36244..2f236ac07 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1776,9 +1776,7 @@ BOOL LLFloaterIMPanel::handleKeyHere( KEY key, MASK mask ) } } - // May need to call base class LLPanel::handleKeyHere if not handled - // in order to tab between buttons. JNC 1.2.2002 - return handled; + return LLFloater::handleKeyHere(key, mask); } BOOL LLFloaterIMPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, From 4feb69e3422cb457dbc9e320b7f86e6e9eafc372 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Thu, 12 Jan 2012 06:35:42 +0100 Subject: [PATCH 20/28] Crouch toggle rewrite - removed garbage. --- indra/newview/llappviewer.cpp | 7 +++++-- indra/newview/llviewerkeyboard.cpp | 23 ++++++++--------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ed43400df..568f6a4e6 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1098,9 +1098,12 @@ bool LLAppViewer::mainLoop() && !gFocusMgr.focusLocked()) { joystick->scanJoystick(); - if(isCrouch) - gAgent.moveUp(-1); gKeyboard->scanKeyboard(); + if(isCrouch) + { + gAgent.moveUp(-1); + } + } // Update state based on messages, user input, object idle. diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index c73c12da4..5b3312371 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -61,14 +61,14 @@ const F32 YAW_NUDGE_RATE = 0.05f; // fraction of normal speed LLViewerKeyboard gViewerKeyboard; -bool isCrouch = 0; //Shouldn't start crouched. +bool isCrouch = false; //Shouldn't start crouched. void agent_jump( EKeystate s ) { if( KEYSTATE_UP == s ) return; F32 time = gKeyboard->getCurKeyElapsedTime(); S32 frame_count = llround(gKeyboard->getCurKeyElapsedFrameCount()); - if(isCrouch) isCrouch=0; + isCrouch = false; if( time < FLY_TIME || frame_count <= FLY_FRAMES || gAgent.upGrabbed() @@ -85,19 +85,11 @@ void agent_jump( EKeystate s ) void agent_toggle_down( EKeystate s ) { if(KEYSTATE_UP == s) return; - else if(KEYSTATE_DOWN == s && !(gAgent.getControlFlags() & AGENT_SITTING)) - if(isCrouch) isCrouch=0; - else if(!gAgent.getFlying()) - { - isCrouch=1; - gAgent.moveUp(-1); - } - else - gAgent.moveUp(-1); - else + + gAgent.moveUp(-1); + if(KEYSTATE_DOWN == s && !gAgent.getFlying()) { - gAgent.moveUp(-1); - if(isCrouch) isCrouch=0; + isCrouch = !isCrouch; } } @@ -105,6 +97,7 @@ void agent_push_down( EKeystate s ) { if( KEYSTATE_UP == s ) return; gAgent.moveUp(-1); + isCrouch = false; } static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode mode) @@ -247,7 +240,7 @@ void agent_toggle_fly( EKeystate s ) if (KEYSTATE_DOWN == s ) { gAgent.toggleFlying(); - if(isCrouch) isCrouch=0; + isCrouch = false; } } From 6f3a92d772007a33c193f4838511ba1764c3ccfb Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 12 Jan 2012 13:10:27 -0500 Subject: [PATCH 21/28] Fixed spelling. --- indra/newview/skins/default/xui/fr/menu_viewer.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index cf5500411..d99d12198 100644 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -248,7 +248,7 @@ - + @@ -261,4 +261,4 @@ - \ No newline at end of file + From e5a27e6558005951ba881ae2a43ed94033a15334 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 12 Jan 2012 13:25:20 -0500 Subject: [PATCH 22/28] Added WebLaunchSinguIssue notification, but if feel my translation skills inadequate, so I'm just throwing this out here for someone like Nomade Zhao to correct and finish. --- indra/newview/skins/default/xui/fr/notifications.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index a2e729fe5..3926555a9 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -1291,6 +1291,10 @@ Télécharger vers le dossier Applications ? Pour apprendre à utiliser JIRA, consultez le Wiki de [SECOND_LIFE]. + + Pour signaler des bugs et autres problèmes avec Singularity, utilisez le Google Issue Tracker. + + Visitez le blog officiel des Lindens pour les dernières nouvelles et informations. From 5a66c2bfbab0a0e96fb94bf21460674661c58d7c Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 12 Jan 2012 13:32:44 -0500 Subject: [PATCH 23/28] Added WebLaunchSinguIssue Notification, which will make sense in the next commit. Also corrected location of Report Bug from in Tools to in Help under Bug Reporting. --- .../skins/default/xui/en-us/notifications.xml | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml index deb031d26..f67512ab5 100644 --- a/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/indra/newview/skins/default/xui/en-us/notifications.xml @@ -1885,7 +1885,7 @@ No Group selected. type="alertmodal"> Unable to deed land: Cannot find the region this land is in. -Please use Tools -> Report Bug to report this. +Please use Help -> Bug Reporting -> Report Bug to report this. @@ -2948,6 +2948,18 @@ Visit the [SECOND_LIFE] Public Issue Tracker, where you can report bugs and othe yestext="Go to page"/> + +Visit the Singularity Issue Tracker, to report bugs and issues with Singularity Viewer. + + + Date: Thu, 12 Jan 2012 13:40:14 -0500 Subject: [PATCH 24/28] Added in two options under Help->Bug Reporting for reporting bugs with Singularity more easily: Report Singularity Bug goes to the new issue page. Singularity Issue Tracker goes to the issues list. Spelling correction. WebLaunchSinguIssue is called in these two new menu options. --- .../newview/skins/default/xui/en-us/menu_viewer.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 1211ba91e..b0fe35a2d 100644 --- a/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -881,10 +881,15 @@ + + + + mouse_opaque="true" name="Bug Reporting 101..." width="166"> @@ -905,6 +910,11 @@ + + + From be978ab76bb4c58b9f506095ec8066ccd3f975e5 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 12 Jan 2012 17:35:41 -0500 Subject: [PATCH 25/28] A small change issued by Siana to correct a small problem. --- indra/newview/llimpanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 021a5d5f0..5eb1fb036 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1776,7 +1776,7 @@ BOOL LLFloaterIMPanel::handleKeyHere( KEY key, MASK mask ) } } - return LLFloater::handleKeyHere(key, mask); + return handled || LLFloater::handleKeyHere(key, mask); } BOOL LLFloaterIMPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, From 0777bedde8ee184aa69a51008b67f52b9df0d416 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 12 Jan 2012 17:48:43 -0500 Subject: [PATCH 26/28] Made it so the quick setting changer button never leaves its exact spot pixel for pixel; Moved where exactly the bottom of the expanded panel was to match the unexpanded bottom; Extended the bars of WindLight because their lack of capitalization on available real estate has been bugging me; Changed the tooltip of the WindLight Water control to no longer _reflect the Sky_. --- .../xui/en-us/wlfPanel_AdvSettings_expanded.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/newview/skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml b/indra/newview/skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml index b76a304d9..b479496ba 100644 --- a/indra/newview/skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml +++ b/indra/newview/skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml @@ -1,8 +1,8 @@ - - + Windlight Sky Preset: - Windlight Water Preset: - -