diff options
author | Aimee Linden <aimee@lindenlab.com> | 2010-09-17 10:42:44 +0100 |
---|---|---|
committer | Aimee Linden <aimee@lindenlab.com> | 2010-09-17 10:42:44 +0100 |
commit | c5e2348e94f852e2d5ab38ff0f3d142a6285650c (patch) | |
tree | 1c534c817625ac371020b669bfcac86348936e9b | |
parent | ae81cf5dc466c3e10deef4be847076a1da9e7606 (diff) |
STORM-122 FIXED Clean up obsolete floaters and related dead code
A little bit more clean up on LLPanelVoiceDeviceSettings while I'm in there.
-rw-r--r-- | indra/newview/llpanelvoicedevicesettings.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llpanelvoicedevicesettings.h | 12 |
2 files changed, 16 insertions, 17 deletions
diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp index a97fb434ae..aef870d352 100644 --- a/indra/newview/llpanelvoicedevicesettings.cpp +++ b/indra/newview/llpanelvoicedevicesettings.cpp @@ -30,10 +30,7 @@ #include "llpanelvoicedevicesettings.h" // Viewer includes -#include "llbutton.h" #include "llcombobox.h" -#include "llfocusmgr.h" -#include "lliconctrl.h" #include "llsliderctrl.h" #include "llviewercontrol.h" #include "llvoiceclient.h" @@ -70,8 +67,10 @@ BOOL LLPanelVoiceDeviceSettings::postBuild() // set mic volume tuning slider based on last mic volume setting volume_slider->setValue(mMicVolume); - childSetCommitCallback("voice_input_device", onCommitInputDevice, this); - childSetCommitCallback("voice_output_device", onCommitOutputDevice, this); + getChild<LLComboBox>("voice_input_device")->setCommitCallback( + boost::bind(&LLPanelVoiceDeviceSettings::onCommitInputDevice, this)); + getChild<LLComboBox>("voice_output_device")->setCommitCallback( + boost::bind(&LLPanelVoiceDeviceSettings::onCommitOutputDevice, this)); return TRUE; } @@ -303,20 +302,20 @@ void LLPanelVoiceDeviceSettings::cleanup() LLVoiceChannel::resume(); } -// static -void LLPanelVoiceDeviceSettings::onCommitInputDevice(LLUICtrl* ctrl, void* user_data) +void LLPanelVoiceDeviceSettings::onCommitInputDevice() { if(LLVoiceClient::getInstance()) { - LLVoiceClient::getInstance()->setCaptureDevice(ctrl->getValue().asString()); + LLVoiceClient::getInstance()->setCaptureDevice( + getChild<LLComboBox>("voice_input_device")->getValue().asString()); } } -// static -void LLPanelVoiceDeviceSettings::onCommitOutputDevice(LLUICtrl* ctrl, void* user_data) +void LLPanelVoiceDeviceSettings::onCommitOutputDevice() { if(LLVoiceClient::getInstance()) { - LLVoiceClient::getInstance()->setRenderDevice(ctrl->getValue().asString()); + LLVoiceClient::getInstance()->setRenderDevice( + getChild<LLComboBox>("voice_input_device")->getValue().asString()); } } diff --git a/indra/newview/llpanelvoicedevicesettings.h b/indra/newview/llpanelvoicedevicesettings.h index dd630be9a3..636b8b9948 100644 --- a/indra/newview/llpanelvoicedevicesettings.h +++ b/indra/newview/llpanelvoicedevicesettings.h @@ -25,10 +25,10 @@ * $/LicenseInfo$ */ -#ifndef LL_LLFLOATERVOICEDEVICESETTINGS_H -#define LL_LLFLOATERVOICEDEVICESETTINGS_H +#ifndef LL_LLPANELVOICEDEVICESETTINGS_H +#define LL_LLPANELVOICEDEVICESETTINGS_H -#include "llfloater.h" +#include "llpanel.h" class LLPanelVoiceDeviceSettings : public LLPanel { @@ -47,8 +47,8 @@ public: /*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); protected: - static void onCommitInputDevice(LLUICtrl* ctrl, void* user_data); - static void onCommitOutputDevice(LLUICtrl* ctrl, void* user_data); + void onCommitInputDevice(); + void onCommitOutputDevice(); F32 mMicVolume; std::string mInputDevice; @@ -58,4 +58,4 @@ protected: BOOL mDevicesUpdated; }; -#endif // LL_LLFLOATERVOICEDEVICESETTINGS_H +#endif // LL_LLPANELVOICEDEVICESETTINGS_H |