summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerhelp.cpp
diff options
context:
space:
mode:
authorLogan Dethrow <log@lindenlab.com>2011-10-19 13:04:54 -0400
committerLogan Dethrow <log@lindenlab.com>2011-10-19 13:04:54 -0400
commit77876a3c4f18b480f9afd17be57b123d2e5f1e84 (patch)
tree04b31f26cceef5cc411b166d30eb694707d995aa /indra/newview/llviewerhelp.cpp
parente0f6e449594c44511d9634ea54faf54f8fe5cb7c (diff)
parentdd61baa3401a09bd8ff1e894514c15390946cdb3 (diff)
Merged with viewer-development.
Diffstat (limited to 'indra/newview/llviewerhelp.cpp')
-rw-r--r--indra/newview/llviewerhelp.cpp38
1 files changed, 8 insertions, 30 deletions
diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp
index 3a3d4f3881..a8a918f259 100644
--- a/indra/newview/llviewerhelp.cpp
+++ b/indra/newview/llviewerhelp.cpp
@@ -69,15 +69,12 @@ LLHelpHandler gHelpHandler;
//////////////////////////////
// implement LLHelp interface
-void LLViewerHelp::showTopic(const std::string &topic)
+std::string LLViewerHelp::getURL(const std::string &topic)
{
// allow overriding the help server with a local help file
if( gSavedSettings.getBOOL("HelpUseLocal") )
{
- showHelp();
- LLFloaterHelpBrowser* helpbrowser = dynamic_cast<LLFloaterHelpBrowser*>(LLFloaterReg::getInstance("help_browser"));
- helpbrowser->navigateToLocalPage( "help-offline" , "index.html" );
- return;
+ return "__local";
}
// if the help topic is empty, use the default topic
@@ -99,11 +96,12 @@ void LLViewerHelp::showTopic(const std::string &topic)
}
}
- // work out the URL for this topic and display it
- showHelp();
-
- std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic );
- setRawURL(helpURL);
+ return LLViewerHelpUtil::buildHelpURL( help_topic );
+}
+
+void LLViewerHelp::showTopic(const std::string& topic)
+{
+ LLFloaterReg::showInstance("help_browser", topic);
}
std::string LLViewerHelp::defaultTopic()
@@ -146,23 +144,3 @@ std::string LLViewerHelp::getTopicFromFocus()
return defaultTopic();
}
-// static
-void LLViewerHelp::showHelp()
-{
- LLFloaterReg::showInstance("help_browser");
-}
-
-// static
-void LLViewerHelp::setRawURL(std::string url)
-{
- LLFloaterHelpBrowser* helpbrowser = dynamic_cast<LLFloaterHelpBrowser*>(LLFloaterReg::getInstance("help_browser"));
- if (helpbrowser)
- {
- helpbrowser->openMedia(url);
- }
- else
- {
- llwarns << "Eep, help_browser floater not found" << llendl;
- }
-}
-