diff options
Diffstat (limited to 'linden/indra/newview/llprefsvoice.cpp')
-rw-r--r-- | linden/indra/newview/llprefsvoice.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/linden/indra/newview/llprefsvoice.cpp b/linden/indra/newview/llprefsvoice.cpp index 167e079..2d6eeb0 100644 --- a/linden/indra/newview/llprefsvoice.cpp +++ b/linden/indra/newview/llprefsvoice.cpp | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include "llprefsvoice.h" | 36 | #include "llprefsvoice.h" |
37 | 37 | ||
38 | #include "floatervoicelicense.h" | ||
38 | #include "llcheckboxctrl.h" | 39 | #include "llcheckboxctrl.h" |
39 | #include "llfloatervoicedevicesettings.h" | 40 | #include "llfloatervoicedevicesettings.h" |
40 | #include "llfocusmgr.h" | 41 | #include "llfocusmgr.h" |
@@ -136,8 +137,6 @@ BOOL LLPrefsVoice::postBuild() | |||
136 | 137 | ||
137 | void LLPrefsVoice::apply() | 138 | void LLPrefsVoice::apply() |
138 | { | 139 | { |
139 | gSavedSettings.setBOOL("EnableVoiceChat", childGetValue("enable_voice_check")); | ||
140 | |||
141 | gSavedSettings.setString("PushToTalkButton", childGetValue("modifier_combo")); | 140 | gSavedSettings.setString("PushToTalkButton", childGetValue("modifier_combo")); |
142 | gSavedSettings.setBOOL("VoiceCallsFriendsOnly", childGetValue("voice_call_friends_only_check")); | 141 | gSavedSettings.setBOOL("VoiceCallsFriendsOnly", childGetValue("voice_call_friends_only_check")); |
143 | gSavedSettings.setBOOL("AutoDisengageMic", childGetValue("auto_disengage_mic_check")); | 142 | gSavedSettings.setBOOL("AutoDisengageMic", childGetValue("auto_disengage_mic_check")); |
@@ -149,6 +148,18 @@ void LLPrefsVoice::apply() | |||
149 | { | 148 | { |
150 | voice_device_settings->apply(); | 149 | voice_device_settings->apply(); |
151 | } | 150 | } |
151 | |||
152 | bool enable_voice = childGetValue("enable_voice_check"); | ||
153 | if (enable_voice && !gSavedSettings.getBOOL("VivoxLicenseAccepted")) | ||
154 | { | ||
155 | // This window enables voice chat if license is accepted | ||
156 | FloaterVoiceLicense::getInstance()->open(); | ||
157 | FloaterVoiceLicense::getInstance()->center(); | ||
158 | } | ||
159 | else | ||
160 | { | ||
161 | gSavedSettings.setBOOL("EnableVoiceChat", enable_voice); | ||
162 | } | ||
152 | } | 163 | } |
153 | 164 | ||
154 | void LLPrefsVoice::cancel() | 165 | void LLPrefsVoice::cancel() |