diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-11 17:47:20 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-11 17:47:20 +0200 |
commit | 6146cfc5c1c14f106b54b7394db6286d9b7bb67a (patch) | |
tree | f29e14c852a36d1b97defd0f126068deec8ed3b6 /indra/newview/llviewerhelp.cpp | |
parent | 61fdd33f7916dbf13c5c56e2d4c0ccb14fdae150 (diff) | |
parent | 062d0a13db505636b186084d42c527a49637f380 (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llviewerhelp.cpp')
-rw-r--r-- | indra/newview/llviewerhelp.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index 0e0727e382..056260791c 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -39,6 +39,7 @@ #include "llviewercontrol.h" #include "llversionviewer.h" #include "llappviewer.h" +#include "lllogininstance.h" #include "llviewerhelputil.h" #include "llviewerhelp.h" @@ -51,17 +52,25 @@ void LLViewerHelp::showTopic(const std::string &topic) { showHelp(); + // allow overriding the help server with a local help file if( gSavedSettings.getBOOL("HelpUseLocal") ) { LLFloaterHelpBrowser* helpbrowser = dynamic_cast<LLFloaterHelpBrowser*>(LLFloaterReg::getInstance("help_browser")); helpbrowser->navigateToLocalPage( "help-offline" , "index.html" ); + return; } - else + + // use a special login topic before the user logs in + std::string help_topic = topic; + if (! LLLoginInstance::getInstance()->authSuccess()) { - const LLOSInfo& osinfo = LLAppViewer::instance()->getOSInfo(); - std::string helpURL = LLViewerHelpUtil::buildHelpURL( topic, gSavedSettings, osinfo ); - setRawURL( helpURL ); + help_topic = preLoginTopic(); } + + // work out the URL for this topic and display it + const LLOSInfo& osinfo = LLAppViewer::instance()->getOSInfo(); + std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic, gSavedSettings, osinfo ); + setRawURL( helpURL ); } std::string LLViewerHelp::defaultTopic() @@ -70,6 +79,12 @@ std::string LLViewerHelp::defaultTopic() return "this_is_fallbacktopic"; } +std::string LLViewerHelp::preLoginTopic() +{ + // *hack: to be done properly + return "pre_login_help"; +} + ////////////////////////////// // our own interfaces |