From 2c2409d1a2b7e00a64862002dbf2211e66456372 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 23 Feb 2015 20:04:18 +0100 Subject: [PATCH] Clean up FSFloaterVoiceControls from unused LLTransientDockableFloater stuff that doesn't make much sense for this floater --- indra/newview/app_settings/commands.xml | 5 ++-- indra/newview/fsfloatervoicecontrols.cpp | 4 +--- indra/newview/fsfloatervoicecontrols.h | 7 ++---- indra/newview/lltoolbarview.cpp | 24 +++++++++++-------- .../xui/en/floater_fs_voice_controls.xml | 1 - 5 files changed, 19 insertions(+), 22 deletions(-) diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 39f8f65317..7d3dfc79d6 100755 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -279,7 +279,8 @@ is_running_function="Floater.IsOpen" is_running_parameters="camera" /> - + + - - addControlView(this); // update the agent's name if display name setting change LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&FSFloaterVoiceControls::updateAgentModeratorState, this)); @@ -142,7 +141,6 @@ FSFloaterVoiceControls::~FSFloaterVoiceControls() { LLVoiceClient::getInstance()->removeObserver(this); } - LLTransientFloaterMgr::getInstance()->removeControlView(this); } // virtual diff --git a/indra/newview/fsfloatervoicecontrols.h b/indra/newview/fsfloatervoicecontrols.h index 31843b181f..e1d76e98a7 100644 --- a/indra/newview/fsfloatervoicecontrols.h +++ b/indra/newview/fsfloatervoicecontrols.h @@ -30,7 +30,7 @@ #ifndef FS_FLOATERVOICECONTROLS_H #define FS_FLOATERVOICECONTROLS_H -#include "lltransientdockablefloater.h" +#include "llfloater.h" #include "llvoicechannel.h" #include "llvoiceclient.h" @@ -55,7 +55,7 @@ class LLSliderCtrl; * When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel * also provides a 'Leave Call' button to allow the Resident to leave that voice channel. */ -class FSFloaterVoiceControls : public LLTransientDockableFloater, LLVoiceClientParticipantObserver +class FSFloaterVoiceControls : public LLFloater, LLVoiceClientParticipantObserver { public: @@ -291,9 +291,6 @@ private: */ static LLVoiceChannel* sCurrentVoiceChannel; - /* virtual */ - LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; } - boost::signals2::connection mVoiceChannelStateChangeConnection; }; diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index fed00e1569..fec145af70 100755 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -539,12 +539,14 @@ void LLToolBarView::onToolBarButtonAdded(LLView* button) } } } - else if (button->getName() == "voice") - { - // Add the "Voice controls" button as a control view in LLTransientFloaterMgr - // to prevent hiding the transient IM floater upon pressing "Voice controls". - LLTransientFloaterMgr::getInstance()->addControlView(button); - } + // Nearby Voices isn't a TransientDockableFloater and the button doesn't exist in V3 anymore + //else if (button->getName() == "voice") + //{ + // // Add the "Voice controls" button as a control view in LLTransientFloaterMgr + // // to prevent hiding the transient IM floater upon pressing "Voice controls". + // LLTransientFloaterMgr::getInstance()->addControlView(button); + //} + // // Dockable QuickPrefs floater else if (button->getName() == "quickprefs" && !FSCommon::isLegacySkin()) { @@ -589,10 +591,12 @@ void LLToolBarView::onToolBarButtonRemoved(LLView* button) dock_control->setDock(NULL); } } - else if (button->getName() == "voice") - { - LLTransientFloaterMgr::getInstance()->removeControlView(button); - } + // Nearby Voices isn't a TransientDockableFloater and the button doesn't exist in V3 anymore + //else if (button->getName() == "voice") + //{ + // LLTransientFloaterMgr::getInstance()->removeControlView(button); + //} + // // Dockable QuickPrefs floater else if (button->getName() == "quickprefs" && !FSCommon::isLegacySkin()) { diff --git a/indra/newview/skins/default/xui/en/floater_fs_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_fs_voice_controls.xml index 6a50d5fce8..c9889975dc 100644 --- a/indra/newview/skins/default/xui/en/floater_fs_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_fs_voice_controls.xml @@ -12,7 +12,6 @@ name="floater_voice_controls" help_topic="floater_voice_controls" title="Voice Controls" - save_dock_state="true" save_visibility="true" save_rect="true" single_instance="true"