Skip to content
Snippets Groups Projects
Commit 2bb3a24c authored by Lynx Linden's avatar Lynx Linden
Browse files

EXT-4716: Added new SLapps for Home web content.

secondlife:///app/appearance - to open the My Appearance sidetray
secondlife:///app/help/{TOPIC} - to display help for a given topic

I've updated https://wiki.lindenlab.com/wiki/Viewer_2.0_SLapps
parent fbf605ea
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "llagent.h" #include "llagent.h"
#include "llagentwearables.h" #include "llagentwearables.h"
#include "llappearancemgr.h" #include "llappearancemgr.h"
#include "llcommandhandler.h"
#include "llfloatercustomize.h" #include "llfloatercustomize.h"
#include "llgesturemgr.h" #include "llgesturemgr.h"
#include "llinventorybridge.h" #include "llinventorybridge.h"
...@@ -47,6 +48,23 @@ ...@@ -47,6 +48,23 @@
#include "llviewerregion.h" #include "llviewerregion.h"
#include "llwearablelist.h" #include "llwearablelist.h"
// support for secondlife:///app/appearance SLapps
class LLAppearanceHandler : public LLCommandHandler
{
public:
// requests will be throttled from a non-trusted browser
LLAppearanceHandler() : LLCommandHandler("appearance", UNTRUSTED_THROTTLE) {}
bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
{
// we currently don't support any commands after the "appearance"
// part of the SLapp - we just show the appearance side panel
LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD());
return true;
}
};
LLAppearanceHandler gAppearanceHandler;
class LLWearInventoryCategoryCallback : public LLInventoryCallback class LLWearInventoryCategoryCallback : public LLInventoryCallback
{ {
public: public:
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "llviewerprecompiledheaders.h" #include "llviewerprecompiledheaders.h"
#include "llcommandhandler.h"
#include "llfloaterhelpbrowser.h" #include "llfloaterhelpbrowser.h"
#include "llfloaterreg.h" #include "llfloaterreg.h"
#include "llfocusmgr.h" #include "llfocusmgr.h"
...@@ -43,6 +44,33 @@ ...@@ -43,6 +44,33 @@
#include "llviewerhelputil.h" #include "llviewerhelputil.h"
#include "llviewerhelp.h" #include "llviewerhelp.h"
// support for secondlife:///app/help/{TOPIC} SLapps
class LLHelpHandler : public LLCommandHandler
{
public:
// requests will be throttled from a non-trusted browser
LLHelpHandler() : LLCommandHandler("help", UNTRUSTED_THROTTLE) {}
bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
{
LLViewerHelp* vhelp = LLViewerHelp::getInstance();
if (! vhelp)
{
return false;
}
// get the requested help topic name, or use the fallback if none
std::string help_topic = vhelp->defaultTopic();
if (params.size() >= 1)
{
help_topic = params[0].asString();
}
vhelp->showTopic(help_topic);
return true;
}
};
LLHelpHandler gHelpHandler;
////////////////////////////// //////////////////////////////
// implement LLHelp interface // implement LLHelp interface
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment