Open help pages in external browser based on user's preferences.

meow-7.2.2
Beq 2022-11-02 17:39:10 +00:00
parent 498d8e92de
commit c4fef9edd0
1 changed files with 9 additions and 0 deletions

View File

@ -37,6 +37,7 @@
#include "llviewerhelputil.h"
#include "llviewerhelp.h"
#include "llweb.h" // <FS:Beq/> Support for opening help in external browser
// support for secondlife:///app/help/{TOPIC} SLapps
class LLHelpHandler : public LLCommandHandler
@ -95,6 +96,14 @@ std::string LLViewerHelp::getURL(const std::string &topic)
void LLViewerHelp::showTopic(const std::string& topic)
{
// <FS:Beq> allow external browser for help topics
auto url = getURL(topic);
if ( LLWeb::useExternalBrowser(url) )
{
LLWeb::loadURLExternal(url);
}
else
// </FS:Beq>
LLFloaterReg::showInstance("help_browser", topic);
}