aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-05-27 04:57:07 -0700
committerJacek Antonelli2010-06-19 02:43:03 -0500
commitc1b985201f90652d3e8d2910efb90376a8bf3bff (patch)
tree16a7399a14ed6a903f29bb3969fe4774e3ae6d51 /linden/indra
parentAdded checkbox in Preferences > Input and Camera to disable the minimum zoom ... (diff)
downloadmeta-impy-c1b985201f90652d3e8d2910efb90376a8bf3bff.zip
meta-impy-c1b985201f90652d3e8d2910efb90376a8bf3bff.tar.gz
meta-impy-c1b985201f90652d3e8d2910efb90376a8bf3bff.tar.bz2
meta-impy-c1b985201f90652d3e8d2910efb90376a8bf3bff.tar.xz
Workaround for not being able to set parcel voice settings on OpenSim
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/newview/llpanellandmedia.cpp42
1 files changed, 29 insertions, 13 deletions
diff --git a/linden/indra/newview/llpanellandmedia.cpp b/linden/indra/newview/llpanellandmedia.cpp
index b8886c9..bebd69e 100644
--- a/linden/indra/newview/llpanellandmedia.cpp
+++ b/linden/indra/newview/llpanellandmedia.cpp
@@ -55,6 +55,8 @@
55#include "lltexturectrl.h" 55#include "lltexturectrl.h"
56#include "roles_constants.h" 56#include "roles_constants.h"
57 57
58#include "hippoGridManager.h"
59
58//--------------------------------------------------------------------------- 60//---------------------------------------------------------------------------
59// LLPanelLandMedia 61// LLPanelLandMedia
60//--------------------------------------------------------------------------- 62//---------------------------------------------------------------------------
@@ -185,11 +187,34 @@ void LLPanelLandMedia::refresh()
185 llwarns << "Couldn't get selected region." << llendl; 187 llwarns << "Couldn't get selected region." << llendl;
186 } 188 }
187 189
188 if (region && region->isVoiceEnabled()) // estate-wide voice-disable overrides all 190 // We need to do this differently for OpenSim because it doesn't include
191 // REGION_FLAGS_ALLOW_VOICE in the "RegionInfo" message as of 0.6.9 PF -- MC
192 bool allow_voice = parcel->getParcelFlagAllowVoice();
193 if (gHippoGridManager->getConnectedGrid()->isSecondLife())
189 { 194 {
190 bool allow_voice = parcel->getParcelFlagAllowVoice(); 195 if (region && region->isVoiceEnabled()) // estate-wide voice-disable overrides all
191 196 {
192 mCheckEnableVoiceChatIsEstateDisabled->setVisible(false); 197 mCheckEnableVoiceChatIsEstateDisabled->setVisible(false);
198
199 mCheckEnableVoiceChat->setVisible(true);
200 mCheckEnableVoiceChat->setEnabled( can_change_media );
201 mCheckEnableVoiceChat->set(allow_voice);
202
203 mCheckEnableVoiceChatParcel->setEnabled( can_change_media && allow_voice );
204 }
205 else // disabled at region level
206 {
207 mCheckEnableVoiceChatIsEstateDisabled->setVisible(true); // always disabled
208 mCheckEnableVoiceChat->setVisible(false);
209 mCheckEnableVoiceChat->setEnabled(false);
210 mCheckEnableVoiceChat->set(false);
211
212 mCheckEnableVoiceChatParcel->setEnabled(false);
213 }
214 }
215 else
216 {
217 mCheckEnableVoiceChatIsEstateDisabled->setVisible(true);
193 218
194 mCheckEnableVoiceChat->setVisible(true); 219 mCheckEnableVoiceChat->setVisible(true);
195 mCheckEnableVoiceChat->setEnabled( can_change_media ); 220 mCheckEnableVoiceChat->setEnabled( can_change_media );
@@ -197,15 +222,6 @@ void LLPanelLandMedia::refresh()
197 222
198 mCheckEnableVoiceChatParcel->setEnabled( can_change_media && allow_voice ); 223 mCheckEnableVoiceChatParcel->setEnabled( can_change_media && allow_voice );
199 } 224 }
200 else // disabled at region level
201 {
202 mCheckEnableVoiceChatIsEstateDisabled->setVisible(true); // always disabled
203 mCheckEnableVoiceChat->setVisible(false);
204 mCheckEnableVoiceChat->setEnabled(false);
205 mCheckEnableVoiceChat->set(false);
206
207 mCheckEnableVoiceChatParcel->setEnabled(false);
208 }
209 225
210 mCheckEnableVoiceChatParcel->set(!parcel->getParcelFlagUseEstateVoiceChannel()); 226 mCheckEnableVoiceChatParcel->set(!parcel->getParcelFlagUseEstateVoiceChannel());
211 227