diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 7d673f536d..431b4d3c0a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2310,12 +2310,6 @@ class LLObjectEnableReportAbuse : public view_listener_t bool handleEvent(const LLSD& userdata) { bool new_value = LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 0; -/* // all the faces needs to be selected - if(LLSelectMgr::getInstance()->getSelection()->contains(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(),SELECT_ALL_TES )) - { - new_value = true; - } - */ return new_value; } }; @@ -2704,7 +2698,6 @@ BOOL enable_has_attachments(void*) bool enable_object_mute() { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - bool new_value = (object != NULL); if (new_value) { @@ -2717,19 +2710,6 @@ bool enable_object_mute() BOOL is_self = avatar->isSelf(); new_value = !is_linden && !is_self; } - else - { - if( LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) - { - new_value = true; - } - else - { - new_value = false; - } - - } - } return new_value; } @@ -5542,11 +5522,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. @@ -5583,6 +5558,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) @@ -7946,6 +7941,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"); |