From 710d2fd0f34484495fa494eefa2ffc1cdb3087e3 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 23 Nov 2011 14:33:05 +0200 Subject: EXP-1581 FIXED Added more floaters to the viewer menu. It is also now possible to toggle microphone via the menu. See JIRA for the full list of changes. --- indra/newview/llagent.cpp | 12 +- indra/newview/llagent.h | 3 +- indra/newview/llviewermenu.cpp | 5 + indra/newview/skins/default/xui/en/menu_viewer.xml | 303 ++++++++++++--------- 4 files changed, 192 insertions(+), 131 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f8b204eca0..2c59a59c0c 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -204,6 +204,12 @@ void LLAgent::releaseMicrophone(const LLSD& name) LLVoiceClient::getInstance()->inputUserControlState(false); } +// static +void LLAgent::toggleMicrophone(const LLSD& name) +{ + LLVoiceClient::getInstance()->toggleUserPTTState(); +} + // static bool LLAgent::isMicrophoneOn(const LLSD& sdname) { @@ -331,12 +337,6 @@ void LLAgent::init() LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLAgent::parcelChangedCallback)); - LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2)); - LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2)); - LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2)); - LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2)); - - mInitialized = TRUE; } diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 0f7ed9ce68..740770bbdf 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -292,7 +292,9 @@ public: static void pressMicrophone(const LLSD& name); static void releaseMicrophone(const LLSD& name); + static void toggleMicrophone(const LLSD& name); static bool isMicrophoneOn(const LLSD& sdname); + static bool isActionAllowed(const LLSD& sdname); private: bool mVoiceConnected; @@ -595,7 +597,6 @@ public: private: bool mCanEditParcel; - static bool isActionAllowed(const LLSD& sdname); static void parcelChangedCallback(); /******************************************************************************** diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 81311b03f5..5056954ffb 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7976,6 +7976,11 @@ void initialize_menus() // Agent commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying)); enable.add("Agent.enableFlying", boost::bind(&LLAgent::enableFlying)); + commit.add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2)); + commit.add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2)); + commit.add("Agent.ToggleMicrophone", boost::bind(&LLAgent::toggleMicrophone, _2)); + enable.add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2)); + enable.add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2)); // File menu init_menu_file(); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 263d961be1..3e779782e8 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -8,14 +8,6 @@ label="Me" name="Me" tear_off="true"> - - - @@ -31,6 +23,14 @@ + + + + - - - - - - - - - + + + + + + + + + + + + + + + + @@ -205,25 +219,6 @@ label="Communicate" name="Communicate" tear_off="true"> - - - - - - - - - @@ -242,16 +237,21 @@ function="Floater.Toggle" parameter="chat_bar" /> - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + - - - - - + - + + + + + + + - - - - - - - - - - - - - - - - - - + + +