From f11f8b34478f0d408689fe7959f233567001374d Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Mon, 25 Jan 2010 13:42:22 +0000 Subject: EXT-4576: Changed the pre-login help behavior. The F1 help topic now means: if the user is not logged in yet, show the pre-login topic instead of the default fallback topic, otherwise show help for the focused item --- indra/newview/llviewerhelp.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewerhelp.cpp') diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index 5af79b4fd3..7c491ad154 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -65,18 +65,16 @@ void LLViewerHelp::showTopic(const std::string &topic) help_topic = defaultTopic(); } - // f1 help topic means: if user not logged in yet, show the - // pre-login topic, otherwise show help for the focused item + // f1 help topic means: if the user is not logged in yet, show + // the pre-login topic instead of the default fallback topic, + // otherwise show help for the focused item if (help_topic == f1HelpTopic()) { - if (! LLLoginInstance::getInstance()->authSuccess()) + help_topic = getTopicFromFocus(); + if (help_topic == defaultTopic() && ! LLLoginInstance::getInstance()->authSuccess()) { help_topic = preLoginTopic(); } - else - { - help_topic = getTopicFromFocus(); - } } // work out the URL for this topic and display it -- cgit v1.2.3 From 2bb3a24ca115832bdbfc5030f4ab553cab1e2ef8 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 26 Jan 2010 10:40:17 +0000 Subject: 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 --- indra/newview/llviewerhelp.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'indra/newview/llviewerhelp.cpp') diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index 7c491ad154..b82538dacb 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" +#include "llcommandhandler.h" #include "llfloaterhelpbrowser.h" #include "llfloaterreg.h" #include "llfocusmgr.h" @@ -43,6 +44,33 @@ #include "llviewerhelputil.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 -- cgit v1.2.3