diff --git a/autobuild.xml b/autobuild.xml index 83369b63d8174d21dafebdcf44bd7b0680be38cb..e5385df45670c2f6bd7ec91bcec5223a3cf64fa0 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -238,11 +238,11 @@ <key>archive</key> <map> <key>hash</key> - <string>edc61be793271f0cfdd59fa0a9e926fe</string> + <string>5e6a0930ca5c9e3c26970ac8589a538c</string> <key>hash_algorithm</key> <string>md5</string> <key>url</key> - <string>https://bitbucket.org/alchemyviewer/publiclibs-darwin/downloads/boost-1.59.0-darwin-201511222219.tar.bz2</string> + <string>https://bitbucket.org/alchemyviewer/publiclibs-darwin/downloads/boost-1.59.0-darwin-201601091139.tar.bz2</string> </map> <key>name</key> <string>darwin</string> @@ -322,11 +322,11 @@ <key>archive</key> <map> <key>hash</key> - <string>eca5b205d2a4e96a360cb30651d1f83d</string> + <string>d6e279fb5ce9093c89819803be5562db</string> <key>hash_algorithm</key> <string>md5</string> <key>url</key> - <string>https://bitbucket.org/alchemyviewer/publiclibs-darwin/downloads/colladadom-2.3-darwin-201511222232.tar.bz2</string> + <string>https://bitbucket.org/alchemyviewer/publiclibs-darwin/downloads/colladadom-2.3-darwin-201601091204.tar.bz2</string> </map> <key>name</key> <string>darwin</string> @@ -2182,11 +2182,11 @@ <key>archive</key> <map> <key>hash</key> - <string>312206148405b8f051d8940d1dbf24b9</string> + <string>9551150830531abc405888066437e2c2</string> <key>hash_algorithm</key> <string>md5</string> <key>url</key> - <string>https://bitbucket.org/alchemyviewer/publiclibs-darwin/downloads/llceflib-3.2526.1364.gf6bf57b-darwin-201512301420.tar.bz2</string> + <string>https://bitbucket.org/alchemyviewer/publiclibs-darwin/downloads/llceflib-3.2526.1364.gf6bf57b-darwin-201601160847.tar.bz2</string> </map> <key>name</key> <string>darwin</string> diff --git a/indra/newview/app_settings/settings_alchemy.xml b/indra/newview/app_settings/settings_alchemy.xml index 24112a1dd85990883e418a357fc4701e9ea84ff2..4cffc64922620efc08feed91e519799804513d93 100644 --- a/indra/newview/app_settings/settings_alchemy.xml +++ b/indra/newview/app_settings/settings_alchemy.xml @@ -1142,6 +1142,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>StreamList</key> + <map> + <key>Comment</key> + <string>Saved list of parcel audio streams</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>LLSD</string> + <key>Value</key> + <string /> + </map> <key>UIImgTransparentUUID</key> <map> <key>Comment</key> diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index 8a30a6cc08289cb844a23a0c98783a45f9cfd191..233cb3b09e10f3f75bd9fb06d1fb950e7f34d816 100755 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -35,6 +35,7 @@ #include "llviewerregion.h" #include "llviewermedia.h" #include "llviewerparcelmedia.h" +#include "llviewercontrol.h" // gSavedSettings // library includes #include "llcheckboxctrl.h" @@ -132,8 +133,8 @@ BOOL LLPanelLandMedia::postBuild() mCheckParcelVoiceLocal = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_local"); mCheckParcelVoiceLocal->setCommitCallback(boost::bind(&LLPanelLandMedia::onCommitAny, this)); - mMusicURLEdit = getChild<LLLineEditor>("music_url"); - mMusicURLEdit->setCommitCallback(boost::bind(&LLPanelLandMedia::onCommitAny, this)); + mMusicURLEdit = getChild<LLComboBox>("music_url"); + mMusicURLEdit->setCommitCallback(boost::bind(&LLPanelLandMedia::onCommitMusicUrl, this)); mCheckAVSoundAny = getChild<LLCheckBoxCtrl>("all av sound check"); mCheckAVSoundAny->setCommitCallback(boost::bind(&LLPanelLandMedia::onCommitAny, this)); @@ -244,7 +245,17 @@ void LLPanelLandMedia::refresh() mCheckParcelEnableVoice->set(allow_voice); mCheckParcelVoiceLocal->set(!parcel->getParcelFlagUseEstateVoiceChannel()); - mMusicURLEdit->setText(parcel->getMusicURL()); + const std::string& current_url = parcel->getMusicURL(); + mMusicURLEdit->clearRows(); + LLSD stream_list = gSavedSettings.getLLSD("StreamList"); + const LLSD streams = stream_list["audio"]; + for(LLSD::array_const_iterator s_itr = streams.beginArray(); s_itr != streams.endArray(); ++s_itr) + { + mMusicURLEdit->add(LLSD(*s_itr)); + } + mMusicURLEdit->addSeparator(ADD_TOP); + mMusicURLEdit->add(LLSD(current_url), ADD_TOP); + mMusicURLEdit->selectByValue(current_url); mMusicURLEdit->setEnabled( can_change_media ); BOOL can_change_av_sounds = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS) && parcel->getHaveNewParcelLimitData(); @@ -312,6 +323,7 @@ void LLPanelLandMedia::setMediaURL(const std::string& media_url) // LLViewerParcelMedia::sendMediaNavigateMessage(media_url); getChild<LLUICtrl>("current_url")->setValue(media_url); } + std::string LLPanelLandMedia::getMediaURL() { return mMediaURLEdit->getText(); @@ -350,7 +362,7 @@ void LLPanelLandMedia::onCommitAny() LLUUID media_id = mMediaTextureCtrl->getImageAssetID(); BOOL sound_local = mCheckSoundLocal->get(); - std::string music_url = mMusicURLEdit->getText(); + std::string music_url = mMusicURLEdit->getSimple(); BOOL voice_enabled = mCheckParcelEnableVoice->get(); BOOL voice_estate_chan = !mCheckParcelVoiceLocal->get(); @@ -391,6 +403,29 @@ void LLPanelLandMedia::onCommitAny() // Might have changed properties, so let's redraw! refresh(); } + +void LLPanelLandMedia::onCommitMusicUrl() +{ + std::string music_url = mMusicURLEdit->getSimple(); + LLStringUtil::trim(music_url); + if (!music_url.empty()) + { + LLSD stream_list = gSavedSettings.getLLSD("StreamList"); + const LLSD streams = stream_list["audio"]; + bool found = false; + for(LLSD::array_const_iterator s_itr = streams.beginArray(); s_itr != streams.endArray(); ++s_itr) + { + if (LLStringUtil::compareInsensitive((LLSD(*s_itr)).asString(), music_url) == 0) + found = true; + } + if (!found) + stream_list["audio"].append(music_url); + gSavedSettings.setLLSD("StreamList", stream_list); + } + + onCommitAny(); +} + // static void LLPanelLandMedia::onSetBtn(void *userdata) { diff --git a/indra/newview/llpanellandmedia.h b/indra/newview/llpanellandmedia.h index 5da2efbcaa3416df19e83dd58042785442635087..5a6ed55e1a6fbb63e95eea71041356d5c4758193 100755 --- a/indra/newview/llpanellandmedia.h +++ b/indra/newview/llpanellandmedia.h @@ -49,6 +49,7 @@ public: private: void populateMIMECombo(); void onCommitAny(); + void onCommitMusicUrl(); static void onCommitType(LLUICtrl* ctrl, void *userdata); static void onSetBtn(void* userdata); static void onResetBtn(void* userdata); @@ -70,7 +71,7 @@ private: LLCheckBoxCtrl* mCheckParcelEnableVoice; LLCheckBoxCtrl* mCheckEstateDisabledVoice; LLCheckBoxCtrl* mCheckParcelVoiceLocal; - LLLineEditor* mMusicURLEdit; + LLComboBox* mMusicURLEdit; LLCheckBoxCtrl* mCheckAVSoundAny; LLCheckBoxCtrl* mCheckAVSoundGroup; diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 2725c68a5da3ee914f1dabe4ba9a3bc06ae314d7..3bef1082aa132f81db18afda1e7326b87d316f8b 100755 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1780,16 +1780,23 @@ Only large parcels can be listed in search. width="364"> Music URL: </text> - <line_editor + <combo_box + allow_text_entry="true" + allow_new_values="true" follows="left|top" height="23" layout="topleft" - left="100" - max_length_bytes="255" + left="110" + max_chars="255" name="music_url" top_delta="0" right="-15" - select_on_focus="true" /> + select_on_focus="true"> + <combo_box.combo_button + visible ="false"/> + <combo_box.drop_down_button + visible ="false"/> + </combo_box> <text type="string" length="1"