From 4d3421fe1b147179af7e71a28421b08a6032e709 Mon Sep 17 00:00:00 2001
From: Lynx Linden <lynx@lindenlab.com>
Date: Mon, 18 Jan 2010 10:16:55 +0000
Subject: EXT-4462: Support secondlife:///app/inventory/show

Opens the user's inventory in the side panel.
---
 indra/newview/llviewerinventory.cpp | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 5605f425e0..8781c46796 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))
 		{
-- 
cgit v1.2.3