diff options
author | Richard Linden <none@none> | 2011-03-07 06:43:13 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2011-03-07 06:43:13 -0800 |
commit | f28d3a13d34937285f9d920d306896162ae91e4b (patch) | |
tree | c1259d7b1d762fde12b480aaa93074974dc09bb0 /indra/newview/llviewermenu.cpp | |
parent | 61e7c4166ffb6e16c42282d68a29365da5c62c5f (diff) | |
parent | 25ad57c4b6db3793a0bb6fc1901ea6b0e969c17f (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-social/
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 4f7a34e625..38877b7836 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5647,6 +5647,25 @@ class LLShowHelp : public view_listener_t } }; +class LLToggleHelp : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLFloater* help_browser = (LLFloaterReg::findInstance("help_browser")); + if (help_browser && help_browser->isInVisibleChain()) + { + help_browser->closeFloater(); + } + else + { + std::string help_topic = userdata.asString(); + LLViewerHelp* vhelp = LLViewerHelp::getInstance(); + vhelp->showTopic(help_topic); + } + return true; + } +}; + class LLShowSidetrayPanel : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -8224,6 +8243,7 @@ void initialize_menus() commit.add("ReportAbuse", boost::bind(&handle_report_abuse)); commit.add("BuyCurrency", boost::bind(&handle_buy_currency)); view_listener_t::addMenu(new LLShowHelp(), "ShowHelp"); + view_listener_t::addMenu(new LLToggleHelp(), "ToggleHelp"); view_listener_t::addMenu(new LLPromptShowURL(), "PromptShowURL"); view_listener_t::addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); view_listener_t::addMenu(new LLToggleAgentProfile(), "ToggleAgentProfile"); |