On a second thought: Partially revert last commit because this actually makes sense if IMs are shown in separate floaters which are LLTransientDockableFloater and would be closed if the user tries to change the voice volume

Ansariel 2015-02-23 20:22:50 +01:00
parent 2c2409d1a2
commit cb3b9ba6af
3 changed files with 22 additions and 17 deletions

View File

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

View File

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

View File

@ -539,14 +539,14 @@ void LLToolBarView::onToolBarButtonAdded(LLView* button)
}
}
}
// <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".
// LLTransientFloaterMgr::getInstance()->addControlView(button);
//}
// </FS:Ansariel>
// <FS:Ansariel> Do not remove in case they get removed by LL! We need this for standalone
// IM floaters.
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);
}
// <FS:Ansariel> Dockable QuickPrefs floater
else if (button->getName() == "quickprefs" && !FSCommon::isLegacySkin())
{
@ -591,12 +591,12 @@ void LLToolBarView::onToolBarButtonRemoved(LLView* button)
dock_control->setDock(NULL);
}
}
// <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);
//}
// </FS:Ansariel>
// <FS:Ansariel> Do not remove in case they get removed by LL! We need this for standalone
// IM floaters.
else if (button->getName() == "voice")
{
LLTransientFloaterMgr::getInstance()->removeControlView(button);
}
// <FS:Ansariel> Dockable QuickPrefs floater
else if (button->getName() == "quickprefs" && !FSCommon::isLegacySkin())
{