From 39905b927d60e204438705728d2c214cb3f9ef81 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Thu, 2 Jul 2009 00:38:13 +0000 Subject: merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@873 https://svn.aws.productengine.com/secondlife/pe/stable@888 -> viewer-2.0.0-pe-4 --- indra/newview/llgesturemgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llgesturemgr.cpp') diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 0f2951d9df..66ed680984 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -872,7 +872,8 @@ void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step) const BOOL animate = FALSE; - LLBottomTray::getInstance()->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate); + if(gBottomTray) + gBottomTray->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate); gesture->mCurrentStep++; break; -- cgit v1.2.3 From 73a97010e6c8c7874fdc1778ab46e492f77d9394 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Tue, 21 Jul 2009 00:57:23 +0000 Subject: merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0/indra@1059 https://svn.aws.productengine.com/secondlife/pe/stable-1/indra@1070 -> svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3 --- indra/newview/llgesturemgr.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview/llgesturemgr.cpp') diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 66ed680984..8ec9eac196 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -50,7 +50,6 @@ // newview #include "llagent.h" -#include "llchatbar.h" #include "lldelayedgestureerror.h" #include "llinventorymodel.h" #include "llnotify.h" @@ -872,8 +871,7 @@ void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step) const BOOL animate = FALSE; - if(gBottomTray) - gBottomTray->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate); + LLBottomTray::getInstance()->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate); gesture->mCurrentStep++; break; -- cgit v1.2.3 From e97f7728a90dd66014f6b3f0cd5e8d4c71f48691 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Thu, 30 Jul 2009 23:22:41 +0000 Subject: merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0/indra@1170 https://svn.aws.productengine.com/secondlife/pe/stable-1/indra@1187 -> viewer-2.0.0-3 --- indra/newview/llgesturemgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llgesturemgr.cpp') diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 8ec9eac196..eb2c6768f3 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -56,7 +56,7 @@ #include "llviewermessage.h" #include "llvoavatarself.h" #include "llviewerstats.h" -#include "llbottomtray.h" +#include "llnearbychatbar.h" LLGestureManager gGestureManager; @@ -871,7 +871,7 @@ void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step) const BOOL animate = FALSE; - LLBottomTray::getInstance()->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate); + LLNearbyChatBar::getInstance()->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate); gesture->mCurrentStep++; break; -- cgit v1.2.3 From eb853f55c07ae4a3c3f2aa05fbabcf2e4b4dc115 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 4 Aug 2009 01:12:59 +0000 Subject: svn merge -r 128442:129343 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-18 into svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3 --- indra/newview/llgesturemgr.cpp | 57 +++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 14 deletions(-) (limited to 'indra/newview/llgesturemgr.cpp') diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index eb2c6768f3..69498d3099 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -58,8 +58,6 @@ #include "llviewerstats.h" #include "llnearbychatbar.h" -LLGestureManager gGestureManager; - // Longest time, in seconds, to wait for all animations to stop playing const F32 MAX_WAIT_ANIM_SECS = 30.f; @@ -71,7 +69,9 @@ LLGestureManager::LLGestureManager() mPlaying(), mActive(), mLoadingCount(0) -{ } +{ + gInventory.addObserver(this); +} // We own the data for gestures, so clean them up. @@ -85,6 +85,7 @@ LLGestureManager::~LLGestureManager() delete gesture; gesture = NULL; } + gInventory.removeObserver(this); } @@ -442,7 +443,7 @@ void LLGestureManager::replaceGesture(const LLUUID& item_id, LLMultiGesture* new void LLGestureManager::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset_id) { - item_map_t::iterator it = gGestureManager.mActive.find(item_id); + item_map_t::iterator it = LLGestureManager::instance().mActive.find(item_id); if (it == mActive.end()) { llwarns << "replaceGesture for inactive gesture " << item_id << llendl; @@ -451,7 +452,7 @@ void LLGestureManager::replaceGesture(const LLUUID& item_id, const LLUUID& new_a // mActive owns this gesture pointer, so clean up memory. LLMultiGesture* gesture = (*it).second; - gGestureManager.replaceGesture(item_id, gesture, new_asset_id); + LLGestureManager::instance().replaceGesture(item_id, gesture, new_asset_id); } void LLGestureManager::playGesture(LLMultiGesture* gesture) @@ -921,7 +922,7 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, delete info; info = NULL; - gGestureManager.mLoadingCount--; + LLGestureManager::instance().mLoadingCount--; if (0 == status) { @@ -943,22 +944,34 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, { if (deactivate_similar) { - gGestureManager.deactivateSimilarGestures(gesture, item_id); + LLGestureManager::instance().deactivateSimilarGestures(gesture, item_id); // Display deactivation message if this was the last of the bunch. - if (gGestureManager.mLoadingCount == 0 - && gGestureManager.mDeactivateSimilarNames.length() > 0) + if (LLGestureManager::instance().mLoadingCount == 0 + && LLGestureManager::instance().mDeactivateSimilarNames.length() > 0) { // we're done with this set of deactivations LLSD args; - args["NAMES"] = gGestureManager.mDeactivateSimilarNames; + args["NAMES"] = LLGestureManager::instance().mDeactivateSimilarNames; LLNotifications::instance().add("DeactivatedGesturesTrigger", args); } } + LLViewerInventoryItem* item = gInventory.getItem(item_id); + if(item) + { + gesture->mName = item->getName(); + } + else + { + // Watch this item and set gesture name when item exists in inventory + LLGestureManager::instance().watchItem(item_id); + } + LLGestureManager::instance().mActive[item_id] = gesture; + // Everything has been successful. Add to the active list. - gGestureManager.mActive[item_id] = gesture; gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + if (inform_server) { // Inform the database of this change @@ -977,13 +990,13 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, gAgent.sendReliableMessage(); } - gGestureManager.notifyObservers(); + LLGestureManager::instance().notifyObservers(); } else { llwarns << "Unable to load gesture" << llendl; - gGestureManager.mActive.erase(item_id); + LLGestureManager::instance().mActive.erase(item_id); delete gesture; gesture = NULL; @@ -1005,7 +1018,7 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, llwarns << "Problem loading gesture: " << status << llendl; - gGestureManager.mActive.erase(item_id); + LLGestureManager::instance().mActive.erase(item_id); } } @@ -1133,3 +1146,19 @@ void LLGestureManager::getItemIDs(std::vector* ids) ids->push_back(it->first); } } + +void LLGestureManager::done() +{ + for(item_map_t::iterator it = mActive.begin(); it != mActive.end(); ++it) + { + if(it->second->mName.empty()) + { + LLViewerInventoryItem* item = gInventory.getItem(it->first); + if(item) + { + it->second->mName = item->getName(); + } + } + } + notifyObservers(); +} -- cgit v1.2.3