summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatervoicedevicesettings.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
commit9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch)
tree4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/newview/llfloatervoicedevicesettings.cpp
parent351ebe9fcb76f3b99c2957004bb8493a904869ee (diff)
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/newview/llfloatervoicedevicesettings.cpp')
-rw-r--r--indra/newview/llfloatervoicedevicesettings.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp
index 2922628786..12d12f37f2 100644
--- a/indra/newview/llfloatervoicedevicesettings.cpp
+++ b/indra/newview/llfloatervoicedevicesettings.cpp
@@ -41,7 +41,6 @@
#include "llcombobox.h"
#include "llfocusmgr.h"
#include "lliconctrl.h"
-#include "llprefsvoice.h"
#include "llsliderctrl.h"
#include "llviewercontrol.h"
#include "llvoiceclient.h"
@@ -52,6 +51,7 @@
LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings()
+ : LLPanel()
{
mCtrlInputDevices = NULL;
mCtrlOutputDevices = NULL;
@@ -113,7 +113,7 @@ void LLPanelVoiceDeviceSettings::draw()
{
if (power_bar_idx < discrete_power)
{
- LLColor4 color = (power_bar_idx >= 3) ? gSavedSettings.getColor4("OverdrivenColor") : gSavedSettings.getColor4("SpeakingColor");
+ LLColor4 color = (power_bar_idx >= 3) ? gSavedSkinSettings.getColor4("OverdrivenColor") : gSavedSkinSettings.getColor4("SpeakingColor");
gl_rect_2d(bar_view->getRect(), color, TRUE);
}
gl_rect_2d(bar_view->getRect(), LLColor4::grey, FALSE);
@@ -240,7 +240,7 @@ void LLPanelVoiceDeviceSettings::refresh()
}
}
-void LLPanelVoiceDeviceSettings::onOpen()
+void LLPanelVoiceDeviceSettings::initialize()
{
mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
@@ -255,7 +255,7 @@ void LLPanelVoiceDeviceSettings::onOpen()
LLVoiceChannel::suspend();
}
-void LLPanelVoiceDeviceSettings::onClose(bool app_quitting)
+void LLPanelVoiceDeviceSettings::cleanup()
{
gVoiceClient->tuningStop();
LLVoiceChannel::resume();
@@ -284,31 +284,32 @@ void LLPanelVoiceDeviceSettings::onCommitOutputDevice(LLUICtrl* ctrl, void* user
//
LLFloaterVoiceDeviceSettings::LLFloaterVoiceDeviceSettings(const LLSD& seed)
- : LLFloater(std::string("floater_device_settings")),
+ : LLFloater(),
mDevicePanel(NULL)
{
mFactoryMap["device_settings"] = LLCallbackMap(createPanelVoiceDeviceSettings, this);
// do not automatically open singleton floaters (as result of getInstance())
- BOOL no_open = FALSE;
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_device_settings.xml", &mFactoryMap, no_open);
+// BOOL no_open = FALSE;
+// Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_device_settings.xml", no_open);
+}
+BOOL LLFloaterVoiceDeviceSettings::postBuild()
+{
center();
+ return TRUE;
}
-
-void LLFloaterVoiceDeviceSettings::onOpen()
+void LLFloaterVoiceDeviceSettings::onOpen(const LLSD& key)
{
if(mDevicePanel)
{
- mDevicePanel->onOpen();
+ mDevicePanel->initialize();
}
-
- LLFloater::onOpen();
}
void LLFloaterVoiceDeviceSettings::onClose(bool app_quitting)
{
if(mDevicePanel)
{
- mDevicePanel->onClose(app_quitting);
+ mDevicePanel->cleanup();
}
setVisible(FALSE);