diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-12-08 16:20:25 -0500 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-12-08 16:20:25 -0500 |
| commit | 45b24808657dddfb2a605186416409b453f149e7 (patch) | |
| tree | 298c49cfd6fb4f645a3a776a75b9bb64601bf9c3 /indra/newview/llviewermenu.cpp | |
| parent | 7ce49586881fd078ea8bceeab558b4a156b30f63 (diff) | |
| parent | 37848d29d9030e00086c3a499d28237cdf943e1b (diff) | |
merge
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e68594ed6f..bf4d0c78e6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5521,11 +5521,6 @@ class LLShowFloater : public view_listener_t { LLFloaterScriptDebug::show(LLUUID::null); } - else if (floater_name == "help f1") - { - LLViewerHelp* vhelp = LLViewerHelp::getInstance(); - vhelp->showTopic(vhelp->getTopicFromFocus()); - } else if (floater_name == "complaint reporter") { // Prevent menu from appearing in screen shot. @@ -5562,6 +5557,26 @@ class LLFloaterVisible : public view_listener_t } }; +class LLShowHelp : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string help_topic = userdata.asString(); + + LLViewerHelp* vhelp = LLViewerHelp::getInstance(); + if (help_topic.empty()) + { + vhelp->showTopic(vhelp->getTopicFromFocus()); + } + else + { + vhelp->showTopic(help_topic); + } + + return true; + } +}; + class LLShowSidetrayPanel : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -7925,6 +7940,7 @@ void initialize_menus() // Generic actions view_listener_t::addMenu(new LLShowFloater(), "ShowFloater"); + view_listener_t::addMenu(new LLShowHelp(), "ShowHelp"); view_listener_t::addMenu(new LLPromptShowURL(), "PromptShowURL"); view_listener_t::addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); view_listener_t::addMenu(new LLToggleControl(), "ToggleControl"); |
