diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-11-05 10:52:23 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-11-05 10:52:23 -0500 |
commit | 13b4909a3ca066105695afc174642409daa46df2 (patch) | |
tree | f12b1c2d32fda122bcd1f6f79ebfe2226325d9a8 /indra/newview/llviewermenu.cpp | |
parent | 52ed6ac28697ffcfd7300602aec34db8eafc171a (diff) | |
parent | 02e2235277a90f2e291557a429ae4e5de3e0d3b6 (diff) |
merge
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rwxr-xr-x | indra/newview/llviewermenu.cpp | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 885c85d6c5..01a36597e6 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2002&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2014, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -64,6 +64,7 @@ #include "llfloaterinventory.h" #include "llfloaterimcontainer.h" #include "llfloaterland.h" +#include "llfloaterimnearbychat.h" #include "llfloaterpathfindingcharacters.h" #include "llfloaterpathfindinglinksets.h" #include "llfloaterpay.h" @@ -92,6 +93,7 @@ #include "llparcel.h" #include "llrootview.h" #include "llsceneview.h" +#include "llscenemonitor.h" #include "llselectmgr.h" #include "llspellcheckmenuhandler.h" #include "llstatusbar.h" @@ -533,6 +535,10 @@ class LLAdvancedToggleConsole : public view_listener_t { toggle_visibility( (void*)gSceneView); } + else if ("scene monitor" == console_type) + { + toggle_visibility( (void*)gSceneMonitorView); + } return true; } @@ -559,6 +565,10 @@ class LLAdvancedCheckConsole : public view_listener_t { new_value = get_visibility( (void*) gSceneView); } + else if ("scene monitor" == console_type) + { + new_value = get_visibility( (void*) gSceneMonitorView); + } return new_value; } @@ -5668,6 +5678,25 @@ void toggle_debug_menus(void*) // gExportDialog = LLUploadDialog::modalUploadDialog("Exporting selected objects..."); // } // + +class LLCommunicateNearbyChat : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLFloaterIMContainer* im_box = LLFloaterIMContainer::getInstance(); + bool nearby_visible = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")->isInVisibleChain(); + if(nearby_visible && im_box->getSelectedSession() == LLUUID() && im_box->getConversationListItemSize() > 1) + { + im_box->selectNextorPreviousConversation(false); + } + else + { + LLFloaterReg::toggleInstanceOrBringToFront("nearby_chat"); + } + return true; + } +}; + class LLWorldSetHomeLocation : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -6189,7 +6218,7 @@ class LLPromptShowURL : public view_listener_t std::string alert = param.substr(0, offset); std::string url = param.substr(offset+1); - if(gSavedSettings.getBOOL("UseExternalBrowser")) + if (LLWeb::useExternalBrowser(url)) { LLSD payload; payload["url"] = url; @@ -7809,7 +7838,7 @@ void handle_web_content_test(const LLSD& param) void handle_show_url(const LLSD& param) { std::string url = param.asString(); - if(gSavedSettings.getBOOL("UseExternalBrowser")) + if (LLWeb::useExternalBrowser(url)) { LLWeb::loadURLExternal(url); } @@ -8246,9 +8275,9 @@ class LLWorldEnableEnvSettings : public view_listener_t bool result = false; std::string tod = userdata.asString(); - if (tod == "region") + if (LLEnvManagerNew::instance().getUseRegionSettings()) { - return LLEnvManagerNew::instance().getUseRegionSettings(); + return (tod == "region"); } if (LLEnvManagerNew::instance().getUseFixedSky()) @@ -8271,7 +8300,7 @@ class LLWorldEnableEnvSettings : public view_listener_t } else { - llwarns << "Unknown item" << llendl; + LL_WARNS() << "Unknown time-of-day item: " << tod << LL_ENDL; } } return result; @@ -8593,6 +8622,9 @@ void initialize_menus() // Me > Movement view_listener_t::addMenu(new LLAdvancedAgentFlyingInfo(), "Agent.getFlying"); + //Communicate Nearby chat + view_listener_t::addMenu(new LLCommunicateNearbyChat(), "Communicate.NearbyChat"); + // Communicate > Voice morphing > Subscribe... commit.add("Communicate.VoiceMorphing.Subscribe", boost::bind(&handle_voice_morphing_subscribe)); LLVivoxVoiceClient * voice_clientp = LLVivoxVoiceClient::getInstance(); |