Clean up FSFloaterVoiceControls from unused LLTransientDockableFloater stuff that doesn't make much sense for this floater

Ansariel 2015-02-23 20:04:18 +01:00
parent aeb0faec5b
commit 2c2409d1a2
5 changed files with 19 additions and 22 deletions

View File

@ -279,7 +279,8 @@
is_running_function="Floater.IsOpen" is_running_function="Floater.IsOpen"
is_running_parameters="camera" is_running_parameters="camera"
/> />
<!-- DO NOT DELETE IN CHUI MERGE!!! -->
<!-- Firestorm command buttons -->
<command name="voice" <command name="voice"
available_in_toybox="true" available_in_toybox="true"
icon="Command_Voice_Icon" icon="Command_Voice_Icon"
@ -290,8 +291,6 @@
is_running_function="Floater.IsOpen" is_running_function="Floater.IsOpen"
is_running_parameters="fs_voice_controls" is_running_parameters="fs_voice_controls"
/> />
<!-- Firestorm command buttons -->
<command name="quickprefs" <command name="quickprefs"
available_in_toybox="true" available_in_toybox="true"
icon="phoenix_18" icon="phoenix_18"

View File

@ -101,7 +101,7 @@ static void* create_non_avatar_caller(void*)
LLVoiceChannel* FSFloaterVoiceControls::sCurrentVoiceChannel = NULL; LLVoiceChannel* FSFloaterVoiceControls::sCurrentVoiceChannel = NULL;
FSFloaterVoiceControls::FSFloaterVoiceControls(const LLSD& key) FSFloaterVoiceControls::FSFloaterVoiceControls(const LLSD& key)
: LLTransientDockableFloater(NULL, false, key) : LLFloater(key)
, mSpeakerManager(NULL) , mSpeakerManager(NULL)
, mParticipants(NULL) , mParticipants(NULL)
, mAvatarList(NULL) , mAvatarList(NULL)
@ -119,7 +119,6 @@ FSFloaterVoiceControls::FSFloaterVoiceControls(const LLSD& key)
mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL);
LLVoiceClient::instance().addObserver(this); LLVoiceClient::instance().addObserver(this);
LLTransientFloaterMgr::getInstance()->addControlView(this);
// update the agent's name if display name setting change // update the agent's name if display name setting change
LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&FSFloaterVoiceControls::updateAgentModeratorState, this)); LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&FSFloaterVoiceControls::updateAgentModeratorState, this));
@ -142,7 +141,6 @@ FSFloaterVoiceControls::~FSFloaterVoiceControls()
{ {
LLVoiceClient::getInstance()->removeObserver(this); LLVoiceClient::getInstance()->removeObserver(this);
} }
LLTransientFloaterMgr::getInstance()->removeControlView(this);
} }
// virtual // virtual

View File

@ -30,7 +30,7 @@
#ifndef FS_FLOATERVOICECONTROLS_H #ifndef FS_FLOATERVOICECONTROLS_H
#define FS_FLOATERVOICECONTROLS_H #define FS_FLOATERVOICECONTROLS_H
#include "lltransientdockablefloater.h" #include "llfloater.h"
#include "llvoicechannel.h" #include "llvoicechannel.h"
#include "llvoiceclient.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 * 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. * 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: public:
@ -291,9 +291,6 @@ private:
*/ */
static LLVoiceChannel* sCurrentVoiceChannel; static LLVoiceChannel* sCurrentVoiceChannel;
/* virtual */
LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; }
boost::signals2::connection mVoiceChannelStateChangeConnection; boost::signals2::connection mVoiceChannelStateChangeConnection;
}; };

View File

@ -539,12 +539,14 @@ void LLToolBarView::onToolBarButtonAdded(LLView* button)
} }
} }
} }
else if (button->getName() == "voice") // <FS:Ansariel> 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". // // Add the "Voice controls" button as a control view in LLTransientFloaterMgr
LLTransientFloaterMgr::getInstance()->addControlView(button); // // to prevent hiding the transient IM floater upon pressing "Voice controls".
} // LLTransientFloaterMgr::getInstance()->addControlView(button);
//}
// </FS:Ansariel>
// <FS:Ansariel> Dockable QuickPrefs floater // <FS:Ansariel> Dockable QuickPrefs floater
else if (button->getName() == "quickprefs" && !FSCommon::isLegacySkin()) else if (button->getName() == "quickprefs" && !FSCommon::isLegacySkin())
{ {
@ -589,10 +591,12 @@ void LLToolBarView::onToolBarButtonRemoved(LLView* button)
dock_control->setDock(NULL); dock_control->setDock(NULL);
} }
} }
else if (button->getName() == "voice") // <FS:Ansariel> Nearby Voices isn't a TransientDockableFloater and the button doesn't exist in V3 anymore
{ //else if (button->getName() == "voice")
LLTransientFloaterMgr::getInstance()->removeControlView(button); //{
} // LLTransientFloaterMgr::getInstance()->removeControlView(button);
//}
// </FS:Ansariel>
// <FS:Ansariel> Dockable QuickPrefs floater // <FS:Ansariel> Dockable QuickPrefs floater
else if (button->getName() == "quickprefs" && !FSCommon::isLegacySkin()) else if (button->getName() == "quickprefs" && !FSCommon::isLegacySkin())
{ {

View File

@ -12,7 +12,6 @@
name="floater_voice_controls" name="floater_voice_controls"
help_topic="floater_voice_controls" help_topic="floater_voice_controls"
title="Voice Controls" title="Voice Controls"
save_dock_state="true"
save_visibility="true" save_visibility="true"
save_rect="true" save_rect="true"
single_instance="true" single_instance="true"