diff options
author | prep linden <prep@lindenlab.com> | 2012-06-01 09:48:51 -0400 |
---|---|---|
committer | prep linden <prep@lindenlab.com> | 2012-06-01 09:48:51 -0400 |
commit | 5e15eaca23e9618bc9585caacd27ed4b64833541 (patch) | |
tree | 377bcb9745888fa44b1cb5a29895b58890d65b65 | |
parent | c17d967d796b2bd735d3d8eea340c3541aa86d63 (diff) | |
parent | 37ca2964b599193214c46551e665fe560f69f6cf (diff) |
merge
-rw-r--r-- | autobuild.xml | 12 | ||||
-rwxr-xr-x | indra/newview/llagent.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llagent.h | 10 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindinglinksets.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindinglinksets.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindingobjects.cpp | 87 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindingobjects.h | 7 |
7 files changed, 78 insertions, 53 deletions
diff --git a/autobuild.xml b/autobuild.xml index c6844d042a..c172f9b39e 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1110,9 +1110,9 @@ <key>archive</key> <map> <key>hash</key> - <string>e089a9bb38fe8c0f96c0b9c172e4d8dd</string> + <string>c34d14026facc6481971ab34bcf6a835</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/258508/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120531.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/258547/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120531.tar.bz2</string> </map> <key>name</key> <string>darwin</string> @@ -1122,9 +1122,9 @@ <key>archive</key> <map> <key>hash</key> - <string>9682692c9c429367a8cb78fe15863ac3</string> + <string>c87e7d3a12e44e247733d6c242885de2</string> <key>url</key> - <string>'http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/258508/arch/Linux/installer/llphysicsextensions-0.1-linux-20120531.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/258547/arch/Linux/installer/llphysicsextensions-0.1-linux-20120601.tar.bz2</string> </map> <key>name</key> <string>linux</string> @@ -1134,9 +1134,9 @@ <key>archive</key> <map> <key>hash</key> - <string>01fd675e59013126a49b451e88724b2b</string> + <string>38a31993f6e46eb18e88419cec793eaf</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/258508/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120531.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/258547/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120531.tar.bz2</string> </map> <key>name</key> <string>windows</string> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 3870a3be2e..d94e01ee47 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -243,6 +243,7 @@ LLAgent::LLAgent() : mbTeleportKeepsLookAt(false), mAgentAccess(new LLAgentAccess(gSavedSettings)), + mGodLevelChangeSignal(), mCanEditParcel(false), mTeleportSourceSLURL(new LLSLURL), mTeleportState( TELEPORT_NONE ), @@ -2434,6 +2435,12 @@ void LLAgent::setAdminOverride(BOOL b) void LLAgent::setGodLevel(U8 god_level) { mAgentAccess->setGodLevel(god_level); + mGodLevelChangeSignal(god_level); +} + +LLAgent::god_level_change_slot_t LLAgent::registerGodLevelChanageListener(god_level_change_callback_t pGodLevelChangeCallback) +{ + return mGodLevelChangeSignal.connect(pGodLevelChangeCallback); } void LLAgent::setAOTransition() diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 740770bbdf..72f695d917 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -631,6 +631,16 @@ public: void requestEnterGodMode(); void requestLeaveGodMode(); + typedef boost::function<void (U8)> god_level_change_callback_t; + typedef boost::signals2::signal<void (U8)> god_level_change_signal_t; + typedef boost::signals2::connection god_level_change_slot_t; + + god_level_change_slot_t registerGodLevelChanageListener(god_level_change_callback_t pGodLevelChangeCallback); + +private: + god_level_change_signal_t mGodLevelChangeSignal; + + //-------------------------------------------------------------------- // Maturity //-------------------------------------------------------------------- diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 36f54ffae1..d53f4db5c2 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -264,13 +264,6 @@ LLSD LLFloaterPathfindingLinksets::convertObjectsIntoScrollListData(const LLPath void LLFloaterPathfindingLinksets::updateControls() { LLFloaterPathfindingObjects::updateControls(); - updateStateOnEditFields(); - updateStateOnEditLinksetUse(); -} - -void LLFloaterPathfindingLinksets::updateSelection() -{ - LLFloaterPathfindingObjects::updateSelection(); updateEditFieldValues(); updateStateOnEditFields(); updateStateOnEditLinksetUse(); diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h index d989e0ea4d..87719e28f0 100644 --- a/indra/newview/llfloaterpathfindinglinksets.h +++ b/indra/newview/llfloaterpathfindinglinksets.h @@ -65,7 +65,6 @@ protected: virtual LLSD convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr) const; virtual void updateControls(); - virtual void updateSelection(); virtual S32 getNameColumnIndex() const; virtual const LLColor4 &getBeaconColor() const; diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp index 572f2f707e..d78ad9d754 100644 --- a/indra/newview/llfloaterpathfindingobjects.cpp +++ b/indra/newview/llfloaterpathfindingobjects.cpp @@ -74,7 +74,7 @@ void LLFloaterPathfindingObjects::onOpen(const LLSD &pKey) if (!mSelectionUpdateSlot.connected()) { - mSelectionUpdateSlot = LLSelectMgr::getInstance()->mUpdateSignal.connect(boost::bind(&LLFloaterPathfindingObjects::onSelectionListChanged, this)); + mSelectionUpdateSlot = LLSelectMgr::getInstance()->mUpdateSignal.connect(boost::bind(&LLFloaterPathfindingObjects::onInWorldSelectionListChanged, this)); } if (!mRegionBoundaryCrossingSlot.connected()) @@ -82,11 +82,21 @@ void LLFloaterPathfindingObjects::onOpen(const LLSD &pKey) mRegionBoundaryCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLFloaterPathfindingObjects::onRegionBoundaryCrossed, this)); } + if (!mGodLevelChangeSlot.connected()) + { + mGodLevelChangeSlot = gAgent.registerGodLevelChanageListener(boost::bind(&LLFloaterPathfindingObjects::onGodLevelChange, this, _1)); + } + requestGetObjects(); } void LLFloaterPathfindingObjects::onClose(bool pIsAppQuitting) { + if (mGodLevelChangeSlot.connected()) + { + mGodLevelChangeSlot.disconnect(); + } + if (mRegionBoundaryCrossingSlot.connected()) { mRegionBoundaryCrossingSlot.disconnect(); @@ -357,40 +367,6 @@ void LLFloaterPathfindingObjects::updateControls() updateStateOnEditFields(); } -void LLFloaterPathfindingObjects::updateSelection() -{ - mObjectsSelection.clear(); - LLSelectMgr::getInstance()->deselectAll(); - - std::vector<LLScrollListItem *> selectedItems = mObjectsScrollList->getAllSelected(); - if (!selectedItems.empty()) - { - int numSelectedItems = selectedItems.size(); - - std::vector<LLViewerObject *>viewerObjects; - viewerObjects.reserve(numSelectedItems); - - for (std::vector<LLScrollListItem *>::const_iterator selectedItemIter = selectedItems.begin(); - selectedItemIter != selectedItems.end(); ++selectedItemIter) - { - const LLScrollListItem *selectedItem = *selectedItemIter; - - LLViewerObject *viewerObject = gObjectList.findObject(selectedItem->getUUID()); - if (viewerObject != NULL) - { - viewerObjects.push_back(viewerObject); - } - } - - if (!viewerObjects.empty()) - { - mObjectsSelection = LLSelectMgr::getInstance()->selectObjectAndFamily(viewerObjects); - } - } - - updateControls(); -} - S32 LLFloaterPathfindingObjects::getNameColumnIndex() const { return 0; @@ -552,10 +528,10 @@ void LLFloaterPathfindingObjects::onTeleportClicked() void LLFloaterPathfindingObjects::onScrollListSelectionChanged() { - updateSelection(); + updateOnScrollListChange(); } -void LLFloaterPathfindingObjects::onSelectionListChanged() +void LLFloaterPathfindingObjects::onInWorldSelectionListChanged() { updateControls(); } @@ -565,6 +541,11 @@ void LLFloaterPathfindingObjects::onRegionBoundaryCrossed() requestGetObjects(); } +void LLFloaterPathfindingObjects::onGodLevelChange(U8 pGodLevel) +{ + requestGetObjects(); +} + void LLFloaterPathfindingObjects::updateMessagingStatus() { std::string statusText(""); @@ -676,6 +657,38 @@ void LLFloaterPathfindingObjects::updateStateOnEditFields() mTeleportButton->setEnabled(numSelectedItems == 1); } +void LLFloaterPathfindingObjects::updateOnScrollListChange() +{ + mObjectsSelection.clear(); + LLSelectMgr::getInstance()->deselectAll(); + + std::vector<LLScrollListItem *> selectedItems = mObjectsScrollList->getAllSelected(); + if (!selectedItems.empty()) + { + int numSelectedItems = selectedItems.size(); + + std::vector<LLViewerObject *>viewerObjects; + viewerObjects.reserve(numSelectedItems); + + for (std::vector<LLScrollListItem *>::const_iterator selectedItemIter = selectedItems.begin(); + selectedItemIter != selectedItems.end(); ++selectedItemIter) + { + const LLScrollListItem *selectedItem = *selectedItemIter; + + LLViewerObject *viewerObject = gObjectList.findObject(selectedItem->getUUID()); + if (viewerObject != NULL) + { + viewerObjects.push_back(viewerObject); + } + } + + if (!viewerObjects.empty()) + { + mObjectsSelection = LLSelectMgr::getInstance()->selectObjectAndFamily(viewerObjects); + } + } +} + LLPathfindingObjectPtr LLFloaterPathfindingObjects::findObject(const LLScrollListItem *pListItem) const { LLPathfindingObjectPtr objectPtr; diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h index f9c099e1a2..fc096a7c31 100644 --- a/indra/newview/llfloaterpathfindingobjects.h +++ b/indra/newview/llfloaterpathfindingobjects.h @@ -29,6 +29,7 @@ #include <boost/signals2.hpp> +#include "llagent.h" #include "llfloater.h" #include "llpathfindingmanager.h" #include "llpathfindingobject.h" @@ -78,7 +79,6 @@ protected: virtual LLSD convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr) const; virtual void updateControls(); - virtual void updateSelection(); virtual S32 getNameColumnIndex() const; virtual const LLColor4 &getBeaconColor() const; @@ -118,12 +118,14 @@ private: void onTeleportClicked(); void onScrollListSelectionChanged(); - void onSelectionListChanged(); + void onInWorldSelectionListChanged(); void onRegionBoundaryCrossed(); + void onGodLevelChange(U8 pGodLevel); void updateMessagingStatus(); void updateStateOnListActionControls(); void updateStateOnEditFields(); + void updateOnScrollListChange(); LLPathfindingObjectPtr findObject(const LLScrollListItem *pListItem) const; @@ -154,6 +156,7 @@ private: boost::signals2::connection mSelectionUpdateSlot; boost::signals2::connection mRegionBoundaryCrossingSlot; + LLAgent::god_level_change_slot_t mGodLevelChangeSlot; public: LLRootHandle<LLFloaterPathfindingObjects> mSelfHandle; |