summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul_productengine <none@none>2011-01-27 18:03:00 +0200
committerpaul_productengine <none@none>2011-01-27 18:03:00 +0200
commitc07c6cf8f4979a3374a09cec12e92df619ffd501 (patch)
tree3b0bd4d38e8e656c9ea06b517d355712ff5a590c
parent3eba59e963d87f54e1b33b0a34de3fe37e67ebe1 (diff)
STORM-513 FIXED "Allow media to auto - play" check-box is enable after Media check-box was unchecked
- Disabling "Allow Media to auto play" check box only when both "Streaming Music" and "Media" are unchecked
-rwxr-xr-xindra/newview/llfloaterpreference.cpp16
-rw-r--r--indra/newview/llfloaterpreference.h4
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_sound.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_sound.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_sound.xml12
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_sound.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_sound.xml2
-rw-r--r--indra/newview/skins/default/xui/it/panel_preferences_sound.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/panel_preferences_sound.xml2
-rw-r--r--indra/newview/skins/default/xui/pl/panel_preferences_sound.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_sound.xml2
11 files changed, 37 insertions, 11 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 8c9dfe435a..724096b443 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1539,6 +1539,7 @@ LLPanelPreference::LLPanelPreference()
: LLPanel()
{
mCommitCallbackRegistrar.add("Pref.setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2));
+ mCommitCallbackRegistrar.add("Pref.updateMediaAutoPlayCheckbox", boost::bind(&LLPanelPreference::updateMediaAutoPlayCheckbox, this, _1));
}
//virtual
@@ -1700,6 +1701,21 @@ void LLPanelPreference::setControlFalse(const LLSD& user_data)
control->set(LLSD(FALSE));
}
+void LLPanelPreference::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl)
+{
+ std::string name = ctrl->getName();
+
+ // Disable "Allow Media to auto play" only when both
+ // "Streaming Music" and "Media" are unchecked. STORM-513.
+ if ((name == "enable_music") || (name == "enable_media"))
+ {
+ bool music_enabled = getChild<LLCheckBoxCtrl>("enable_music")->get();
+ bool media_enabled = getChild<LLCheckBoxCtrl>("enable_media")->get();
+
+ getChild<LLCheckBoxCtrl>("media_auto_play_btn")->setEnabled(music_enabled || media_enabled);
+ }
+}
+
static LLRegisterPanelClassWrapper<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics");
BOOL LLPanelPreferenceGraphics::postBuild()
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 784033ae95..46014804ec 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -189,6 +189,10 @@ public:
void setControlFalse(const LLSD& user_data);
virtual void setHardwareDefaults(){};
+ // Disables "Allow Media to auto play" check box only when both
+ // "Streaming Music" and "Media" are unchecked. Otherwise enables it.
+ void updateMediaAutoPlayCheckbox(LLUICtrl* ctrl);
+
// This function squirrels away the current values of the controls so that
// cancel() can restore them.
virtual void saveSettings();
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml
index 75600a93f6..5810cc21e7 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml
@@ -9,7 +9,7 @@
<slider label="Omgivelser" name="Wind Volume"/>
<slider label="Lyd effekter" name="SFX Volume"/>
<slider label="Musik" name="Music Volume"/>
- <check_box label="Aktiveret" name="music_enabled"/>
+ <check_box label="Aktiveret" name="enable_music"/>
<slider label="Media" name="Media Volume"/>
<check_box label="Aktiveret" name="enable_media"/>
<slider label="Stemme chat" name="Voice Volume"/>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml
index 26674ea594..0f029d8664 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml
@@ -9,7 +9,7 @@
<slider label="Umgebung" name="Wind Volume"/>
<slider label="Soundeffekte" name="SFX Volume"/>
<slider label="Musik wird gestreamt" name="Music Volume"/>
- <check_box label="Aktiviert" name="music_enabled"/>
+ <check_box label="Aktiviert" name="enable_music"/>
<slider label="Medien" name="Media Volume"/>
<check_box label="Aktiviert" name="enable_media"/>
<slider label="Voice-Chat" name="Voice Volume"/>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index f0ce8b849a..26af8dc29d 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -198,9 +198,12 @@
label="Enabled"
layout="topleft"
left_pad="5"
- name="music_enabled"
+ name="enable_music"
top_delta="2"
- width="350"/>
+ width="350">
+ <check_box.commit_callback
+ function="Pref.updateMediaAutoPlayCheckbox"/>
+ </check_box>
<slider
control_name="AudioLevelMedia"
disabled_control="MuteAudio"
@@ -245,7 +248,10 @@
top_delta="2"
left_pad="5"
name="enable_media"
- width="110"/>
+ width="110">
+ <check_box.commit_callback
+ function="Pref.updateMediaAutoPlayCheckbox"/>
+ </check_box>
<slider
control_name="AudioLevelVoice"
disabled_control="MuteAudio"
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
index 7989100c09..6c4ab0f14f 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
@@ -9,7 +9,7 @@
<slider label="Ambiental" name="Wind Volume"/>
<slider label="Efectos de sonido" name="SFX Volume"/>
<slider label="Música en streaming" name="Music Volume"/>
- <check_box label="Activada" name="music_enabled"/>
+ <check_box label="Activada" name="enable_music"/>
<slider label="Multimedia" name="Media Volume"/>
<check_box label="Activada" name="enable_media"/>
<slider label="Chat de voz" name="Voice Volume"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml
index 654d40e2f9..255ac0d049 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml
@@ -9,7 +9,7 @@
<slider label="Ambiant" name="Wind Volume"/>
<slider label="Effets sonores" name="SFX Volume"/>
<slider label="Flux musical" name="Music Volume"/>
- <check_box label="Activé" name="music_enabled"/>
+ <check_box label="Activé" name="enable_music"/>
<slider label="Média" name="Media Volume"/>
<check_box label="Activé" name="enable_media"/>
<slider label="Chat vocal" name="Voice Volume"/>
diff --git a/indra/newview/skins/default/xui/it/panel_preferences_sound.xml b/indra/newview/skins/default/xui/it/panel_preferences_sound.xml
index 2ddb226020..6e70a314c5 100644
--- a/indra/newview/skins/default/xui/it/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/it/panel_preferences_sound.xml
@@ -6,7 +6,7 @@
<slider label="Ambiente" name="Wind Volume"/>
<slider label="Effetti sonori" name="SFX Volume"/>
<slider label="Musica in streaming" name="Music Volume"/>
- <check_box label="Abilitato" name="music_enabled"/>
+ <check_box label="Abilitato" name="enable_music"/>
<slider label="Multimediale" name="Media Volume"/>
<check_box label="Abilitato" name="enable_media"/>
<slider label="Chat vocale" name="Voice Volume"/>
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml
index 4f29ae7b44..9fbbd46220 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml
@@ -6,7 +6,7 @@
<slider label="風" name="Wind Volume"/>
<slider label="効果音" name="SFX Volume"/>
<slider label="ストリーミング音楽" name="Music Volume"/>
- <check_box label="有効" name="music_enabled"/>
+ <check_box label="有効" name="enable_music"/>
<slider label="メディア" name="Media Volume"/>
<check_box label="有効" name="enable_media"/>
<slider label="ボイスチャット" name="Voice Volume"/>
diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml
index c708cc0b99..ac93949a1b 100644
--- a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml
@@ -9,7 +9,7 @@
<slider label="Otoczenie" name="Wind Volume"/>
<slider label="Efekty dźwiękowe" name="SFX Volume"/>
<slider label="Muzyka strumieniowa" name="Music Volume"/>
- <check_box label="Odtwarzaj media audio" name="music_enabled"/>
+ <check_box label="Odtwarzaj media audio" name="enable_music"/>
<slider label="Media" name="Media Volume"/>
<check_box label="Odtwarzaj media" name="enable_media"/>
<slider label="Komunikacja głosowa" name="Voice Volume"/>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml
index 60f51c33e5..3846bfb377 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml
@@ -9,7 +9,7 @@
<slider label="Ambiente" name="Wind Volume"/>
<slider label="Efeitos sonoros" name="SFX Volume"/>
<slider label="Streaming de música" name="Music Volume"/>
- <check_box label="Ativado" name="music_enabled"/>
+ <check_box label="Ativado" name="enable_music"/>
<slider label="Mídia" name="Media Volume"/>
<check_box label="Ativado" name="enable_media"/>
<slider label="Bate-papo de voz" name="Voice Volume"/>