summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2009-11-10 23:56:30 +0000
committerLynx Linden <lynx@lindenlab.com>2009-11-10 23:56:30 +0000
commit434407efc4e4a862cf7b755cd06f2ef6e78d2b8e (patch)
treecb0ccb8328522c53d091b9ac25762d9ee1894288 /indra/newview
parent02943eca33a2cb5be39025557ca6e7aca30ea93a (diff)
DEV-40001: Add support for a pre-login help topic.
Asking for help (e.g., pressing F1) before logging in will now display a specific pre-login help topic, "pre_login_help". This behavior was agreed upon with Rand to allow us to display a custom page to help the user log on successfully.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerhelp.cpp23
-rw-r--r--indra/newview/llviewerhelp.h3
2 files changed, 22 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
diff --git a/indra/newview/llviewerhelp.h b/indra/newview/llviewerhelp.h
index 17aab6f239..dcb5ae32c9 100644
--- a/indra/newview/llviewerhelp.h
+++ b/indra/newview/llviewerhelp.h
@@ -57,6 +57,9 @@ class LLViewerHelp : public LLHelp, public LLSingleton<LLViewerHelp>
// return topic derived from viewer UI focus, else default topic
std::string getTopicFromFocus();
+ // return topic to use before the user logs in
+ std::string preLoginTopic();
+
private:
static void showHelp(); // make sure help UI is visible & raised
static void setRawURL(std::string url); // send URL to help UI