diff options
| author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-12 19:29:05 +0200 |
|---|---|---|
| committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-12 19:29:05 +0200 |
| commit | d149b28173c2b255bd1bf1db902368dfbdf3064a (patch) | |
| tree | d433c57f07aad0959519f8b88ccd1ed8447af7bf /indra/newview/llviewerhelp.cpp | |
| parent | 38115eb90b1760025ee299a167f6a9a2311f59ab (diff) | |
| parent | 3b7ed8a4e9fdff83f89b49760d281ee5c13c8155 (diff) | |
Merge
--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 |
