aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerinventory.cpp35
1 files changed, 25 insertions, 10 deletions
diff --git a/linden/indra/newview/llviewerinventory.cpp b/linden/indra/newview/llviewerinventory.cpp
index 3e8938b..add9f27 100644
--- a/linden/indra/newview/llviewerinventory.cpp
+++ b/linden/indra/newview/llviewerinventory.cpp
@@ -12,12 +12,12 @@
12 * ("GPL"), unless you have obtained a separate licensing agreement 12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of 13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or 14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlife.com/developers/opensource/gplv2 15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 * 16 *
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlife.com/developers/opensource/flossexception 20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 21 *
22 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
@@ -47,7 +47,7 @@
47 47
48#include "llviewerregion.h" 48#include "llviewerregion.h"
49#include "llviewerobjectlist.h" 49#include "llviewerobjectlist.h"
50 50#include "llpreviewgesture.h"
51///---------------------------------------------------------------------------- 51///----------------------------------------------------------------------------
52/// Local function declarations, constants, enums, and typedefs 52/// Local function declarations, constants, enums, and typedefs
53///---------------------------------------------------------------------------- 53///----------------------------------------------------------------------------
@@ -104,14 +104,9 @@ LLViewerInventoryItem::LLViewerInventoryItem(const LLViewerInventoryItem* other)
104} 104}
105 105
106LLViewerInventoryItem::LLViewerInventoryItem(const LLInventoryItem *other) : 106LLViewerInventoryItem::LLViewerInventoryItem(const LLInventoryItem *other) :
107 LLInventoryItem(other) 107 LLInventoryItem(other),
108 mIsComplete(TRUE)
108{ 109{
109 LLInventoryItem::copy(other);
110 if (!mIsComplete)
111 {
112 llwarns << "LLViewerInventoryItem copy constructor for incomplete item"
113 << mUUID << llendl;
114 }
115} 110}
116 111
117 112
@@ -648,6 +643,26 @@ void ActivateGestureCallback::fire(const LLUUID& inv_item)
648 gGestureManager.activateGesture(inv_item); 643 gGestureManager.activateGesture(inv_item);
649} 644}
650 645
646void CreateGestureCallback::fire(const LLUUID& inv_item)
647{
648 if (inv_item.isNull())
649 return;
650
651 gGestureManager.activateGesture(inv_item);
652
653 LLViewerInventoryItem* item = gInventory.getItem(inv_item);
654 if (!item) return;
655 gInventory.updateItem(item);
656 gInventory.notifyObservers();
657
658 if(!LLPreview::show(inv_item,FALSE))
659 {
660 LLPreviewGesture* preview = LLPreviewGesture::show(LLString("Gesture: ") + item->getName(), inv_item, LLUUID::null);
661 // Force to be entirely onscreen.
662 gFloaterView->adjustToFitScreen(preview, FALSE);
663 }
664}
665
651LLInventoryCallbackManager gInventoryCallbacks; 666LLInventoryCallbackManager gInventoryCallbacks;
652 667
653void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, 668void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,