summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewgesture.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-03-14 23:03:50 +0000
committerJosh Bell <josh@lindenlab.com>2007-03-14 23:03:50 +0000
commit00dbacb215da8d6b6739b4bcefebee552de89a9c (patch)
treee1256e1fa3b195a1128bb152a876729c7f9a163d /indra/newview/llpreviewgesture.cpp
parentcf405184285c25723249d5a023b28d9498cf0c3f (diff)
svn merge svn+ssh://svn.lindenlab.com/svn/linden/release@59161 svn+ssh://svn.lindenlab.com/svn/linden/branches/release-candidate@59163 --> release
Diffstat (limited to 'indra/newview/llpreviewgesture.cpp')
-rw-r--r--indra/newview/llpreviewgesture.cpp34
1 files changed, 27 insertions, 7 deletions
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 938976241b..862dbcf377 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -22,6 +22,7 @@
// newview
#include "llagent.h" // todo: remove
+#include "llassetuploadresponders.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
@@ -38,6 +39,7 @@
#include "llviewerinventory.h"
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
+#include "llviewerregion.h"
#include "llviewerstats.h"
#include "llviewerwindow.h" // busycount
#include "viewer.h" // gVFS
@@ -1101,13 +1103,31 @@ void LLPreviewGesture::saveIfNeeded()
LLInventoryItem* item = getItem();
if (item)
{
- LLLineEditor* descEditor = LLUICtrlFactory::getLineEditorByName(this, "desc");
- LLSaveInfo* info = new LLSaveInfo(mItemUUID, mObjectUUID, descEditor->getText(), tid);
-
- const BOOL temp_file = FALSE;
-
- gAssetStorage->storeAssetData(tid, LLAssetType::AT_GESTURE, onSaveComplete, info, temp_file);
-
+ std::string agent_url = gAgent.getRegion()->getCapability("UpdateGestureAgentInventory");
+ std::string task_url = gAgent.getRegion()->getCapability("UpdateGestureTaskInventory");
+ if (mObjectUUID.isNull() && !agent_url.empty())
+ {
+ // Saving into agent inventory
+ LLSD body;
+ body["item_id"] = mItemUUID;
+ LLHTTPClient::post(agent_url, body,
+ new LLUpdateAgentInventoryResponder(body, asset_id, LLAssetType::AT_GESTURE));
+ }
+ else if (!mObjectUUID.isNull() && !task_url.empty())
+ {
+ // Saving into task inventory
+ LLSD body;
+ body["task_id"] = mObjectUUID;
+ body["item_id"] = mItemUUID;
+ LLHTTPClient::post(task_url, body,
+ new LLUpdateTaskInventoryResponder(body, asset_id, LLAssetType::AT_GESTURE));
+ }
+ else if (gAssetStorage)
+ {
+ LLLineEditor* descEditor = LLUICtrlFactory::getLineEditorByName(this, "desc");
+ LLSaveInfo* info = new LLSaveInfo(mItemUUID, mObjectUUID, descEditor->getText(), tid);
+ gAssetStorage->storeAssetData(tid, LLAssetType::AT_GESTURE, onSaveComplete, info, FALSE);
+ }
}
// If this gesture is active, then we need to update the in-memory