summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2014-05-20 11:34:24 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2014-05-20 11:34:24 +0300
commit16a5c9346d04f20c536e9034947873f1202eb32e (patch)
tree947beab1a9f2973e31adbe15fd2ad9516ca94ba2 /indra/newview/llviewermenu.cpp
parent1c82f376c2368f8f91627b3a45b2d6900d938ff4 (diff)
MAINT-3064 FIXED Select next session in the list if selected session is nearby chat and it's not the only one.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rwxr-xr-xindra/newview/llviewermenu.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 1daa85176a..aef8bc21ec 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -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"
@@ -5660,6 +5661,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)
@@ -8577,6 +8597,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();