diff options
Diffstat (limited to 'linden/indra/newview/llfloatervoicewizard.cpp')
-rw-r--r-- | linden/indra/newview/llfloatervoicewizard.cpp | 53 |
1 files changed, 41 insertions, 12 deletions
diff --git a/linden/indra/newview/llfloatervoicewizard.cpp b/linden/indra/newview/llfloatervoicewizard.cpp index 879cb6d..69c7a9d 100644 --- a/linden/indra/newview/llfloatervoicewizard.cpp +++ b/linden/indra/newview/llfloatervoicewizard.cpp | |||
@@ -129,16 +129,21 @@ void LLFloaterVoiceWizard::draw() | |||
129 | 129 | ||
130 | void LLFloaterVoiceWizard::onOpen() | 130 | void LLFloaterVoiceWizard::onOpen() |
131 | { | 131 | { |
132 | // put voice client in "tuning" mode | 132 | if(mDevicePanel) |
133 | gVoiceClient->tuningStart(); | 133 | { |
134 | //LLVoiceChannel::suspend(); | 134 | mDevicePanel->onOpen(); |
135 | } | ||
136 | |||
135 | LLFloater::onOpen(); | 137 | LLFloater::onOpen(); |
136 | } | 138 | } |
137 | 139 | ||
138 | void LLFloaterVoiceWizard::onClose(bool app_quitting) | 140 | void LLFloaterVoiceWizard::onClose(bool app_quitting) |
139 | { | 141 | { |
140 | gVoiceClient->tuningStop(); | 142 | if(mDevicePanel) |
141 | //LLVoiceChannel::resume(); | 143 | { |
144 | mDevicePanel->onClose(app_quitting); | ||
145 | } | ||
146 | |||
142 | LLFloater::onClose(app_quitting); | 147 | LLFloater::onClose(app_quitting); |
143 | } | 148 | } |
144 | 149 | ||
@@ -221,7 +226,8 @@ LLPanelDeviceSettings::LLPanelDeviceSettings() | |||
221 | mMicVolume = gSavedSettings.getF32("AudioLevelMic"); | 226 | mMicVolume = gSavedSettings.getF32("AudioLevelMic"); |
222 | 227 | ||
223 | // ask for new device enumeration | 228 | // ask for new device enumeration |
224 | gVoiceClient->refreshDeviceLists(); | 229 | // now do this in onOpen() instead... |
230 | //gVoiceClient->refreshDeviceLists(); | ||
225 | } | 231 | } |
226 | 232 | ||
227 | LLPanelDeviceSettings::~LLPanelDeviceSettings() | 233 | LLPanelDeviceSettings::~LLPanelDeviceSettings() |
@@ -384,6 +390,22 @@ void LLPanelDeviceSettings::refresh() | |||
384 | } | 390 | } |
385 | } | 391 | } |
386 | 392 | ||
393 | void LLPanelDeviceSettings::onOpen() | ||
394 | { | ||
395 | mDevicesUpdated = FALSE; | ||
396 | |||
397 | // ask for new device enumeration | ||
398 | gVoiceClient->refreshDeviceLists(); | ||
399 | |||
400 | // put voice client in "tuning" mode | ||
401 | gVoiceClient->tuningStart(); | ||
402 | } | ||
403 | |||
404 | void LLPanelDeviceSettings::onClose(bool app_quitting) | ||
405 | { | ||
406 | gVoiceClient->tuningStop(); | ||
407 | } | ||
408 | |||
387 | // | 409 | // |
388 | // LLFloaterDeviceSettings | 410 | // LLFloaterDeviceSettings |
389 | // | 411 | // |
@@ -391,22 +413,29 @@ void LLPanelDeviceSettings::refresh() | |||
391 | LLFloaterDeviceSettings::LLFloaterDeviceSettings(const LLSD& seed) : LLFloater("floater_device_settings"), mDevicePanel(NULL) | 413 | LLFloaterDeviceSettings::LLFloaterDeviceSettings(const LLSD& seed) : LLFloater("floater_device_settings"), mDevicePanel(NULL) |
392 | { | 414 | { |
393 | mFactoryMap["device_settings"] = LLCallbackMap(createPanelDeviceSettings, this); | 415 | mFactoryMap["device_settings"] = LLCallbackMap(createPanelDeviceSettings, this); |
394 | gUICtrlFactory->buildFloater(this, "floater_device_settings.xml", &mFactoryMap); | 416 | // do not automatically open singleton floaters (as result of getInstance()) |
417 | BOOL no_open = FALSE; | ||
418 | gUICtrlFactory->buildFloater(this, "floater_device_settings.xml", &mFactoryMap, no_open); | ||
395 | center(); | 419 | center(); |
396 | } | 420 | } |
397 | 421 | ||
398 | void LLFloaterDeviceSettings::onOpen() | 422 | void LLFloaterDeviceSettings::onOpen() |
399 | { | 423 | { |
400 | // put voice client in "tuning" mode | 424 | if(mDevicePanel) |
401 | gVoiceClient->tuningStart(); | 425 | { |
402 | //LLVoiceChannel::suspend(); | 426 | mDevicePanel->onOpen(); |
427 | } | ||
428 | |||
403 | LLFloater::onOpen(); | 429 | LLFloater::onOpen(); |
404 | } | 430 | } |
405 | 431 | ||
406 | void LLFloaterDeviceSettings::onClose(bool app_quitting) | 432 | void LLFloaterDeviceSettings::onClose(bool app_quitting) |
407 | { | 433 | { |
408 | gVoiceClient->tuningStop(); | 434 | if(mDevicePanel) |
409 | //LLVoiceChannel::resume(); | 435 | { |
436 | mDevicePanel->onClose(app_quitting); | ||
437 | } | ||
438 | |||
410 | setVisible(FALSE); | 439 | setVisible(FALSE); |
411 | } | 440 | } |
412 | 441 | ||