MAINT-3064 FIXED Select next session in the list if selected session is nearby chat and it's not the only one.

Mnikolenko ProductEngine 2014-05-20 11:34:24 +03:00
parent 1c82f376c2
commit 16a5c9346d
2 changed files with 30 additions and 5 deletions

View File

@ -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();

View File

@ -259,8 +259,7 @@
function="Floater.Visible"
parameter="nearby_chat" />
<menu_item_check.on_click
function="Floater.ToggleOrBringToFront"
parameter="nearby_chat" />
function="Communicate.NearbyChat"/>
</menu_item_check>
<menu_item_check
label="Speak"
@ -363,13 +362,16 @@
function="SideTray.PanelPeopleTab"
parameter="nearby_panel" />
</menu_item_check>
<menu_item_call
<menu_item_check
label="Block List"
name="Block List">
<menu_item_call.on_click
<menu_item_check.on_check
function="SideTray.CheckPanelPeopleTab"
parameter="blocked_panel" />
<menu_item_check.on_click
function="SideTray.PanelPeopleTab"
parameter="blocked_panel" />
</menu_item_call>
</menu_item_check>
<menu_item_separator/>
<menu_item_check
name="Do Not Disturb"