diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 75 |
1 files changed, 40 insertions, 35 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index bd46ee1b67..d958551a0a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -856,40 +856,36 @@ void toggle_destination_and_avatar_picker(const LLSD& show) LLButton* avatar_btn = gViewerWindow->getRootView()->getChildView("bottom_tray")->getChild<LLButton>("avatar_btn"); LLButton* destination_btn = gViewerWindow->getRootView()->getChildView("bottom_tray")->getChild<LLButton>("destination_btn"); - switch(panel_idx) - { - case 0: - if (!destinations->getVisible()) - { - container->setVisible(true); - destinations->setVisible(true); - avatar_picker->setVisible(false); - LLFirstUse::notUsingDestinationGuide(false); - avatar_btn->setToggleState(false); - destination_btn->setToggleState(true); - return; - } - break; - case 1: - if (!avatar_picker->getVisible()) - { - container->setVisible(true); - destinations->setVisible(false); - avatar_picker->setVisible(true); - avatar_btn->setToggleState(true); - destination_btn->setToggleState(false); - return; - } - break; - default: - break; + if (panel_idx == 0 + && !destinations->getVisible()) + { // opening destinations guide + container->setVisible(true); + destinations->setVisible(true); + avatar_picker->setVisible(false); + LLFirstUse::notUsingDestinationGuide(false); + avatar_btn->setToggleState(false); + destination_btn->setToggleState(true); + gSavedSettings.setS32("DestinationsAndAvatarsVisibility", 0); + } + else if (panel_idx == 1 + && !avatar_picker->getVisible()) + { // opening avatar picker + container->setVisible(true); + destinations->setVisible(false); + avatar_picker->setVisible(true); + avatar_btn->setToggleState(true); + destination_btn->setToggleState(false); + gSavedSettings.setS32("DestinationsAndAvatarsVisibility", 1); + } + else + { // toggling off dest guide or avatar picker + container->setVisible(false); + destinations->setVisible(false); + avatar_picker->setVisible(false); + avatar_btn->setToggleState(false); + destination_btn->setToggleState(false); + gSavedSettings.setS32("DestinationsAndAvatarsVisibility", -1); } - - container->setVisible(false); - destinations->setVisible(false); - avatar_picker->setVisible(false); - avatar_btn->setToggleState(false); - destination_btn->setToggleState(false); }; @@ -5595,6 +5591,14 @@ class LLToggleHelp : public view_listener_t } }; +class LLToggleSpeak : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLVoiceClient::getInstance()->toggleUserPTTState(); + return true; + } +}; class LLShowSidetrayPanel : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -6416,12 +6420,12 @@ class LLToolsSelectedScriptAction : public view_listener_t else if (action == "start") { name = "start_queue"; - msg = "Running"; + msg = "SetRunning"; } else if (action == "stop") { name = "stop_queue"; - msg = "RunningNot"; + msg = "SetRunningNot"; } LLUUID id; id.generate(); @@ -8191,6 +8195,7 @@ void initialize_menus() 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 LLToggleSpeak(), "ToggleSpeak"); view_listener_t::addMenu(new LLPromptShowURL(), "PromptShowURL"); view_listener_t::addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); view_listener_t::addMenu(new LLToggleAgentProfile(), "ToggleAgentProfile"); |