summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 5605f425e0..b330c1ba83 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -44,6 +44,7 @@
#include "llconsole.h"
#include "llinventorymodel.h"
#include "llgesturemgr.h"
+#include "llsidetray.h"
#include "llinventorybridge.h"
#include "llfloaterinventory.h"
@@ -72,7 +73,23 @@ public:
bool handle(const LLSD& params, const LLSD& query_map,
LLMediaCtrl* web)
{
- if (params.size() < 2) return false;
+ if (params.size() < 1)
+ {
+ return false;
+ }
+
+ // support secondlife:///app/inventory/show
+ if (params[0].asString() == "show")
+ {
+ LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD());
+ return true;
+ }
+
+ // otherwise, we need a UUID and a verb...
+ if (params.size() < 2)
+ {
+ return false;
+ }
LLUUID inventory_id;
if (!inventory_id.set(params[0], FALSE))
{
@@ -823,6 +840,13 @@ void CreateGestureCallback::fire(const LLUUID& inv_item)
gFloaterView->adjustToFitScreen(preview, FALSE);
}
+void AddFavoriteLandmarkCallback::fire(const LLUUID& inv_item_id)
+{
+ if (mTargetLandmarkId.isNull()) return;
+
+ gInventory.rearrangeFavoriteLandmarks(inv_item_id, mTargetLandmarkId);
+}
+
LLInventoryCallbackManager gInventoryCallbacks;
void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
@@ -1158,6 +1182,15 @@ const std::string& LLViewerInventoryItem::getDisplayName() const
return mDisplayName = hasSortField ? result : LLInventoryItem::getName();
}
+// static
+std::string LLViewerInventoryItem::getDisplayName(const std::string& name)
+{
+ std::string result;
+ BOOL hasSortField = extractSortFieldAndDisplayName(name, 0, &result);
+
+ return hasSortField ? result : name;
+}
+
S32 LLViewerInventoryItem::getSortField() const
{
S32 result;