From a090aabcdad45a362858806d0ae98b128351a481 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 4 Feb 2009 08:53:28 -0700 Subject: Fixed llsettouchtext label --- linden/indra/newview/llviewermenu.cpp | 26 ++++++++++++++++++++++ .../default/xui/en-us/menu_pie_attachment.xml | 4 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index c4cbf84..b7f4a40 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -1605,6 +1605,31 @@ void label_touch(std::string& label, void*) } } +class LLAttachmentEnableTouch : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); + + if (!obj) return false; + if (!obj->isAttachment()) return false; + + bool new_value = obj && obj->flagHandleTouch(); + gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); + LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); + + if (node && node->mValid && !node->mTouchName.empty()) + { + gMenuHolder->childSetText("Attachment Touch", node->mTouchName); + } + else + { + gMenuHolder->childSetText("Attachment Touch", userdata["data"].asString()); + } + return true; + } +}; + bool handle_object_open() { LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -9822,6 +9847,7 @@ void initialize_menus() addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop"); addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach"); + addMenu(new LLAttachmentEnableTouch(), "Attachment.EnableTouch"); // Land pie menu addMenu(new LLLandBuild(), "Land.Build"); diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml index d16c22c..a3e2bba 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml @@ -6,9 +6,9 @@ - + - + -- cgit v1.1 From 9ab038b8462f5e51e936642562ec21b4474da1fb Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 4 Feb 2009 10:52:53 -0700 Subject: Updated CMake files to RC1 --- linden/indra/cmake/CopyWinLibs.cmake | 88 +++++++++++++++++++++++++++++++++--- linden/indra/cmake/OPENAL.cmake | 13 ++++-- 2 files changed, 92 insertions(+), 9 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake index fdfcb3f..1484663 100644 --- a/linden/indra/cmake/CopyWinLibs.cmake +++ b/linden/indra/cmake/CopyWinLibs.cmake @@ -8,43 +8,81 @@ include(CMakeCopyIfDifferent) set(gst_plugin_debug_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug/gstreamer-plugins") set(gst_plugin_debug_files + libdshowsrcwrapper.dll + libfsselector.dll + libfsvalve.dll + libgstacmenc.dll libgstadder.dll libgstalaw.dll + libgstalpha.dll + libgstalphacolor.dll + libgstapp.dll + libgstaudiochunk.dll libgstaudioconvert.dll + libgstaudiofx.dll libgstaudiorate.dll libgstaudioresample.dll libgstaudiotestsrc.dll libgstautodetect.dll libgstavi.dll + libgstcoreelements.dll libgstcutter.dll libgstdecodebin2.dll libgstdecodebin.dll libgstdirectdraw.dll libgstdirectsound.dll - libgsteffectv.dll + libgstdshowdecwrapper.dll + libgstdshowsrcwrapper.dll + libgstdshowvideosink.dll + libgstdtmf.dll libgstffmpeg.dll libgstffmpegcolorspace.dll + libgstflv.dll libgstgdp.dll + libgsth264parse.dll + libgsticydemux.dll + libgstid3demux.dll libgstjpeg.dll + libgstlevel.dll + libgstmad.dll + libgstmms.dll + libgstmpeg2dec.dll + libgstmpegaudioparse.dll + libgstmpegstream.dll + libgstmpegvideoparse.dll + libgstmscodecs.dll libgstmulaw.dll + libgstmultipart.dll + libgstneon.dll libgstogg.dll libgstplaybin.dll + libgstpng.dll libgstqtdemux.dll - libgstrtp.dll + libgstqueue2.dll + libgstrtp.dll + libgstrtpmanager.dll + libgstrtpmuxer.dll libgstrtsp.dll + libgstsmpte.dll libgsttheora.dll libgsttypefindfunctions.dll libgstudp.dll libgstvideobalance.dll libgstvideobox.dll libgstvideocrop.dll - libgstvideoflip.dll libgstvideomixer.dll libgstvideorate.dll libgstvideoscale.dll + libgstvideosignal.dll libgstvideotestsrc.dll libgstvolume.dll + libgstvolume.dll libgstvorbis.dll + libgstwasapi.dll + libgstwavparse.dll + libgstwininet.dll + libgstx264.dll + libgstxvid.dll ) copy_if_different( @@ -57,43 +95,81 @@ set(all_targets ${all_targets} ${out_targets}) set(gst_plugin_release_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/gstreamer-plugins") set(gst_plugin_release_files + libdshowsrcwrapper.dll + libfsselector.dll + libfsvalve.dll + libgstacmenc.dll libgstadder.dll libgstalaw.dll + libgstalpha.dll + libgstalphacolor.dll + libgstapp.dll + libgstaudiochunk.dll libgstaudioconvert.dll + libgstaudiofx.dll libgstaudiorate.dll libgstaudioresample.dll libgstaudiotestsrc.dll libgstautodetect.dll libgstavi.dll + libgstcoreelements.dll libgstcutter.dll libgstdecodebin2.dll libgstdecodebin.dll libgstdirectdraw.dll libgstdirectsound.dll - libgsteffectv.dll + libgstdshowdecwrapper.dll + libgstdshowsrcwrapper.dll + libgstdshowvideosink.dll + libgstdtmf.dll libgstffmpeg.dll libgstffmpegcolorspace.dll + libgstflv.dll libgstgdp.dll + libgsth264parse.dll + libgsticydemux.dll + libgstid3demux.dll libgstjpeg.dll + libgstlevel.dll + libgstmad.dll + libgstmms.dll + libgstmpeg2dec.dll + libgstmpegaudioparse.dll + libgstmpegstream.dll + libgstmpegvideoparse.dll + libgstmscodecs.dll libgstmulaw.dll + libgstmultipart.dll + libgstneon.dll libgstogg.dll libgstplaybin.dll + libgstpng.dll libgstqtdemux.dll - libgstrtp.dll + libgstqueue2.dll + libgstrtp.dll + libgstrtpmanager.dll + libgstrtpmuxer.dll libgstrtsp.dll + libgstsmpte.dll libgsttheora.dll libgsttypefindfunctions.dll libgstudp.dll libgstvideobalance.dll libgstvideobox.dll libgstvideocrop.dll - libgstvideoflip.dll libgstvideomixer.dll libgstvideorate.dll libgstvideoscale.dll + libgstvideosignal.dll libgstvideotestsrc.dll libgstvolume.dll + libgstvolume.dll libgstvorbis.dll + libgstwasapi.dll + libgstwavparse.dll + libgstwininet.dll + libgstx264.dll + libgstxvid.dll ) copy_if_different( diff --git a/linden/indra/cmake/OPENAL.cmake b/linden/indra/cmake/OPENAL.cmake index a2bae5d..f24ec22 100644 --- a/linden/indra/cmake/OPENAL.cmake +++ b/linden/indra/cmake/OPENAL.cmake @@ -9,8 +9,15 @@ if (OPENAL) # OPENAL_LIB + if (WINDOWS) find_library(OPENAL_LIB - NAMES openal OpenAL OpenAL32 wrap_oal + NAMES openal openal32 OpenAL OpenAL32 wrap_oal + PATHS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/libraries/i686-win32/lib/release/ + ) + + else (WINDOWS) + find_library(OPENAL_LIB + NAMES openal openal32 OpenAL OpenAL32 wrap_oal PATHS ${ARCH_PREBUILT_DIRS_RELEASE} ) @@ -26,7 +33,7 @@ if (OPENAL) find_path(OPENAL_INCLUDE_DIR NAMES al.h - PATHS ${LIBS_PREBUILT_DIR}/include /usr/include/AL + PATHS ${LIBS_PREBUILT_DIR}/include/AL /usr/include/AL ) if (NOT OPENAL_INCLUDE_DIR) @@ -56,7 +63,7 @@ if (OPENAL) find_path(ALUT_INCLUDE_DIR NAMES alut.h - PATHS ${LIBS_PREBUILT_DIR}/include /usr/include/AL + PATHS ${LIBS_PREBUILT_DIR}/include/AL /usr/include/AL ) if (NOT ALUT_INCLUDE_DIR) -- cgit v1.1 From 40811dbf0d99f07acaedcd8c0f01803b39971df9 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 6 Feb 2009 01:49:25 -0700 Subject: develop.py should now work again under windows --- linden/indra/cmake/CopyWinLibs.cmake | 25 +++++++++++-------------- linden/indra/cmake/GStreamer.cmake | 2 ++ linden/indra/cmake/OPENAL.cmake | 13 +++++++++++-- 3 files changed, 24 insertions(+), 16 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake index 1484663..e80f0c3 100644 --- a/linden/indra/cmake/CopyWinLibs.cmake +++ b/linden/indra/cmake/CopyWinLibs.cmake @@ -6,8 +6,8 @@ include(CMakeCopyIfDifferent) -set(gst_plugin_debug_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug/gstreamer-plugins") -set(gst_plugin_debug_files +set(gst_plugin_release_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/lib/gstreamer-plugins") +set(gst_plugin_release_files libdshowsrcwrapper.dll libfsselector.dll libfsvalve.dll @@ -86,15 +86,15 @@ set(gst_plugin_debug_files ) copy_if_different( - ${gst_plugin_debug_dir} - "${CMAKE_CURRENT_BINARY_DIR}/Debug/lib/gstreamer-plugins" + ${gst_plugin_release_dir} + "${CMAKE_CURRENT_BINARY_DIR}/Release/lib/gstreamer-plugins" out_targets - ${gst_plugin_debug_files} + ${gst_plugin_release_files} ) set(all_targets ${all_targets} ${out_targets}) -set(gst_plugin_release_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/gstreamer-plugins") -set(gst_plugin_release_files +set(gst_plugin_debug_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug/lib/gstreamer-plugins") +set(gst_plugin_debug_files libdshowsrcwrapper.dll libfsselector.dll libfsvalve.dll @@ -173,10 +173,10 @@ set(gst_plugin_release_files ) copy_if_different( - ${gst_plugin_release_dir} - "${CMAKE_CURRENT_BINARY_DIR}/Release/lib/gstreamer-plugins" + ${gst_plugin_debug_dir} + "${CMAKE_CURRENT_BINARY_DIR}/Debug/lib/gstreamer-plugins" out_targets - ${gst_plugin_release_files} + ${gst_plugin_debug_files} ) set(all_targets ${all_targets} ${out_targets}) @@ -184,11 +184,8 @@ set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32") set(vivox_files tntk.dll libeay32.dll - SLVoice.exe ssleay32.dll - SLVoiceAgent.exe srtp.dll - vivoxsdk.dll ortp.dll wrap_oal.dll ) @@ -414,4 +411,4 @@ if (MSVC80) endif (EXISTS ${release_msvc8_redist_path}) endif (MSVC80) -add_custom_target(copy_win_libs ALL DEPENDS ${all_targets}) +add_custom_target(copy_win_libs ALL DEPENDS ${all_targets}) \ No newline at end of file diff --git a/linden/indra/cmake/GStreamer.cmake b/linden/indra/cmake/GStreamer.cmake index fc256a8..b4b984d 100644 --- a/linden/indra/cmake/GStreamer.cmake +++ b/linden/indra/cmake/GStreamer.cmake @@ -10,6 +10,8 @@ include(Prebuilt) if (WINDOWS) use_prebuilt_binary(libxml) + use_prebuilt_binary(iconv) + use_prebuilt_binary(gstreamer-plugins) set(GSTREAMER_FOUND ON FORCE BOOL) set(GSTREAMER_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib diff --git a/linden/indra/cmake/OPENAL.cmake b/linden/indra/cmake/OPENAL.cmake index f24ec22..5e71f66 100644 --- a/linden/indra/cmake/OPENAL.cmake +++ b/linden/indra/cmake/OPENAL.cmake @@ -12,7 +12,7 @@ if (OPENAL) if (WINDOWS) find_library(OPENAL_LIB NAMES openal openal32 OpenAL OpenAL32 wrap_oal - PATHS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/libraries/i686-win32/lib/release/ + PATHS ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release ) else (WINDOWS) @@ -20,7 +20,8 @@ if (OPENAL) NAMES openal openal32 OpenAL OpenAL32 wrap_oal PATHS ${ARCH_PREBUILT_DIRS_RELEASE} ) - + endif (WINDOWS) + if (NOT OPENAL_LIB) message(FATAL_ERROR "OpenAL not found!") else (NOT OPENAL_LIB) @@ -46,10 +47,18 @@ if (OPENAL) # ALUT_LIB + if (WINDOWS) + find_library(ALUT_LIB + NAMES alut freealut + PATHS ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release + ) + + else (WINDOWS) find_library(ALUT_LIB NAMES alut freealut PATHS ${ARCH_PREBUILT_DIRS_RELEASE} ) + endif (WINDOWS) if (NOT ALUT_LIB) message(FATAL_ERROR "ALUT not found!") -- cgit v1.1 From 7d2266b138c171e84f8b06b26e344bc4425aecf8 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 13 Feb 2009 20:13:22 -0700 Subject: Removed junk code from gstreamer --- linden/indra/llmedia/llmediaimplgstreamer.cpp | 28 ---------------------- linden/indra/llmedia/llmediaimplgstreamer.h | 15 ++++-------- .../indra/llmedia/llmediaimplgstreamervidplug.cpp | 6 ++--- 3 files changed, 7 insertions(+), 42 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp index 18afc45..b90d6e8 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp @@ -43,10 +43,6 @@ extern "C" { #include "llmediaimplgstreamervidplug.h" -#ifdef LL_GST_SOUNDSINK -#include "llmediaimplgstreamersndplug.h" -#endif // LL_GST_SOUNDSINK - #include "llmediaimplgstreamer_syms.h" #include "llerror.h" @@ -77,9 +73,6 @@ LLMediaImplGStreamer () : mPlaybin ( NULL ), mVideoSink ( NULL ), mState( GST_STATE_NULL ) -#ifdef LL_GST_SOUNDSINK - ,mAudioSink ( NULL ) -#endif // LL_GST_SOUNDSINK { LL_DEBUGS("MediaManager") << "constructing media..." << LL_ENDL; mVolume = -1.0; // XXX Hack to make the vould change happend first time @@ -115,21 +108,6 @@ LLMediaImplGStreamer () : } g_object_set(mPlaybin, "video-sink", mVideoSink, NULL); - -#ifdef LL_GST_SOUNDSINK - LL_DEBUGS("MediaManager") << "extrenal audio sink..." << LL_ENDL; - // instantiate and connect a custom audio sink - mAudioSink = - GST_SLSOUND(llgst_element_factory_make ("private-slsound", "slsound")); - if (!mAudioSink) - { - LL_WARN("MediaImpl") << "Could not instantiate private-slsound element." << LL_ENDL; - // todo: cleanup. - return; // error - } - - g_object_set(mPlaybin, "audio-sink", mAudioSink, NULL); -#endif } } @@ -412,9 +390,6 @@ bool LLMediaImplGStreamer::navigateTo (const std::string urlIn) << LL_ENDL; if (NULL == mPump -#ifdef LL_GST_SOUNDSINK - || NULL == mAudioSink -#endif || NULL == mPlaybin) { return false; @@ -479,9 +454,6 @@ bool LLMediaImplGStreamer::updateMedia() // sanity check if (NULL == mPump -#ifdef LL_GST_SOUNDSINK - || NULL == mAudioSink -#endif || NULL == mPlaybin) { #ifdef LL_GST_REPORT_STATE_CHANGES diff --git a/linden/indra/llmedia/llmediaimplgstreamer.h b/linden/indra/llmedia/llmediaimplgstreamer.h index 4b9353b..5b493ad 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.h +++ b/linden/indra/llmedia/llmediaimplgstreamer.h @@ -31,7 +31,7 @@ */ // header guard -///#ifndef llmediaimplgstreamer_h +#ifndef llmediaimplgstreamer_h #define llmediaimplgstreamer_h #include "llmediaimplcommon.h" @@ -42,14 +42,12 @@ extern "C" { #include #include -#include -#include + +#include "apr_pools.h" +#include "apr_dso.h" } #include "llmediaimplgstreamervidplug.h" -#ifdef LL_GST_SOUNDSINK -#include "llmediaimplgstreamersndplug.h" -#endif // LL_GST_SOUNDSINK class LLMediaManagerData; class LLMediaImplMaker; @@ -100,9 +98,6 @@ class LLMediaImplGStreamer: GstElement *mPlaybin; GstSLVideo *mVideoSink; GstState mState; -#ifdef LL_GST_SOUNDSINK - GstSLSound *mAudioSink; -#endif // LL_GST_SOUNDSINK GstState getState() const { return mState; } }; @@ -132,4 +127,4 @@ public: ///#endif // LL_GSTREAMER_ENABLED -///#endif // llmediaimplgstreamer_h +#endif // llmediaimplgstreamer_h diff --git a/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp b/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp index 892c50d..c95ef36 100644 --- a/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp @@ -68,10 +68,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ( GST_STATIC_CAPS (SLV_ALLCAPS) ); -GST_BOILERPLATE (GstSLVideo, - gst_slvideo, - GstVideoSink, - GST_TYPE_VIDEO_SINK); +GST_BOILERPLATE (GstSLVideo, gst_slvideo, GstVideoSink, + GST_TYPE_VIDEO_SINK); static void gst_slvideo_set_property (GObject * object, guint prop_id, const GValue * value, -- cgit v1.1 From 1b92609dec6d2346f83f06455f7771ea6495480a Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 14 Feb 2009 00:58:18 -0700 Subject: Removed search for non-existant floater_preview_new_landmark.xml --- linden/indra/newview/llpreviewlandmark.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llpreviewlandmark.cpp b/linden/indra/newview/llpreviewlandmark.cpp index dba603b..01d77f6 100644 --- a/linden/indra/newview/llpreviewlandmark.cpp +++ b/linden/indra/newview/llpreviewlandmark.cpp @@ -90,15 +90,7 @@ LLPreviewLandmark::LLPreviewLandmark(const std::string& name, { mFactoryMap["place_details_panel"] = LLCallbackMap(LLPreviewLandmark::createPlaceDetail, this); - if (show_keep_discard) - { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_new_landmark.xml", &getFactoryMap()); - childSetAction("Discard btn",onDiscardBtn,this); - } - else - { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_existing_landmark.xml", &getFactoryMap()); - } + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_existing_landmark.xml", &getFactoryMap()); /* childSetCommitCallback("desc_editor", LLPreview::onText, this); -- cgit v1.1 From 96b0263ed0955d11eb0db700bb770958a5436711 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 14 Feb 2009 02:03:41 -0700 Subject: Fixed crash in LLTextEditor::findHTML --- linden/indra/llui/lltexteditor.cpp | 111 ++++++++++++++++++++++--------------- 1 file changed, 66 insertions(+), 45 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 72d8f17..714ee7c 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -35,6 +35,7 @@ #include "lltexteditor.h" +#include "llerror.h" #include "llfontgl.h" #include "llrender.h" #include "llui.h" @@ -57,6 +58,7 @@ #include "llimagegl.h" #include "llwindow.h" #include +#include // // Globals @@ -3537,6 +3539,7 @@ void LLTextEditor::appendStyledText(const std::string &new_text, std::string text = new_text; while ( findHTML(text, &start, &end) ) { + LLStyleSP html(new LLStyle); html->setVisible(true); html->setColor(mLinkColor); @@ -3624,10 +3627,6 @@ void LLTextEditor::appendText(const std::string &new_text, bool allow_undo, bool { mSelectionStart = selection_start; mSelectionEnd = selection_end; - - - - mIsSelecting = was_selecting; setCursorPos(cursor_pos); } @@ -4272,6 +4271,7 @@ S32 LLTextEditor::findHTMLToken(const std::string &line, S32 pos, BOOL reverse) return index+1; } } + index = 0; // Can't be before first charater } else { @@ -4322,21 +4322,34 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end) const { *begin = findHTMLToken(line, m1, TRUE); *end = findHTMLToken(line, m1, FALSE); + + // Can't start before the first char + if(*begin < 0) + { + //*begin = 0; + } //Load_url only handles http and https so don't hilite ftp, smb, etc. - m2 = line.substr(*begin,(m1 - *begin)).find("http"); - m3 = line.substr(*begin,(m1 - *begin)).find("secondlife"); - - std::string badneighbors=".,<>?';\"][}{=-+_)(*&^%$#@!~`\t\r\n\\"; - - if (m2 >= 0 || m3>=0) + try { - S32 bn = badneighbors.find(line.substr(m1+3,1)); - - if (bn < 0) - { - matched = TRUE; + m2 = line.substr(*begin,(m1 - *begin)).find("http"); + m3 = line.substr(*begin,(m1 - *begin)).find("secondlife"); + + std::string badneighbors=".,<>?';\"][}{=-+_)(*&^%$#@!~`\t\r\n\\"; + + if (m2 >= 0 || m3>=0) + { + S32 bn = badneighbors.find(line.substr(m1+3,1)); + + if (bn < 0) + { + matched = TRUE; + } } + } + catch ( std::out_of_range outOfRange ) + { + LL_WARNS("TextEditor") << "got std::out_of_range exception \"" << line << "\"" << LL_ENDL; } } /* matches things like secondlife.com (no http://) needs a whitelist to really be effective. @@ -4369,41 +4382,49 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end) const { S32 strpos, strpos2; - std::string url = line.substr(*begin,*end - *begin); - std::string slurlID = "slurl.com/secondlife/"; - strpos = url.find(slurlID); - - if (strpos < 0) + try { - slurlID="secondlife://"; - strpos = url.find(slurlID); - } - - if (strpos < 0) - { - slurlID="sl://"; - strpos = url.find(slurlID); - } - - if (strpos >= 0) - { - strpos+=slurlID.length(); - - while ( ( strpos2=url.find("/",strpos) ) == -1 ) - { - if ((*end+2) >= (S32)line.length() || line.substr(*end,1) != " " ) + std::string url = line.substr(*begin,*end - *begin); + std::string slurlID = "slurl.com/secondlife/"; + strpos = url.find(slurlID); + + if (strpos < 0) + { + slurlID="secondlife://"; + strpos = url.find(slurlID); + } + + if (strpos < 0) + { + slurlID="sl://"; + strpos = url.find(slurlID); + } + + if (strpos >= 0) + { + strpos+=slurlID.length(); + + while ( ( strpos2=url.find("/",strpos) ) == -1 ) { - matched=FALSE; - break; + if ((*end+2) >= (S32)line.length() || line.substr(*end,1) != " " ) + { + matched=FALSE; + break; + } + + strpos = (*end + 1) - *begin; + + *end = findHTMLToken(line,(*begin + strpos),FALSE); + url = line.substr(*begin,*end - *begin); } - - strpos = (*end + 1) - *begin; - - *end = findHTMLToken(line,(*begin + strpos),FALSE); - url = line.substr(*begin,*end - *begin); - } + } + } + catch ( std::out_of_range outOfRange ) + { + LL_WARNS("TextEditor") << "got std::out_of_range exception \"" << line << "\"" << LL_ENDL; + } } if (!matched) -- cgit v1.1 From 7f858539851bac96f2a20e50f7e94010a015808c Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 14 Feb 2009 05:21:14 -0700 Subject: Fixed sound settings not being correctly muted --- linden/indra/newview/app_settings/settings.xml | 2 +- linden/indra/newview/llviewermessage.cpp | 4 ++++ linden/indra/newview/llviewerobject.cpp | 6 +++--- linden/indra/newview/llvoavatar.cpp | 13 +++++-------- 4 files changed, 13 insertions(+), 12 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 779b668..9ec5727 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -284,7 +284,7 @@ Type F32 Value - 1.0 + 0.5 AudioLevelUI diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 4543ae4..b947f95 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -111,6 +111,7 @@ #include "llui.h" // for make_ui_sound #include "lluploaddialog.h" #include "llviewercamera.h" +#include "llviewercontrol.h" #include "llviewergenericmessage.h" #include "llviewerinventory.h" #include "llviewermenu.h" @@ -3291,6 +3292,9 @@ void process_sound_trigger(LLMessageSystem *msg, void **) pos_global.mdV[VY] += pos_local.mV[VY]; pos_global.mdV[VZ] += pos_local.mV[VZ]; + // Don't play sounds if sound settings are muted. + if (gSavedSettings.getBOOL("MuteSounds")) return; + // Don't play a trigger sound if you can't hear it due // to parcel "local audio only" settings. if (!LLViewerParcelMgr::getInstance()->canHearSound(pos_global)) return; diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index c560ced..cb3afc5 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp @@ -2766,7 +2766,7 @@ BOOL LLViewerObject::updateLOD() // Update volume of looping sounds if (mAudioSourcep && mAudioSourcep->isLoop()) { - F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : (mAudioGain * gSavedSettings.getF32("AudioLevelSFX")); + F32 volume = mAudioGain * gSavedSettings.getF32("AudioLevelSFX"); mAudioSourcep->setGain(volume); } return FALSE; @@ -4331,7 +4331,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow { BOOL queue = flags & LL_SOUND_FLAG_QUEUE; mAudioGain = gain; - F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : gain * gSavedSettings.getF32("AudioLevelSFX"); + F32 volume = gain * gSavedSettings.getF32("AudioLevelSFX"); mAudioSourcep->setGain(volume); mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP); mAudioSourcep->setSyncMaster(flags & LL_SOUND_FLAG_SYNC_MASTER); @@ -4370,7 +4370,7 @@ void LLViewerObject::adjustAudioGain(const F32 gain) if (mAudioSourcep) { mAudioGain = gain; - F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : mAudioGain * gSavedSettings.getF32("AudioLevelSFX"); + F32 volume = mAudioGain * gSavedSettings.getF32("AudioLevelSFX"); mAudioSourcep->setGain(volume); } } diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index d41f72e..fd2487b 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -3797,7 +3797,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) const LLUUID AGENT_FOOTSTEP_ANIMS[] = {ANIM_AGENT_WALK, ANIM_AGENT_RUN, ANIM_AGENT_LAND}; const S32 NUM_AGENT_FOOTSTEP_ANIMS = sizeof(AGENT_FOOTSTEP_ANIMS) / sizeof(LLUUID); - if ( gAudiop && isAnyAnimationSignaled(AGENT_FOOTSTEP_ANIMS, NUM_AGENT_FOOTSTEP_ANIMS) ) + if ( gAudiop && !gSavedSettings.getBOOL("MuteAmbient") && isAnyAnimationSignaled(AGENT_FOOTSTEP_ANIMS, NUM_AGENT_FOOTSTEP_ANIMS) ) { BOOL playSound = FALSE; LLVector3 foot_pos_agent; @@ -3828,7 +3828,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // AUDIO_STEP_LO_SPEED, AUDIO_STEP_HI_SPEED, // AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN ); - const F32 STEP_VOLUME = 0.5f; + const F32 STEP_VOLUME = 0.2f; LLUUID& step_sound_id = getStepSound(); LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent); @@ -4800,7 +4800,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL { if (anim_id == ANIM_AGENT_TYPE) { - if (gAudiop) + if (gAudiop && !gSavedSettings.getBOOL("MuteAmbient")) { LLVector3d char_pos_global = gAgent.getPosGlobalFromAgent(getCharacterPosition()); if (LLViewerParcelMgr::getInstance()->canHearSound(char_pos_global) @@ -4814,11 +4814,8 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL // gAudiop->triggerSound(LLUUID(gSavedSettings.getString("UISndTyping")), volume); //} //else - { - LLUUID sound_id = LLUUID(gSavedSettings.getString("UISndTyping")); - gAudiop->triggerSound(sound_id, getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_SFX, char_pos_global); - - } + LLUUID sound_id = LLUUID(gSavedSettings.getString("UISndTyping")); + gAudiop->triggerSound(sound_id, getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_SFX, char_pos_global); } } } -- cgit v1.1 From 6ea5a07027eca2fbb9cdbc0ad9e6c679ad774db4 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 14 Feb 2009 06:29:26 -0700 Subject: Added artist/title tag info support --- linden/indra/llmedia/llmediaimplgstreamer.cpp | 9 ++------- linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc | 4 ++++ 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp index b90d6e8..bae8ad9 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp @@ -188,9 +188,6 @@ bool LLMediaImplGStreamer::startup (LLMediaManagerData* init_data) // Init our custom plugins - only really need do this once. gst_slvideo_init_class(); -#if 0 - gst_slsound_init_class(); -#endif done_init = true; } @@ -338,7 +335,6 @@ gboolean LLMediaImplGStreamer::bus_callback(GstBus *bus, GstMessage *message, gp } case GST_MESSAGE_TAG: { -#if 0 GstTagList *tag_list; gchar *title; gchar *artist; @@ -348,10 +344,9 @@ gboolean LLMediaImplGStreamer::bus_callback(GstBus *bus, GstMessage *message, gp gboolean hazArtist = llgst_tag_list_get_string(tag_list, GST_TAG_ARTIST, &artist); if(hazTitle) - LL_INFOS("MediaInfo") << "Title is " << title << LL_ENDL; + LL_INFOS("MediaInfo") << "Title: " << title << LL_ENDL; if(hazArtist) - LL_INFOS("MediaInfo") << "Artist is " << artist << LL_ENDL; -#endif + LL_INFOS("MediaInfo") << "Artist: " << artist << LL_ENDL; break; } case GST_MESSAGE_EOS: diff --git a/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc b/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc index 08ba6df..e17a7a0 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc +++ b/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc @@ -40,3 +40,7 @@ LL_GST_SYM(true, gst_element_seek, bool, GstElement *, gdouble, GstFormat, GstSe LL_GST_SYM(false, gst_segtrap_set_enabled, void, gboolean enabled); LL_GST_SYM(false, gst_message_parse_buffering, void, GstMessage *message, gint *percent); LL_GST_SYM(false, gst_message_parse_info, void, GstMessage *message, GError **gerror, gchar **debug); + +//aw tag infos (Artist, Title, ...tbc...) +LL_GST_SYM(true, gst_message_parse_tag, void, GstMessage *message, GstTagList **tag_list); +LL_GST_SYM(true, gst_tag_list_get_string, gboolean, const GstTagList *list, const gchar *tag, gchar **value); -- cgit v1.1 From e6cda8b59b9b52617a4c40a9ae6111403a3dba2f Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 14 Feb 2009 23:12:10 -0700 Subject: Fixed missing music prompt (streaming now enabled by default) --- linden/indra/newview/app_settings/settings.xml | 4 +-- linden/indra/newview/llviewerparcelmedia.cpp | 8 +---- linden/indra/newview/llviewerparcelmgr.cpp | 20 +++++++++++- .../newview/skins/default/xui/en-us/alerts.xml | 36 ++++++++++++++-------- 4 files changed, 46 insertions(+), 22 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 779b668..fbb620c 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -317,7 +317,7 @@ Type Boolean Value - 0 + 1 AudioStreamingVideo @@ -328,7 +328,7 @@ Type Boolean Value - 0 + 1 AutoAcceptNewInventory diff --git a/linden/indra/newview/llviewerparcelmedia.cpp b/linden/indra/newview/llviewerparcelmedia.cpp index 956ed03..94f6d84 100644 --- a/linden/indra/newview/llviewerparcelmedia.cpp +++ b/linden/indra/newview/llviewerparcelmedia.cpp @@ -384,17 +384,11 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg, void * void callback_play_media(S32 option, void* data) { - LLParcel* parcel = (LLParcel*)data; if (option == 0) { - gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); + LLParcel* parcel = (LLParcel*)data; LLViewerParcelMedia::play(parcel); } - else - { - gSavedSettings.setBOOL("AudioStreamingVideo", FALSE); - } gSavedSettings.setWarning("FirstStreamingVideo", FALSE); - } diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp index 5ef6f83..e27e284 100644 --- a/linden/indra/newview/llviewerparcelmgr.cpp +++ b/linden/indra/newview/llviewerparcelmgr.cpp @@ -1692,7 +1692,12 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use void optionally_start_music(const std::string& music_url) { - if (gSavedSettings.getBOOL("AudioStreamingMusic")) + // Check to see if this your first time on a music-enabled parcel. + if (gSavedSettings.getWarning("FirstStreamingMusic")) + { + gViewerWindow->alertXml("ParcelCanPlayMusic", callback_start_music, (void*)&music_url); + } + else if (gSavedSettings.getBOOL("AudioStreamingMusic")) { // Make the user click the start button on the overlay bar. JC // llinfos << "Starting parcel music " << music_url << llendl; @@ -1706,6 +1711,19 @@ void optionally_start_music(const std::string& music_url) } } + +void callback_start_music(S32 option, void* data) +{ + if (option == 0) + { + // Before the callback, we verified the url was good. + // We fetch again to avoid lag while loading. + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + gAudiop->startInternetStream(parcel->getMusicURL()); + } + gSavedSettings.setWarning("FirstStreamingMusic", FALSE); +} + // static void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void **user) { diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml index 0be529f..92e2014 100644 --- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml +++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml @@ -1893,20 +1893,32 @@ Try selecting a single parcel. Region Not Found - - - This location can play streaming media. -Streaming media requires a fast Internet connection. - -Play streaming media when available? -(You can change this option later under -Preferences > Audio & Video.) - + + + This location wants to play streaming music. + (Requires a fast Internet connection.) + + Play streaming music now? + + + + + + + This location wants to play streaming media. + (Requires a fast Internet connection.) + + Play streaming media now? + - -- cgit v1.1 From 5ca6654804dd26f41320b461dbe81d1dba42c3f4 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 14 Feb 2009 23:16:16 -0700 Subject: Fixed music button not toggling on first run --- linden/indra/newview/lloverlaybar.cpp | 7 +++++++ linden/indra/newview/lloverlaybar.h | 3 +++ linden/indra/newview/llviewerparcelmgr.cpp | 2 ++ 3 files changed, 12 insertions(+) (limited to 'linden/indra') diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp index 1087fd8..80cac14 100644 --- a/linden/indra/newview/lloverlaybar.cpp +++ b/linden/indra/newview/lloverlaybar.cpp @@ -275,6 +275,7 @@ void LLOverlayBar::refresh() { layoutButtons(); } + } //----------------------------------------------------------------------- @@ -360,6 +361,12 @@ void LLOverlayBar::toggleMediaPlay(void*) } //static +void LLOverlayBar::musicFirstRun() +{ + gOverlayBar->mMusicState = PLAYING; +} + +//static void LLOverlayBar::toggleMusicPlay(void*) { if (!gOverlayBar) diff --git a/linden/indra/newview/lloverlaybar.h b/linden/indra/newview/lloverlaybar.h index 5880ff0..73d0a43 100644 --- a/linden/indra/newview/lloverlaybar.h +++ b/linden/indra/newview/lloverlaybar.h @@ -80,6 +80,9 @@ public: static void musicStop(void*); static void mediaStop(void*); + // hack to make sure the music button plays. + static void musicFirstRun(); + static void toggleAudioVolumeFloater(void*); protected: diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp index e27e284..2dee2bf 100644 --- a/linden/indra/newview/llviewerparcelmgr.cpp +++ b/linden/indra/newview/llviewerparcelmgr.cpp @@ -1720,6 +1720,8 @@ void callback_start_music(S32 option, void* data) // We fetch again to avoid lag while loading. LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); gAudiop->startInternetStream(parcel->getMusicURL()); + + LLOverlayBar::musicFirstRun(); } gSavedSettings.setWarning("FirstStreamingMusic", FALSE); } -- cgit v1.1 From b126a1f08592c59b185a89325c55031ff939cae1 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 14 Feb 2009 23:56:36 -0700 Subject: Removed useless music pause button --- linden/indra/newview/llmediaremotectrl.cpp | 20 +-- .../default/xui/en-us/panel_media_controls.xml | 188 ++++++++++----------- 2 files changed, 98 insertions(+), 110 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llmediaremotectrl.cpp b/linden/indra/newview/llmediaremotectrl.cpp index 1b337ab..06978d7 100644 --- a/linden/indra/newview/llmediaremotectrl.cpp +++ b/linden/indra/newview/llmediaremotectrl.cpp @@ -85,7 +85,6 @@ BOOL LLMediaRemoteCtrl::postBuild() childSetAction("media_stop",LLOverlayBar::mediaStop,this); childSetAction("music_stop",LLOverlayBar::toggleMusicPlay,this); childSetAction("media_pause",LLOverlayBar::toggleMediaPlay,this); - childSetAction("music_pause",LLOverlayBar::toggleMusicPlay,this); childSetAction("expand", onClickExpandBtn, this); return TRUE; @@ -150,7 +149,6 @@ void LLMediaRemoteCtrl::enableMediaButtons() bool stop_media_enabled = false; bool play_music_enabled = false; bool stop_music_enabled = false; - bool music_show_pause = false; bool media_show_pause = false; LLColor4 music_icon_color = LLUI::sColorsGroup->getColor( "IconDisabledColor" ); LLColor4 media_icon_color = LLUI::sColorsGroup->getColor( "IconDisabledColor" ); @@ -203,17 +201,16 @@ void LLMediaRemoteCtrl::enableMediaButtons() if ( parcel && parcel->getMusicURL()[0]) { - play_music_enabled = true; music_icon_color = LLUI::sColorsGroup->getColor( "IconEnabledColor" ); if (gOverlayBar->musicPlaying()) { - music_show_pause = true; + play_music_enabled = false; stop_music_enabled = true; } else { - music_show_pause = false; + play_music_enabled = true; stop_music_enabled = false; } } @@ -226,20 +223,19 @@ void LLMediaRemoteCtrl::enableMediaButtons() } } const std::string media_icon_name = LLMIMETypes::findIcon(media_type); + LLButton* music_play_btn = getChild("music_play"); LLButton* music_stop_btn = getChild("music_stop"); - LLButton* music_pause_btn = getChild("music_pause"); + + music_play_btn->setEnabled(play_music_enabled); + music_stop_btn->setEnabled(stop_music_enabled); + childSetColor("music_icon", music_icon_color); + LLButton* media_play_btn = getChild("media_play"); LLButton* media_stop_btn = getChild("media_stop"); LLButton* media_pause_btn = getChild("media_pause"); LLIconCtrl* media_icon = getChild("media_icon"); - music_play_btn->setEnabled(play_music_enabled); - music_stop_btn->setEnabled(stop_music_enabled); - music_pause_btn->setEnabled(music_show_pause); - music_pause_btn->setVisible(music_show_pause); - music_play_btn->setVisible(! music_show_pause); - childSetColor("music_icon", music_icon_color); if(!media_icon_name.empty()) { media_icon->setImage(media_icon_name); diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_media_controls.xml b/linden/indra/newview/skins/default/xui/en-us/panel_media_controls.xml index 1fead04..7e4f12a 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_media_controls.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_media_controls.xml @@ -1,98 +1,90 @@ - - - -