"Fix" confusion over media settings
Review #89 This implements the changes Sam wanted in order to reduce the confusion over media enabled-ness, in particular: - "Media Enabled" pref now only controls "AudioStreamingMedia" - No more "tentative" state - New "Music Enabled" pref - First run dialog controls Media and Music (Sam, this is a change from your request...I think it works better) - Put a reflection of the "Media Enabled" checkbox in the Nearby Media Floater - Get rid of the "AudioStreamingVideo" setting altogether (whatever used it, it should now obey "AudioStreamingMedia").master
parent
7094921d1f
commit
af83fe79d8
|
|
@ -298,17 +298,6 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>AudioStreamingVideo</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable streaming video</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>AuditTexture</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -327,6 +327,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
|
|||
mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this));
|
||||
mCommitCallbackRegistrar.add("Pref.ParcelMediaAutoPlayEnable", boost::bind(&LLFloaterPreference::onCommitParcelMediaAutoPlayEnable, this));
|
||||
mCommitCallbackRegistrar.add("Pref.MediaEnabled", boost::bind(&LLFloaterPreference::onCommitMediaEnabled, this));
|
||||
mCommitCallbackRegistrar.add("Pref.MusicEnabled", boost::bind(&LLFloaterPreference::onCommitMusicEnabled, this));
|
||||
mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this));
|
||||
mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
|
||||
mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2));
|
||||
|
|
@ -1001,12 +1002,14 @@ void LLFloaterPreference::onCommitMediaEnabled()
|
|||
{
|
||||
LLCheckBoxCtrl *media_enabled_ctrl = getChild<LLCheckBoxCtrl>("media_enabled");
|
||||
bool enabled = media_enabled_ctrl->get();
|
||||
gSavedSettings.setBOOL("AudioStreamingVideo", enabled);
|
||||
gSavedSettings.setBOOL("AudioStreamingMusic", enabled);
|
||||
gSavedSettings.setBOOL("AudioStreamingMedia", enabled);
|
||||
media_enabled_ctrl->setTentative(false);
|
||||
// Update enabled state of the "autoplay" checkbox
|
||||
getChild<LLCheckBoxCtrl>("autoplay_enabled")->setEnabled(enabled);
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onCommitMusicEnabled()
|
||||
{
|
||||
LLCheckBoxCtrl *music_enabled_ctrl = getChild<LLCheckBoxCtrl>("music_enabled");
|
||||
bool enabled = music_enabled_ctrl->get();
|
||||
gSavedSettings.setBOOL("AudioStreamingMusic", enabled);
|
||||
}
|
||||
|
||||
void LLFloaterPreference::refresh()
|
||||
|
|
@ -1424,17 +1427,15 @@ BOOL LLPanelPreference::postBuild()
|
|||
}
|
||||
|
||||
//////////////////////PanelPrivacy ///////////////////
|
||||
if(hasChild("media_enabled"))
|
||||
if (hasChild("media_enabled"))
|
||||
{
|
||||
bool video_enabled = gSavedSettings.getBOOL("AudioStreamingVideo");
|
||||
bool music_enabled = gSavedSettings.getBOOL("AudioStreamingMusic");
|
||||
bool media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia");
|
||||
bool enabled = video_enabled || music_enabled || media_enabled;
|
||||
|
||||
LLCheckBoxCtrl *media_enabled_ctrl = getChild<LLCheckBoxCtrl>("media_enabled");
|
||||
media_enabled_ctrl->set(enabled);
|
||||
media_enabled_ctrl->setTentative(!(video_enabled == music_enabled == media_enabled));
|
||||
getChild<LLCheckBoxCtrl>("autoplay_enabled")->setEnabled(enabled);
|
||||
getChild<LLCheckBoxCtrl>("media_enabled")->set(media_enabled);
|
||||
getChild<LLCheckBoxCtrl>("autoplay_enabled")->setEnabled(media_enabled);
|
||||
}
|
||||
if (hasChild("music_enabled"))
|
||||
{
|
||||
getChild<LLCheckBoxCtrl>("music_enabled")->set(gSavedSettings.getBOOL("AudioStreamingMusic"));
|
||||
}
|
||||
|
||||
apply();
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ public:
|
|||
void onCommitAutoDetectAspect();
|
||||
void onCommitParcelMediaAutoPlayEnable();
|
||||
void onCommitMediaEnabled();
|
||||
void onCommitMusicEnabled();
|
||||
void applyResolution();
|
||||
void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
|
||||
void getUIColor(LLUICtrl* ctrl, const LLSD& param);
|
||||
|
|
|
|||
|
|
@ -940,7 +940,6 @@ bool LLViewerMedia::firstRunCallback(const LLSD& notification, const LLSD& respo
|
|||
{
|
||||
// user has elected to automatically play media.
|
||||
gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, TRUE);
|
||||
gSavedSettings.setBOOL("AudioStreamingVideo", TRUE);
|
||||
gSavedSettings.setBOOL("AudioStreamingMusic", TRUE);
|
||||
gSavedSettings.setBOOL("AudioStreamingMedia", TRUE);
|
||||
|
||||
|
|
@ -961,7 +960,6 @@ bool LLViewerMedia::firstRunCallback(const LLSD& notification, const LLSD& respo
|
|||
{
|
||||
gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, FALSE);
|
||||
gSavedSettings.setBOOL("AudioStreamingMedia", FALSE);
|
||||
gSavedSettings.setBOOL("AudioStreamingVideo", FALSE);
|
||||
gSavedSettings.setBOOL("AudioStreamingMusic", FALSE);
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ void LLViewerParcelMedia::play(LLParcel* parcel)
|
|||
|
||||
if (!parcel) return;
|
||||
|
||||
if (!gSavedSettings.getBOOL("AudioStreamingMedia") || !gSavedSettings.getBOOL("AudioStreamingVideo"))
|
||||
if (!gSavedSettings.getBOOL("AudioStreamingMedia"))
|
||||
return;
|
||||
|
||||
std::string media_url = parcel->getMediaURL();
|
||||
|
|
|
|||
|
|
@ -2777,7 +2777,6 @@ void LLViewerMediaTexture::updateClass()
|
|||
#if 0
|
||||
//force to play media.
|
||||
gSavedSettings.setBOOL("AudioStreamingMedia", true) ;
|
||||
gSavedSettings.setBOOL("AudioStreamingVideo", true) ;
|
||||
#endif
|
||||
|
||||
for(media_map_t::iterator iter = sMediaMap.begin() ; iter != sMediaMap.end(); )
|
||||
|
|
|
|||
|
|
@ -78,19 +78,19 @@
|
|||
top_pad="10"
|
||||
width="350" />
|
||||
<check_box
|
||||
control_name="MediaEnabled"
|
||||
name="media_enabled"
|
||||
control_name="AudioStreamingMedia"
|
||||
height="16"
|
||||
label="Media Enabled"
|
||||
layout="topleft"
|
||||
left="30"
|
||||
name="media_enabled"
|
||||
top_pad="10"
|
||||
width="350">
|
||||
<check_box.commit_callback
|
||||
function="Pref.MediaEnabled" />
|
||||
</check_box>
|
||||
<check_box
|
||||
enabled_control="MediaEnabled"
|
||||
enabled_control="AudioStreamingMedia"
|
||||
control_name="ParcelMediaAutoPlayEnable"
|
||||
height="16"
|
||||
label="Allow Media to auto-play"
|
||||
|
|
@ -102,7 +102,19 @@
|
|||
<check_box.commit_callback
|
||||
function="Pref.ParcelMediaAutoPlayEnable" />
|
||||
</check_box>
|
||||
<text
|
||||
<check_box
|
||||
control_name="AudioStreamingMusic"
|
||||
height="16"
|
||||
label="Music Enabled"
|
||||
layout="topleft"
|
||||
left="30"
|
||||
name="music_enabled"
|
||||
top_pad="10"
|
||||
width="350">
|
||||
<check_box.commit_callback
|
||||
function="Pref.MusicEnabled" />
|
||||
</check_box>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@
|
|||
width="480" />
|
||||
<radio_item
|
||||
height="20"
|
||||
label="Use my browser (IE, Firefox)"
|
||||
label="Use my browser (IE, Firefox, Safari)"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="external"
|
||||
|
|
|
|||
Loading…
Reference in New Issue