From 7a29b2d1cd471767b58ea30f53900cd2c5a9637c Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:35 -0500 Subject: Second Life viewer sources 1.19.1.1 --- linden/indra/llcommon/llfile.cpp | 8 +++- linden/indra/llcommon/llfile.h | 6 ++- linden/indra/llcommon/llversionviewer.h | 2 +- linden/indra/llmath/llvolume.cpp | 34 +++++++++----- linden/indra/llmedia/llmediaimplllmozlib.cpp | 53 ++++++++++++++++++++++ linden/indra/llmessage/llcurl.cpp | 1 - linden/indra/llwindow/llwindowsdl.cpp | 1 + .../indra/newview/English.lproj/InfoPlist.strings | 4 +- linden/indra/newview/Info-SecondLife.plist | 2 +- linden/indra/newview/gpu_table.txt | 14 +++--- linden/indra/newview/llcontroldef.cpp | 2 +- linden/indra/newview/llinventorybridge.cpp | 2 +- linden/indra/newview/llmediaremotectrl.cpp | 9 ++-- linden/indra/newview/llmediaremotectrl.h | 3 ++ linden/indra/newview/llmimetypes.cpp | 8 +++- linden/indra/newview/llpaneldirfind.cpp | 12 +++++ linden/indra/newview/llpanellandmedia.cpp | 24 ++++++++-- linden/indra/newview/llpanellandmedia.h | 2 +- linden/indra/newview/llpreviewtexture.cpp | 2 +- linden/indra/newview/llpreviewtexture.h | 2 +- linden/indra/newview/lltexturefetch.cpp | 2 +- linden/indra/newview/llviewerimage.h | 2 +- linden/indra/newview/llviewermedia.cpp | 7 ++- linden/indra/newview/llviewerparcelmedia.cpp | 32 ++++++------- linden/indra/newview/llviewerpartsource.cpp | 5 +- linden/indra/newview/res/newViewRes.rc | 8 ++-- .../newview/skins/xui/en-us/floater_about_land.xml | 33 +++++++------- .../skins/xui/en-us/panel_media_controls.xml | 24 ++++++++++ .../newview/skins/xui/en-us/panel_media_remote.xml | 24 ---------- 29 files changed, 221 insertions(+), 107 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llcommon/llfile.cpp b/linden/indra/llcommon/llfile.cpp index 6ccf6ac..d551f28 100644 --- a/linden/indra/llcommon/llfile.cpp +++ b/linden/indra/llcommon/llfile.cpp @@ -266,6 +266,7 @@ void llofstream::open(const char* _Filename, /* Flawfinder: ignore */ } llassert(_Filebuffer==NULL); _Filebuffer = new _Myfb(filep); + _ShouldClose = true; _Myios::init(_Filebuffer); } @@ -279,14 +280,17 @@ void llofstream::close() llofstream::llofstream(const char *_Filename, std::ios_base::openmode _Mode, int _Prot) - : std::basic_ostream >(NULL,true),_Filebuffer(NULL) + : std::basic_ostream >(NULL,true),_Filebuffer(NULL),_ShouldClose(false) { // construct with named file and specified mode open(_Filename, _Mode , _Prot); /* Flawfinder: ignore */ } llofstream::~llofstream() { // destroy the object - close(); + if (_ShouldClose) + { + close(); + } delete _Filebuffer; } diff --git a/linden/indra/llcommon/llfile.h b/linden/indra/llcommon/llfile.h index 2650775..d449ec9 100644 --- a/linden/indra/llcommon/llfile.h +++ b/linden/indra/llcommon/llfile.h @@ -127,7 +127,7 @@ public: typedef std::basic_ios > _Myios; llofstream() - : std::basic_ostream >(NULL,true),_Filebuffer(NULL) + : std::basic_ostream >(NULL,true),_Filebuffer(NULL),_ShouldClose(false) { // construct unopened } @@ -138,7 +138,8 @@ public: explicit llofstream(_Filet *_File) : std::basic_ostream >(NULL,true), - _Filebuffer(new _Myfb(_File))//_File) + _Filebuffer(new _Myfb(_File)),//_File) + _ShouldClose(false) { // construct with specified C stream } @@ -157,6 +158,7 @@ public: private: _Myfb *_Filebuffer; // the file buffer + bool _ShouldClose; }; diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index c1e6778..998ea9e 100644 --- a/linden/indra/llcommon/llversionviewer.h +++ b/linden/indra/llcommon/llversionviewer.h @@ -35,7 +35,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 19; const S32 LL_VERSION_PATCH = 1; -const S32 LL_VERSION_BUILD = 0; +const S32 LL_VERSION_BUILD = 1; const char * const LL_CHANNEL = "Second Life Release"; diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index 266ec08..7403724 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp @@ -2078,6 +2078,14 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, } mSculptLevel = sculpt_level; + + // Delete any existing faces so that they get regenerated + if (mVolumeFaces) + { + delete[] mVolumeFaces; + mVolumeFaces = NULL; + } + createVolumeFaces(); } @@ -4820,29 +4828,33 @@ BOOL LLVolumeFace::createSide(BOOL partial_build) } } - //generate normals - for (U32 i = 0; i < mIndices.size()/3; i++) { //for each triangle - const VertexData& v0 = mVertices[mIndices[i*3+0]]; - const VertexData& v1 = mVertices[mIndices[i*3+1]]; - const VertexData& v2 = mVertices[mIndices[i*3+2]]; + //generate normals + for (U32 i = 0; i < mIndices.size()/3; i++) //for each triangle + { + const S32 i0 = mIndices[i*3+0]; + const S32 i1 = mIndices[i*3+1]; + const S32 i2 = mIndices[i*3+2]; + const VertexData& v0 = mVertices[i0]; + const VertexData& v1 = mVertices[i1]; + const VertexData& v2 = mVertices[i2]; //calculate triangle normal - LLVector3 norm = (v0.mPosition-v1.mPosition)% - (v0.mPosition-v2.mPosition); + LLVector3 norm = (v0.mPosition-v1.mPosition) % (v0.mPosition-v2.mPosition); for (U32 j = 0; j < 3; j++) { //add triangle normal to vertices - mVertices[mIndices[i*3+j]].mNormal += norm; // * (weight_sum - d[j])/weight_sum; + const S32 idx = mIndices[i*3+j]; + mVertices[idx].mNormal += norm; // * (weight_sum - d[j])/weight_sum; } //even out quad contributions - if (i % 2 == 0) + if ((i & 1) == 0) { - mVertices[mIndices[i*3+2]].mNormal += norm; + mVertices[i2].mNormal += norm; } else { - mVertices[mIndices[i*3+1]].mNormal += norm; + mVertices[i1].mNormal += norm; } } diff --git a/linden/indra/llmedia/llmediaimplllmozlib.cpp b/linden/indra/llmedia/llmediaimplllmozlib.cpp index 06250f7..87d9c77 100644 --- a/linden/indra/llmedia/llmediaimplllmozlib.cpp +++ b/linden/indra/llmedia/llmediaimplllmozlib.cpp @@ -47,6 +47,7 @@ // Linux, MESA headers, but not necessarily assuming MESA runtime. // quotes so we get libraries/.../GL/ version #include "GL/gl.h" + #include #endif #include @@ -84,6 +85,14 @@ LLMediaImplLLMozLib::LLMediaImplLLMozLib() : // (static) super-initialization - called once at application startup bool LLMediaImplLLMozLib::startup( LLMediaManagerData* init_data ) { +#if LL_LINUX + // Yuck, Mozilla's GTK callbacks play with the locale - push/pop + // the locale to protect it, as exotic/non-C locales + // causes our code lots of general critical weirdness + // and crashness. (SL-35450) + std::string saved_locale = setlocale(LC_ALL, NULL); +#endif // LL_LINUX + bool result = LLMozLib::getInstance()->init( init_data->getBrowserApplicationDir(), init_data->getBrowserComponentDir(), init_data->getBrowserProfileDir(), @@ -92,6 +101,10 @@ bool LLMediaImplLLMozLib::startup( LLMediaManagerData* init_data ) // append special string to the embedded browser user agent string LLMozLib::getInstance()->setBrowserAgentId( init_data->getBrowserUserAgentId() ); +#if LL_LINUX + setlocale(LC_ALL, saved_locale.c_str() ); +#endif // LL_LINUX + return result; } @@ -114,6 +127,10 @@ bool LLMediaImplLLMozLib::init() if ( mWindowId ) return false; +#if LL_LINUX + std::string saved_locale = setlocale(LC_ALL, NULL); +#endif // LL_LINUX + mWindowId = LLMozLib::getInstance()->createBrowserWindow( mBrowserWindowWidth, mBrowserWindowHeight ); LLMozLib::getInstance()->setSize( mWindowId, mBrowserWindowWidth, mBrowserWindowHeight ); @@ -132,6 +149,10 @@ bool LLMediaImplLLMozLib::init() // set media depth now we have created a browser window and know what it is setMediaDepth( LLMozLib::getInstance()->getBrowserDepth( mWindowId ) ); +#if LL_LINUX + setlocale(LC_ALL, saved_locale.c_str() ); +#endif // LL_LINUX + return true; } @@ -177,9 +198,17 @@ bool LLMediaImplLLMozLib::setCaretColor( unsigned int red, unsigned int green, u // virtual bool LLMediaImplLLMozLib::navigateTo( const std::string url ) { +#if LL_LINUX + std::string saved_locale = setlocale(LC_ALL, NULL); +#endif // LL_LINUX + // pass url to llmozlib LLMozLib::getInstance()->navigateTo( mWindowId, url ); +#if LL_LINUX + setlocale(LC_ALL, saved_locale.c_str() ); +#endif // LL_LINUX + // emit event with size change to kick things off LLMediaEvent event( this ); mEventEmitter.update( &LLMediaObserver::onMediaSizeChange, event ); @@ -235,6 +264,10 @@ bool LLMediaImplLLMozLib::updateState() clearCommand(); }; +#if LL_LINUX + std::string saved_locale = setlocale(LC_ALL, NULL); +#endif // LL_LINUX + if ( nextCommand() == LLMediaBase::COMMAND_BACK ) { setStatus( LLMediaBase::STATUS_STARTED ); @@ -249,6 +282,10 @@ bool LLMediaImplLLMozLib::updateState() clearCommand(); }; +#if LL_LINUX + setlocale(LC_ALL, saved_locale.c_str() ); +#endif // LL_LINUX + return true; } @@ -345,8 +382,16 @@ bool LLMediaImplLLMozLib::recomputeSizes() new_height = LLMediaManager::textureHeightFromMediaHeight( new_height ); } +#if LL_LINUX + std::string saved_locale = setlocale(LC_ALL, NULL); +#endif // LL_LINUX + bool status = LLMozLib::getInstance()->setSize( mWindowId, new_width, new_height ); +#if LL_LINUX + setlocale(LC_ALL, saved_locale.c_str() ); +#endif // LL_LINUX + if (status) setMediaSize(new_width, new_height); @@ -578,12 +623,20 @@ bool LLMediaImplLLMozLib::clearCookies() // virtual bool LLMediaImplLLMozLib::reset() { +#if LL_LINUX + std::string saved_locale = setlocale(LC_ALL, NULL); +#endif // LL_LINUX + LLMozLib::getInstance()->remObserver( mWindowId, this ); LLMozLib::getInstance()->destroyBrowserWindow( mWindowId ); mWindowId = 0; +#if LL_LINUX + setlocale(LC_ALL, saved_locale.c_str() ); +#endif // LL_LINUX + return true; } diff --git a/linden/indra/llmessage/llcurl.cpp b/linden/indra/llmessage/llcurl.cpp index badda64..a8bb46b 100644 --- a/linden/indra/llmessage/llcurl.cpp +++ b/linden/indra/llmessage/llcurl.cpp @@ -121,7 +121,6 @@ void LLCurl::Responder::error(U32 status, const std::string& reason) // virtual void LLCurl::Responder::result(const LLSD& content) { - llwarns << "Virtual Function not implemented" << llendl; } // virtual diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp index f8a87c4..e0a4169 100644 --- a/linden/indra/llwindow/llwindowsdl.cpp +++ b/linden/indra/llwindow/llwindowsdl.cpp @@ -48,6 +48,7 @@ extern "C" { # include "gtk/gtk.h" } +#include #endif // LL_GTK #if LL_LINUX || LL_SOLARIS diff --git a/linden/indra/newview/English.lproj/InfoPlist.strings b/linden/indra/newview/English.lproj/InfoPlist.strings index 5bca4ea..9ac8301 100644 --- a/linden/indra/newview/English.lproj/InfoPlist.strings +++ b/linden/indra/newview/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ CFBundleName = "Second Life"; -CFBundleShortVersionString = "Second Life version 1.19.1.0"; -CFBundleGetInfoString = "Second Life version 1.19.1.0, Copyright 2004-2008 Linden Research, Inc."; +CFBundleShortVersionString = "Second Life version 1.19.1.1"; +CFBundleGetInfoString = "Second Life version 1.19.1.1, Copyright 2004-2008 Linden Research, Inc."; diff --git a/linden/indra/newview/Info-SecondLife.plist b/linden/indra/newview/Info-SecondLife.plist index 6f8c464..2f53848 100644 --- a/linden/indra/newview/Info-SecondLife.plist +++ b/linden/indra/newview/Info-SecondLife.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.19.1.0 + 1.19.1.1 CSResourcesFileMapped diff --git a/linden/indra/newview/gpu_table.txt b/linden/indra/newview/gpu_table.txt index 066cd98..1d33fcb 100644 --- a/linden/indra/newview/gpu_table.txt +++ b/linden/indra/newview/gpu_table.txt @@ -39,8 +39,8 @@ ATI ASUS EAH26xx .*ATI.*ASUS.*EAH26.* 3 1 ATI ASUS X1xxx .*ATI.*ASUS.*X1.* 2 1 ATI Diamond X1xxx .*ATI.*Diamond.*X1.* 3 1 ATI Diamond X550 .*ATI.*Diamond X550.* 1 1 -ATI FireGL 5xxx .*ATI.*FireGL V5.* 1 0 -ATI FireGL .*ATI.*Fire.*GL.* 0 0 +ATI FireGL 5xxx .*ATI.*FireGL V5.* 1 1 +ATI FireGL .*ATI.*Fire.*GL.* 0 1 ATI FireMV .*ATI.*FireMV.* 0 0 ATI Generic .*ATI.*Generic.* 0 0 ATI Hercules 9800 .*ATI.*Hercules.*9800.* 1 1 @@ -176,11 +176,11 @@ NVIDIA GeForce Go 6 .*GeForce Go 6.* 1 1 NVIDIA GeForce PCX .*GeForce PCX.* 0 1 NVIDIA Generic .*NVIDIA.*Unknown.* 0 0 NVIDIA NV43 .*NVIDIA.*NV43.* 1 1 -NVIDIA Quadro2 .*Quadro2.* 0 0 -NVIDIA Quadro4 .*Quadro4.* 0 0 -NVIDIA Quadro DCC .*Quadro DCC.* 0 0 -NVIDIA Quadro FX .*Quadro FX.* 1 0 -NVIDIA Quadro NVS .*Quadro NVS.* 0 0 +NVIDIA Quadro2 .*Quadro2.* 0 1 +NVIDIA Quadro4 .*Quadro4.* 0 1 +NVIDIA Quadro DCC .*Quadro DCC.* 0 1 +NVIDIA Quadro FX .*Quadro FX.* 1 1 +NVIDIA Quadro NVS .*Quadro NVS.* 0 1 NVIDIA RIVA TNT .*RIVA TNT.* 0 0 S3 .*S3 Graphics.* 0 0 SiS SiS.* 0 0 diff --git a/linden/indra/newview/llcontroldef.cpp b/linden/indra/newview/llcontroldef.cpp index 22c5fac..aed0a82 100644 --- a/linden/indra/newview/llcontroldef.cpp +++ b/linden/indra/newview/llcontroldef.cpp @@ -1471,7 +1471,7 @@ void declare_settings() "URL to use for searches"); // Version 2 added [SESSION], must invalidate old saved settings. gSavedSettings.declareString("SearchURLSuffix2", - "m=[MATURE]&t=[TEEN]®ion=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION]", + "lang=[LANG]&m=[MATURE]&t=[TEEN]®ion=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION]", "Parameters added to end of search queries"); // Hide/Show search bar diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index 6d981cc..be2bb9a 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp @@ -3281,7 +3281,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach { if (iter->second == attachment) { - rez_action->mAttachPt = iter->first; + attach_pt = iter->first; break; } } diff --git a/linden/indra/newview/llmediaremotectrl.cpp b/linden/indra/newview/llmediaremotectrl.cpp index 401fc7e..61c0042 100644 --- a/linden/indra/newview/llmediaremotectrl.cpp +++ b/linden/indra/newview/llmediaremotectrl.cpp @@ -74,6 +74,9 @@ void LLMediaRemoteCtrl::build() BOOL LLMediaRemoteCtrl::postBuild() { + mControls = getChild("media_controls"); + llassert_always(mControls); + childSetAction("media_play",LLOverlayBar::toggleMediaPlay,this); childSetAction("music_play",LLOverlayBar::toggleMusicPlay,this); childSetAction("media_stop",LLOverlayBar::mediaStop,this); @@ -132,7 +135,7 @@ void LLMediaRemoteCtrl::setToolTip(const LLString& msg) LLString mime_type = LLMIMETypes::translate(LLViewerMedia::getMimeType()); LLString tool_tip = LLMIMETypes::findToolTip(LLViewerMedia::getMimeType()); LLString play_tip = LLMIMETypes::findPlayTip(LLViewerMedia::getMimeType()); - // childSetToolTip("media_stop", getString("stop_label") + "\n" + tool_tip); + // childSetToolTip("media_stop", mControls->getString("stop_label") + "\n" + tool_tip); childSetToolTip("media_icon", tool_tip); childSetToolTip("media_play", play_tip); } @@ -151,7 +154,7 @@ void LLMediaRemoteCtrl::enableMediaButtons() LLString media_type = "none/none"; // Put this in xui file - LLString media_url = getString("default_tooltip_label"); + LLString media_url = mControls->getString("default_tooltip_label"); LLParcel* parcel = gParcelMgr->getAgentParcel(); if (gSavedSettings.getBOOL("AudioStreamingVideo")) @@ -160,7 +163,7 @@ void LLMediaRemoteCtrl::enableMediaButtons() { // Set the tooltip // Put this text into xui file - media_url = parcel->getObscureMedia() ? getString("media_hidden_label") : parcel->getMediaURL(); + media_url = parcel->getObscureMedia() ? mControls->getString("media_hidden_label") : parcel->getMediaURL(); media_type = parcel->getMediaType(); play_media_enabled = true; diff --git a/linden/indra/newview/llmediaremotectrl.h b/linden/indra/newview/llmediaremotectrl.h index cacb2b3..07c2ee9 100644 --- a/linden/indra/newview/llmediaremotectrl.h +++ b/linden/indra/newview/llmediaremotectrl.h @@ -47,8 +47,11 @@ public: void enableMediaButtons(); + LLPanel* mControls; + static void onClickExpandBtn(void* user_data); static void* createVolumePanel(void* data); + virtual void setToolTip(const LLString& msg); protected: diff --git a/linden/indra/newview/llmimetypes.cpp b/linden/indra/newview/llmimetypes.cpp index 3fd0590..db00079 100644 --- a/linden/indra/newview/llmimetypes.cpp +++ b/linden/indra/newview/llmimetypes.cpp @@ -131,11 +131,15 @@ bool LLMIMETypes::parseMIMETypes(const LLString& xml_filename) } if (child->hasName("allow_resize")) { - child->getBoolValue( 1, (BOOL*)&( info.mAllowResize ) ); + BOOL allow_resize = FALSE; + child->getBoolValue( 1, &allow_resize ); + info.mAllowResize = (bool)allow_resize; } if (child->hasName("allow_looping")) { - child->getBoolValue( 1, (BOOL*)&( info.mAllowLooping ) ); + BOOL allow_looping = FALSE; + child->getBoolValue( 1, &allow_looping ); + info.mAllowLooping = (bool)allow_looping; } } sWidgetMap[set_name] = info; diff --git a/linden/indra/newview/llpaneldirfind.cpp b/linden/indra/newview/llpaneldirfind.cpp index 5d34d47..294c535 100644 --- a/linden/indra/newview/llpaneldirfind.cpp +++ b/linden/indra/newview/llpaneldirfind.cpp @@ -297,6 +297,18 @@ std::string LLPanelDirFindAll::getSearchURLSuffix(bool mature_in) substring = "[SESSION]"; url.replace(url.find(substring), substring.length(), session_string); + // set the currently selected lanaguage by asking the pref setting + std::string language_string = LLUI::sConfigGroup->getString( "Language" ); + if ( language_string == "default" ) + { + // if "default system language" setting used, ask again + // (we can't do this directly since it can vary if you install + // under one language and select a different one using prefs) + language_string = gSavedSettings.getString( "SystemLanguage" ); + } + std::string language_tag = "[LANG]"; + url.replace( url.find( language_tag ), language_tag.length(), language_string ); + return url; } diff --git a/linden/indra/newview/llpanellandmedia.cpp b/linden/indra/newview/llpanellandmedia.cpp index c8f79b5..cb8e8c5 100644 --- a/linden/indra/newview/llpanellandmedia.cpp +++ b/linden/indra/newview/llpanellandmedia.cpp @@ -124,7 +124,6 @@ BOOL LLPanelLandMedia::postBuild() mMediaTypeCombo = LLUICtrlFactory::getComboBoxByName(this, "media type"); childSetCommitCallback("media type", onCommitType, this); populateMIMECombo(); - mMediaTypeCombo->sortByName(); mMediaWidthCtrl = LLUICtrlFactory::getSpinnerByName(this, "media_size_width"); childSetCommitCallback("media_size_width", onCommitAny, this); @@ -275,14 +274,28 @@ void LLPanelLandMedia::refresh() void LLPanelLandMedia::populateMIMECombo() { + LLString default_mime_type = "none/none"; + LLString default_label; LLMIMETypes::mime_widget_set_map_t::const_iterator it; for (it = LLMIMETypes::sWidgetMap.begin(); it != LLMIMETypes::sWidgetMap.end(); ++it) { const LLString& mime_type = it->first; const LLMIMETypes::LLMIMEWidgetSet& info = it->second; - mMediaTypeCombo->add(info.mLabel, mime_type); + if (info.mDefaultMimeType == default_mime_type) + { + // Add this label at the end to make UI look cleaner + default_label = info.mLabel; + } + else + { + mMediaTypeCombo->add(info.mLabel, mime_type); + } } + // *TODO: The sort order is based on std::map key, which is + // ASCII-sorted and is wrong in other languages. TRANSLATE + mMediaTypeCombo->add( default_label, default_mime_type, ADD_BOTTOM ); } + void LLPanelLandMedia::setMediaType(const LLString& mime_type) { LLParcel *parcel = mParcel->getParcel(); @@ -298,7 +311,11 @@ void LLPanelLandMedia::setMediaURL(const LLString& media_url) { mMediaURLEdit->setText(media_url); mMediaURLEdit->onCommit(); +} +LLString LLPanelLandMedia::getMediaURL() +{ + return mMediaURLEdit->getText(); } // static @@ -314,8 +331,9 @@ void LLPanelLandMedia::onCommitType(LLUICtrl *ctrl, void *userdata) onCommitAny(ctrl, userdata); } + // static -void LLPanelLandMedia::onCommitAny(LLUICtrl *ctrl, void *userdata) +void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) { LLPanelLandMedia *self = (LLPanelLandMedia *)userdata; diff --git a/linden/indra/newview/llpanellandmedia.h b/linden/indra/newview/llpanellandmedia.h index 8efa0f5..b2b0abe 100644 --- a/linden/indra/newview/llpanellandmedia.h +++ b/linden/indra/newview/llpanellandmedia.h @@ -48,7 +48,7 @@ public: void refresh(); void setMediaType(const LLString& media_type); void setMediaURL(const LLString& media_type); - const LLString& getMediaURL() { return mMediaURLEdit->getText(); } + LLString getMediaURL(); private: void populateMIMECombo(); diff --git a/linden/indra/newview/llpreviewtexture.cpp b/linden/indra/newview/llpreviewtexture.cpp index b054db5..b8fa668 100644 --- a/linden/indra/newview/llpreviewtexture.cpp +++ b/linden/indra/newview/llpreviewtexture.cpp @@ -291,7 +291,7 @@ void LLPreviewTexture::draw() // virtual -BOOL LLPreviewTexture::canSaveAs() +BOOL LLPreviewTexture::canSaveAs() const { return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset(); } diff --git a/linden/indra/newview/llpreviewtexture.h b/linden/indra/newview/llpreviewtexture.h index 4930368..d1e9bb0 100644 --- a/linden/indra/newview/llpreviewtexture.h +++ b/linden/indra/newview/llpreviewtexture.h @@ -59,7 +59,7 @@ public: virtual void draw(); - virtual BOOL canSaveAs(); + virtual BOOL canSaveAs() const; virtual void saveAs(); virtual void loadAsset(); diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index 1cc28d2..1b02970 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp @@ -91,7 +91,7 @@ private: LLUUID mID; }; - class HTTPGetResponder : public LLCurl::Responder + class HTTPGetResponder : public LLHTTPClient::Responder { public: HTTPGetResponder(LLTextureFetch* fetcher, const LLUUID& id) diff --git a/linden/indra/newview/llviewerimage.h b/linden/indra/newview/llviewerimage.h index 732c773..c90a672 100644 --- a/linden/indra/newview/llviewerimage.h +++ b/linden/indra/newview/llviewerimage.h @@ -285,7 +285,7 @@ public: void setKnownDrawSize(S32 width, S32 height); void setIsMissingAsset(); - BOOL isMissingAsset() { return mIsMissingAsset; } + BOOL isMissingAsset() const { return mIsMissingAsset; } bool hasCallbacks() { return mLoadedCallbackList.empty() ? false : true; } diff --git a/linden/indra/newview/llviewermedia.cpp b/linden/indra/newview/llviewermedia.cpp index 0cc4e2d..0429a3c 100644 --- a/linden/indra/newview/llviewermedia.cpp +++ b/linden/indra/newview/llviewermedia.cpp @@ -147,6 +147,9 @@ void LLViewerMediaImpl::play(const std::string& media_url, return; } + // Store the URL and Mime Type + mMediaURL = media_url; + if ((media_width != 0) && (media_height != 0)) { mMediaSource->setRequestedMediaSize(media_width, media_height); @@ -157,10 +160,6 @@ void LLViewerMediaImpl::play(const std::string& media_url, mMediaSource->addObserver( this ); mMediaSource->navigateTo( media_url ); mMediaSource->addCommand(LLMediaBase::COMMAND_START); - - // Store the URL and Mime Type - mMediaURL = media_url; - } void LLViewerMediaImpl::stop() diff --git a/linden/indra/newview/llviewerparcelmedia.cpp b/linden/indra/newview/llviewerparcelmedia.cpp index cd0197c..2925b8d 100644 --- a/linden/indra/newview/llviewerparcelmedia.cpp +++ b/linden/indra/newview/llviewerparcelmedia.cpp @@ -274,7 +274,8 @@ void LLViewerParcelMedia::processParcelMediaCommandMessage( LLMessageSystem *msg } else // play - if( command == PARCEL_MEDIA_COMMAND_PLAY ) + if(( command == PARCEL_MEDIA_COMMAND_PLAY ) || + ( command == PARCEL_MEDIA_COMMAND_LOOP )) { if (LLViewerMedia::isMediaPaused()) { @@ -287,16 +288,6 @@ void LLViewerParcelMedia::processParcelMediaCommandMessage( LLMessageSystem *msg } } else - // loop - if( command == PARCEL_MEDIA_COMMAND_LOOP ) - { - //llinfos << ">>> LLMediaEngine::process_parcel_media with command = " <<( '0' + command ) << llendl; - - // huh? what is play? - //convertImageAndLoadUrl( play ); - //convertImageAndLoadUrl( true, false, std::string() ); - } - else // unload if( command == PARCEL_MEDIA_COMMAND_UNLOAD ) { @@ -354,10 +345,19 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg, void * (parcel->getMediaHeight() == media_height) && (parcel->getMediaAutoScale() == media_auto_scale) && (parcel->getMediaLoop() == media_loop)); - } - if (!same) - LLViewerMedia::play(media_url, media_type, media_id, - media_auto_scale, media_width, media_height, - media_loop); + if (!same) + { + // temporarily store these new values in the parcel + parcel->setMediaURL(media_url); + parcel->setMediaType(media_type.c_str()); + parcel->setMediaID(media_id); + parcel->setMediaWidth(media_width); + parcel->setMediaHeight(media_height); + parcel->setMediaAutoScale(media_auto_scale); + parcel->setMediaLoop(media_loop); + + play(parcel); + } + } } diff --git a/linden/indra/newview/llviewerpartsource.cpp b/linden/indra/newview/llviewerpartsource.cpp index f54495a..d0ef2aa 100644 --- a/linden/indra/newview/llviewerpartsource.cpp +++ b/linden/indra/newview/llviewerpartsource.cpp @@ -84,7 +84,10 @@ LLUUID LLViewerPartSource::getImageUUID() const } void LLViewerPartSource::setStart() { - mDelay = 99 ; + //cancel delaying to start a new added particle source, because some particle source just emits for a short time. + //however, canceling this might cause overall particle emmitting fluctuate for a while because the new added source jumps to + //the current particle emmitting settings instantly. -->bao + mDelay = 0 ; //99 } LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp) : diff --git a/linden/indra/newview/res/newViewRes.rc b/linden/indra/newview/res/newViewRes.rc index fafbc2d..ed4539f 100644 --- a/linden/indra/newview/res/newViewRes.rc +++ b/linden/indra/newview/res/newViewRes.rc @@ -231,8 +231,8 @@ TOOLMEDIAOPEN CURSOR "toolmediaopen.cur" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,19,1,0 - PRODUCTVERSION 1,19,1,0 + FILEVERSION 1,19,1,1 + PRODUCTVERSION 1,19,1,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -249,12 +249,12 @@ BEGIN BEGIN VALUE "CompanyName", "Linden Lab" VALUE "FileDescription", "Second Life" - VALUE "FileVersion", "1.19.1.0" + VALUE "FileVersion", "1.19.1.1" VALUE "InternalName", "Second Life" VALUE "LegalCopyright", "Copyright © 2001-2008, Linden Research, Inc." VALUE "OriginalFilename", "SecondLife.exe" VALUE "ProductName", "Second Life" - VALUE "ProductVersion", "1.19.1.0" + VALUE "ProductVersion", "1.19.1.1" END END BLOCK "VarFileInfo" diff --git a/linden/indra/newview/skins/xui/en-us/floater_about_land.xml b/linden/indra/newview/skins/xui/en-us/floater_about_land.xml index 7e7c2f8..13a70eb 100644 --- a/linden/indra/newview/skins/xui/en-us/floater_about_land.xml +++ b/linden/indra/newview/skins/xui/en-us/floater_about_land.xml @@ -657,7 +657,19 @@ - + Media URL: + + +