From 0e351bedb6ec15ecb4da6073c8db4edc34ccc0ba Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 24 Nov 2009 22:55:56 -0800 Subject: Removed llnotifications.h from all headers by adding llnotificationsptr.h Fixed many more includes --- indra/newview/llgesturemgr.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llgesturemgr.cpp') diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index d85ac477e1..443a59832f 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -42,6 +42,7 @@ #include "lldatapacker.h" #include "llinventory.h" #include "llmultigesture.h" +#include "llnotifications.h" #include "llstl.h" #include "llstring.h" // todo: remove #include "llvfile.h" -- cgit v1.2.3 From cbc0783cd19f096b454cabe47174c97d3d42842b Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 25 Nov 2009 01:15:50 -0800 Subject: Created lightweight LLNotificationsUtil::add(), switched most alerts to use it Cuts number of includes of llnotifications.h from 300+ to 40. --- 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 443a59832f..77a2cbcfca 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -42,7 +42,7 @@ #include "lldatapacker.h" #include "llinventory.h" #include "llmultigesture.h" -#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llstl.h" #include "llstring.h" // todo: remove #include "llvfile.h" @@ -972,7 +972,7 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, // we're done with this set of deactivations LLSD args; args["NAMES"] = self.mDeactivateSimilarNames; - LLNotifications::instance().add("DeactivatedGesturesTrigger", args); + LLNotificationsUtil::add("DeactivatedGesturesTrigger", args); } } -- cgit v1.2.3 From 34d3d02101e1838a4d8b875850a12867866a2935 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Fri, 27 Nov 2009 16:07:14 +0200 Subject: fixed bug EXT-2785 All gestures appear in Gestures window only after inventory/gestures has been invoked Cause: Specific implementation of LLInventoryCompletionObserver. It call done() on startup before all items had been loaded. Changes: LLGesturemanager will be loaded appropriated inventory item itself. LLGestureInventoryfetchObserver has been removed. --HG-- branch : product-engine --- indra/newview/llgesturemgr.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/newview/llgesturemgr.cpp') diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 77a2cbcfca..18ff53c127 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -73,6 +73,7 @@ LLGestureManager::LLGestureManager() mActive(), mLoadingCount(0) { + mRetryIfMissing = true; gInventory.addObserver(this); } @@ -984,7 +985,9 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, else { // Watch this item and set gesture name when item exists in inventory - self.watchItem(item_id); + item_ref_t ids; + ids.push_back(item_id); + self.fetchItems(ids); } self.mActive[item_id] = gesture; @@ -1177,6 +1180,7 @@ void LLGestureManager::getItemIDs(std::vector* ids) void LLGestureManager::done() { + bool notify = false; for(item_map_t::iterator it = mActive.begin(); it != mActive.end(); ++it) { if(it->second && it->second->mName.empty()) @@ -1185,10 +1189,14 @@ void LLGestureManager::done() if(item) { it->second->mName = item->getName(); + notify = true; } } } - notifyObservers(); + if(notify) + { + notifyObservers(); + } } // static -- cgit v1.2.3