From d60f16540dba5616cd8260046b44ebc2a1047065 Mon Sep 17 00:00:00 2001 From: Josh Bell Date: Thu, 4 Jan 2007 02:04:29 +0000 Subject: svn merge svn+ssh://svn.lindenlab.com/svn/linden/release@56429 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance@56431 This turned up the following "lost" changes: llapp.cpp (from maintenance r55371) - SIGPIPE fix, possibly llfontgl.cpp (from maintenance r50207) - whitespace only inventorybridge.cpp (property - non-executable) skins/xui/*/* (from maintenance r55380) - XML processing instruction went AWOL --- indra/newview/lldirpicker.cpp | 2 +- indra/newview/lldrawpool.cpp | 4 -- indra/newview/lldrawpool.h | 2 +- indra/newview/llfilepicker.cpp | 6 +- indra/newview/llinventorybridge.cpp | 0 indra/newview/lloverlaybar.cpp | 10 +-- indra/newview/llpanelavatar.cpp | 27 ++++++-- indra/newview/llpanelavatar.h | 2 + indra/newview/llpanelclassified.cpp | 29 ++++++--- indra/newview/llpanelclassified.h | 3 + indra/newview/llpanelface.cpp | 101 ----------------------------- indra/newview/llpanelface.h | 52 --------------- indra/newview/llstartup.cpp | 47 +------------- indra/newview/llurlwhitelist.cpp | 18 ----- indra/newview/llviewerdisplay.cpp | 2 +- indra/newview/llviewerobject.cpp | 44 ++++--------- indra/newview/llviewerobjectlist.cpp | 42 ++---------- indra/newview/llviewerparcelmgr.cpp | 9 +-- indra/newview/llviewerprecompiledheaders.h | 12 +++- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/llvoavatar.cpp | 1 - indra/newview/llweb.cpp | 11 ---- 22 files changed, 87 insertions(+), 339 deletions(-) mode change 100755 => 100644 indra/newview/llinventorybridge.cpp (limited to 'indra/newview') diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp index 5a01bfdc84..0628d54449 100644 --- a/indra/newview/lldirpicker.cpp +++ b/indra/newview/lldirpicker.cpp @@ -56,7 +56,7 @@ BOOL LLDirPicker::getDir(LLString* filename) memset(&bi, 0, sizeof(bi)); bi.ulFlags = BIF_USENEWUI; - bi.hwndOwner = llwindow_get_hwnd(gViewerWindow->getWindow());; + bi.hwndOwner = (HWND)gViewerWindow->getPlatformWindow(); bi.lpszTitle = NULL; ::OleInitialize(NULL); diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 0ef9eed7a3..899d49f380 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -20,7 +20,6 @@ #include "lldrawpoolbump.h" #include "lldrawpoolclouds.h" #include "lldrawpoolground.h" -#include "lldrawpoolmedia.h" #include "lldrawpoolsimple.h" #include "lldrawpoolsky.h" #include "lldrawpoolstars.h" @@ -93,9 +92,6 @@ LLDrawPool *LLDrawPool::createPool(const U32 type, LLViewerImage *tex0) case POOL_BUMP: poolp = new LLDrawPoolBump(tex0); break; - case POOL_MEDIA: - poolp = new LLDrawPoolMedia(tex0); - break; case POOL_HUD: poolp = new LLDrawPoolHUD(); break; diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h index a66d7d14c7..c00cbf14e4 100644 --- a/indra/newview/lldrawpool.h +++ b/indra/newview/lldrawpool.h @@ -163,7 +163,7 @@ public: POOL_GROUND, POOL_TERRAIN, POOL_SIMPLE, - POOL_MEDIA, + POOL_MEDIA, // unused POOL_BUMP, POOL_AVATAR, POOL_TREE, diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 776a2e4dc2..587f1eb253 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -130,7 +130,7 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter) // don't provide default file selection mFilesW[0] = '\0'; - mOFN.hwndOwner = llwindow_get_hwnd(gViewerWindow->getWindow()); + mOFN.hwndOwner = (HWND)gViewerWindow->getPlatformWindow(); mOFN.lpstrFile = mFilesW; mOFN.nMaxFile = SINGLE_FILENAME_BUFFER_SIZE; mOFN.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR ; @@ -167,7 +167,7 @@ BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter) // don't provide default file selection mFilesW[0] = '\0'; - mOFN.hwndOwner = llwindow_get_hwnd(gViewerWindow->getWindow()); + mOFN.hwndOwner = (HWND)gViewerWindow->getPlatformWindow(); mOFN.lpstrFile = mFilesW; mOFN.nFilterIndex = 1; mOFN.nMaxFile = FILENAME_BUFFER_SIZE; @@ -238,7 +238,7 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const char* filename) { mFilesW[0] = '\0'; } - mOFN.hwndOwner = llwindow_get_hwnd(gViewerWindow->getWindow()); + mOFN.hwndOwner = (HWND)gViewerWindow->getPlatformWindow(); switch( filter ) { diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp old mode 100755 new mode 100644 diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp index ed99cbe855..32ae42363b 100644 --- a/indra/newview/lloverlaybar.cpp +++ b/indra/newview/lloverlaybar.cpp @@ -534,16 +534,8 @@ void LLOverlayBar::onPlayButtonPressed( const LLMediaRemoteCtrlObserver::EventTy LLParcel* parcel = gParcelMgr->getAgentParcel(); if (parcel) { - bool web_url = (parcel->getParcelFlag(PF_URL_WEB_PAGE) || parcel->getParcelFlag(PF_URL_RAW_HTML)); LLString path( "" ); - #if LL_MOZILLA_ENABLED - LLString mozilla_subdir; - if (web_url) - { - path = get_mozilla_path(); - } - #endif - LLMediaEngine::getInstance ()->convertImageAndLoadUrl( true, web_url, path ); + LLMediaEngine::getInstance ()->convertImageAndLoadUrl( true, false, path ); mMediaRemote->setTransportState ( LLMediaRemoteCtrl::Play, TRUE ); } }; diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index b013befca5..6f812e9e35 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -824,6 +824,20 @@ void LLPanelAvatarClassified::enableControls(BOOL self) { } +BOOL LLPanelAvatarClassified::titleIsValid() +{ + LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); + for (S32 i = 0; i < tabs->getTabCount(); i++) + { + LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); + if ( ! panel->titleIsValid() ) + { + return FALSE; + } + } + + return TRUE; +} void LLPanelAvatarClassified::apply() { @@ -1624,12 +1638,15 @@ void LLPanelAvatar::onClickOK(void *userdata) { self->sendAvatarPropertiesUpdate(); - self->mPanelClassified->apply(); - - LLFloaterAvatarInfo *infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID); - if (infop) + if ( self->mPanelClassified->titleIsValid() ) { - infop->close(); + self->mPanelClassified->apply(); + + LLFloaterAvatarInfo *infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID); + if (infop) + { + infop->close(); + } } } } diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h index d6b0d235b0..a17dc69cfc 100644 --- a/indra/newview/llpanelavatar.h +++ b/indra/newview/llpanelavatar.h @@ -176,6 +176,8 @@ public: void apply(); void enableControls(BOOL own_avatar); + BOOL titleIsValid(); + // Delete all the classified sub-panels from the tab container void deleteClassifiedPanels(); diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 7c84d0f6a5..dbd97fc7d1 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -224,6 +224,24 @@ BOOL LLPanelClassified::postBuild() return TRUE; } +BOOL LLPanelClassified::titleIsValid() +{ + // Disallow leading spaces, punctuation, etc. that screw up + // sort order. + const LLString& name = mNameEditor->getText(); + if (name.empty()) + { + gViewerWindow->alertXml("BlankClassifiedName"); + return FALSE; + } + if (!isalnum(name[0])) + { + gViewerWindow->alertXml("ClassifiedMustBeAlphanumeric"); + return FALSE; + } + + return TRUE; +} void LLPanelClassified::apply() { @@ -602,17 +620,10 @@ void LLPanelClassified::onClickUpdate(void* data) // Disallow leading spaces, punctuation, etc. that screw up // sort order. - const LLString& name = self->mNameEditor->getText(); - if (name.empty()) + if ( ! self->titleIsValid() ) { - gViewerWindow->alertXml("BlankClassifiedName"); return; - } - if (!isalnum(name[0])) - { - gViewerWindow->alertXml("ClassifiedMustBeAlphanumeric"); - return; - } + }; // if already paid for, just do the update if (self->mPaidFor) diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h index e3e7a299bf..6d5be1df09 100644 --- a/indra/newview/llpanelclassified.h +++ b/indra/newview/llpanelclassified.h @@ -55,6 +55,9 @@ public: static void setClickThrough(const LLUUID& classified_id, S32 teleport, S32 map, S32 profile); + // check that the title is valid (E.G. starts with a number or letter) + BOOL titleIsValid(); + // Schedules the panel to request data // from the server next time it is drawn. void markForServerRequest(); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index d023be66f2..d9ef9e4c13 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -51,13 +51,6 @@ BOOL LLPanelFace::postBuild() LLTextureCtrl* mTextureCtrl; LLColorSwatchCtrl* mColorSwatch; - #if LL_MOZILLA_ENABLED - LLTextBox* mLabelMediaType; - LLComboBox* mComboMediaType; - LLTextBox* mLabelMediaURL; - LLLineEditor* mLineMediaURL; - #endif - LLTextBox* mLabelTexGen; LLComboBox* mComboTexGen; @@ -111,36 +104,6 @@ BOOL LLPanelFace::postBuild() mColorSwatch->setCanApplyImmediately(TRUE); } -#if LL_MOZILLA_ENABLED - mLabelMediaType = LLUICtrlFactory::getTextBoxByName(this,"web_label"); - if(mLabelMediaType) - mLabelMediaType->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP); - - mComboMediaType = LLUICtrlFactory::getComboBoxByName(this,"web_type_combo"); - if(mComboMediaType) - { - mComboMediaType->setCommitCallback(onCommitMediaInfo); - mComboMediaType->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP); - mComboMediaType->setCallbackUserData( this ); - mComboMediaType->add("None"); - mComboMediaType->add("Web page"); - } - - mLabelMediaURL = LLUICtrlFactory::getTextBoxByName(this,"url_label"); - if(mLabelMediaURL) - { - mLabelMediaURL->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP); - } - - mLineMediaURL = LLUICtrlFactory::getLineEditorByName(this,"url_line"); - if(mLineMediaURL) - { - mLineMediaURL->setCommitCallback(onCommitMediaInfo); - mLineMediaURL->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP); - mLineMediaURL->setCommitOnFocusLost(TRUE); - mLineMediaURL->setCallbackUserData( this ); - } -#endif mLabelColorTransp = LLUICtrlFactory::getTextBoxByName(this,"color trans"); if(mLabelColorTransp) { @@ -250,19 +213,6 @@ void LLPanelFace::sendFullbright() gSelectMgr->selectionSetFullbright( fullbright ); } -#if LL_MOZILLA_ENABLED -void LLPanelFace::sendMediaInfo() -{ - if (mComboMediaType) - { - U8 media_type = (U8) mComboMediaType->getCurrentIndex(); - std::string media_url = mLineMediaURL->getText(); - - gSelectMgr->selectionSetMediaTypeAndURL( media_type, media_url ); - } -} -#endif - void LLPanelFace::sendColor() { @@ -397,48 +347,6 @@ void LLPanelFace::getState() //mBtnAutoFix->setEnabled ( editable ); } childSetEnabled("button apply",editable); - //mBtnApply->setEnabled( editable ); - - #if LL_MOZILLA_ENABLED - if (gSavedSettings.getBOOL("UseWebPagesOnPrims")) - { - // Web page selection - mLabelMediaType->setEnabled(editable); - mLabelMediaType->setToolTip("Experimental"); - - // JAMESDEBUG - use viewerobject mMedia->mMediaType when transmission is wired in - U8 media_type = LLViewerObject::MEDIA_TYPE_NONE; - bool same = gSelectMgr->selectionGetMediaType( &media_type ); - mComboMediaType->setTentative( !same ); - mComboMediaType->setEnabled( editable ); - mComboMediaType->setCurrentByIndex( (S32)media_type ); - mComboMediaType->setToolTip("Experimental"); - - mLabelMediaURL->setEnabled(editable); - mLabelMediaURL->setToolTip("Experimental"); - - const std::string& media_url = objectp->getMediaURL(); - mLineMediaURL->setEnabled( editable ); - mLineMediaURL->setText( media_url ); - mLineMediaURL->setToolTip("Experimental"); - } - else - { - mLabelMediaType->setEnabled(FALSE); - mLabelMediaType->setToolTip("Disabled because 'Show web pages on objects' preference is disabled"); - - mComboMediaType->setEnabled( FALSE ); - mComboMediaType->setCurrentByIndex( LLViewerObject::MEDIA_TYPE_NONE ); - mComboMediaType->setToolTip("Disabled because 'Show web pages on objects' preference is disabled"); - - mLabelMediaURL->setEnabled(FALSE); - mLabelMediaURL->setToolTip("Disabled because 'Show web pages on objects' preference is disabled"); - - mLineMediaURL->setEnabled( FALSE ); - mLineMediaURL->setText( "" ); - mLineMediaURL->setToolTip("Disabled because 'Show web pages on objects' preference is disabled"); - } - #endif // Texture LLUUID id; @@ -895,15 +803,6 @@ void LLPanelFace::onCommitTextureInfo( LLUICtrl* ctrl, void* userdata ) self->sendTextureInfo(); } -#if LL_MOZILLA_ENABLED -// static -void LLPanelFace::onCommitMediaInfo(LLUICtrl* ctrl, void* data) -{ - LLPanelFace* self = (LLPanelFace*) data; - self->sendMediaInfo(); -} -#endif - // Commit the number of repeats per meter // static void LLPanelFace::onClickApply(void* userdata) diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 03f361d23c..dc58caff2a 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -49,9 +49,6 @@ protected: void sendTexGen(); // applies and sends bump map void sendShiny(); // applies and sends shininess void sendFullbright(); // applies and sends full bright - #if LL_MOZILLA_ENABLED - void sendMediaInfo(); // web page settings and URL - #endif // this function is to return TRUE if the dra should succeed. static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item, void* ud); @@ -68,9 +65,6 @@ protected: static void onCommitTexGen( LLUICtrl* ctrl, void* userdata); static void onCommitShiny( LLUICtrl* ctrl, void* userdata); static void onCommitFullbright( LLUICtrl* ctrl, void* userdata); - #if LL_MOZILLA_ENABLED - static void onCommitMediaInfo( LLUICtrl* ctrl, void* data); - #endif static void onClickApply(void*); static void onClickAutoFix(void*); @@ -85,52 +79,6 @@ protected: static F32 valueTexGen(LLViewerObject* object, S32 face); static F32 valueShiny(LLViewerObject* object, S32 face); static F32 valueFullbright(LLViewerObject* object, S32 face); - -protected: - //LLTextureCtrl* mTextureCtrl; - //LLColorSwatchCtrl* mColorSwatch; - - //#if LL_MOZILLA_ENABLED - //LLTextBox* mLabelMediaType; - //LLComboBox* mComboMediaType; - //LLTextBox* mLabelMediaURL; - //LLLineEditor* mLineMediaURL; - //#endif - - //LLTextBox *mLabelTexScale; - //LLSpinCtrl *mCtrlTexScaleS; - //LLSpinCtrl *mCtrlTexScaleT; - - //LLCheckBoxCtrl *mCheckFlipScaleS; - //LLCheckBoxCtrl *mCheckFlipScaleT; - - //LLTextBox *mLabelTexOffset; - //LLSpinCtrl *mCtrlTexOffsetS; - //LLSpinCtrl *mCtrlTexOffsetT; - - //LLTextBox *mLabelTexRotation; - //LLSpinCtrl *mCtrlTexRotation; - - //LLTextBox* mLabelTexGen; - //LLComboBox* mComboTexGen; - - //LLTextBox* mLabelShininess; - //LLComboBox* mComboShininess; - - //LLTextBox* mLabelBumpiness; - //LLComboBox* mComboBumpiness; - - //LLCheckBoxCtrl *mCheckFullbright; - // - //LLTextBox* mLabelColorTransp; - //LLSpinCtrl* mCtrlColorTransp; // transparency = 1 - alpha - - //LLTextBox* mLabelRepeatsPerMeter; - //LLSpinCtrl* mCtrlRepeatsPerMeter; - //LLButton* mBtnApply; - - //LLTextBox* mLabelTexAutoFix; - //LLButton* mBtnAutoFix; }; #endif diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index fea8924b78..74c1d44329 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -11,9 +11,9 @@ #include "llstartup.h" #if LL_WINDOWS -#include // _spawnl() +# include // _spawnl() #else -#include // mkdir() +# include // mkdir() #endif #include "audioengine.h" @@ -108,7 +108,6 @@ #include "llviewerdisplay.h" #include "llviewergesture.h" #include "llviewerimagelist.h" -#include "llviewermedialist.h" #include "llviewermenu.h" #include "llviewermessage.h" #include "llviewernetwork.h" @@ -497,7 +496,7 @@ BOOL idle_startup() #if LL_WINDOWS // FMOD on Windows needs the window handle to stop playing audio // when window is minimized. JC - void* window_handle = (void*)llwindow_get_hwnd(gViewerWindow->getWindow()); + void* window_handle = (HWND)gViewerWindow->getPlatformWindow(); #else void* window_handle = NULL; #endif @@ -1854,46 +1853,6 @@ BOOL idle_startup() } #endif - // Get list of URLs approved for usage - // CP: removed since they're not useful without Mozilla enabled - #if LL_MOZILLA_ENABLED - LLUrlWhiteList::getInstance()->load(); - #endif - - // initialize mozilla if we're using web page on a prim or not using an external browser for floater - BOOL use_web_pages_on_prims = gSavedSettings.getBOOL("UseWebPagesOnPrims"); - BOOL use_external_browser = gSavedSettings.getBOOL("UseExternalBrowser"); - -use_external_browser = false; - - if (use_web_pages_on_prims || !use_external_browser) - { - //llinfos << "Initializing web browser...." << llendl; - //set_startup_status(0.48f, "Initializing web browser...", gAgent.mMOTD.c_str()); - //display_startup(); - // initialize mozilla - LLString mozilla_path = gDirUtilp->getExecutableDir(); - mozilla_path.append( gDirUtilp->getDirDelimiter() ); -#if LL_DEBUG - mozilla_path.append( "mozilla_debug" ); -#else - mozilla_path.append( "mozilla" ); -#endif - -#if LL_MOZILLA_ENABLED - if (!gMozillaInitialized) - { - void* platform_window = gViewerWindow->getPlatformWindow(); - mozilla_init_embedding(platform_window, mozilla_path); - } -#endif - - if (use_web_pages_on_prims) - { - gMediaList = new LLViewerMediaList(2); - } - } - gStartupState++; return do_normal_idle; } diff --git a/indra/newview/llurlwhitelist.cpp b/indra/newview/llurlwhitelist.cpp index d582d2d19f..65f7229abf 100644 --- a/indra/newview/llurlwhitelist.cpp +++ b/indra/newview/llurlwhitelist.cpp @@ -200,22 +200,4 @@ bool LLUrlWhiteList::getNext ( LLString& valueOut ) bool LLUrlWhiteList::containsMatch ( const LLString& patternIn ) { return false; - - // CP: removed since they're not useful without Mozilla enabled - #if LL_MOZILLA_ENABLED - LLString pattern = url_cleanup(patternIn); - - if (pattern.empty()) return false; - - LLStringListIter iter = std::find ( mUrlList.begin (), mUrlList.end (), pattern ); - - if ( iter != mUrlList.end () ) - { - return true; - } - else - { - return false; - }; - #endif } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 3a38ba52ee..1a4ffadeee 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -183,7 +183,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield) static F32 last_update_time = 0.f; if ((gFrameTimeSeconds - last_update_time) > 1.f) { - InvalidateRect(llwindow_get_hwnd(gViewerWindow->getWindow()), NULL, FALSE); + InvalidateRect((HWND)gViewerWindow->getPlatformWindow(), NULL, FALSE); last_update_time = gFrameTimeSeconds; } #elif LL_DARWIN diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 2d97c6f2a4..7db94eb972 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -49,7 +49,6 @@ #include "llviewercamera.h" #include "llviewerimagelist.h" #include "llviewerinventory.h" -#include "llviewermedialist.h" #include "llviewerobjectlist.h" #include "llviewerparceloverlay.h" #include "llviewerpartsource.h" @@ -3266,16 +3265,8 @@ void LLViewerObject::setMediaType(U8 media_type) else if (mMedia->mMediaType != media_type) { mMedia->mMediaType = media_type; - if (gMediaList) - { - // we're using web pages on prims - gMediaList->updatedMediaURL(this); - } - if (mDrawable.notNull()) - { - // move this object's faces into LLDrawPoolMedia - gPipeline.markTextured(mDrawable); - } + + // TODO: update materials with new image } } @@ -3300,30 +3291,15 @@ void LLViewerObject::setMediaURL(const LLString& media_url) mMedia = new LLViewerObjectMedia; mMedia->mMediaURL = media_url; mMedia->mPassedWhitelist = FALSE; - if (gMediaList) - { - gMediaList->addedMediaURL(this); - } - if (mDrawable.notNull()) - { - // move this object's faces into LLDrawPoolMedia - gPipeline.markTextured(mDrawable); - } + + // TODO: update materials with new image } else if (mMedia->mMediaURL != media_url) { mMedia->mMediaURL = media_url; mMedia->mPassedWhitelist = FALSE; - if (gMediaList) - { - // we're using web pages on prims - gMediaList->updatedMediaURL(this); - } - if (mDrawable.notNull()) - { - // move this object's faces into LLDrawPoolMedia - gPipeline.markTextured(mDrawable); - } + + // TODO: update materials with new image } } @@ -4137,6 +4113,12 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow } } + if ( mAudioSourcep ) + { + gAudiop->cleanupAudioSource(mAudioSourcep); + mAudioSourcep = NULL; + } + getAudioSource(owner_id); if (mAudioSourcep) @@ -4153,8 +4135,6 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow LLAudioSource *LLViewerObject::getAudioSource(const LLUUID& owner_id) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - if (!mAudioSourcep) { // Arbitrary low gain for a sound that's not playing. diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index e1fed12563..e2c1bc0695 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -44,7 +44,6 @@ #include "lldatapacker.h" #include #include "object_flags.h" -#include "llviewermedialist.h" extern BOOL gVelocityInterpolate; extern BOOL gPingInterpolate; @@ -178,11 +177,13 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, U32 i, const EObjectUpdateType update_type, LLDataPacker* dpp, - BOOL justCreated) + BOOL just_created) { LLMessageSystem* msg = gMessageSystem; - U32 pum_flags = objectp->processUpdateMessage(msg, user_data, i, update_type, dpp); + // ignore returned flags + objectp->processUpdateMessage(msg, user_data, i, update_type, dpp); + if (objectp->isDead()) { // The update failed @@ -196,7 +197,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, // Update the image levels of textures for this object. objectp->updateTextures(gAgent); - if (justCreated) + if (just_created) { gPipeline.addObject(objectp); } @@ -207,7 +208,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort()); // If we're just wandering around, don't create new objects selected. - if (justCreated + if (just_created && update_type != OUT_TERSE_IMPROVED && objectp->mCreateSelected) { @@ -223,37 +224,6 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, gViewerWindow->getWindow()->decBusyCount(); gViewerWindow->getWindow()->setCursor( UI_CURSOR_ARROW ); } - - if (gMediaList) - { - // we're using web pages on prims - if (pum_flags & LLViewerObject::MEDIA_URL_ADDED) - { - //llwarns << "WEBONPRIM media url added " << objectp->getMediaURL() << llendl; - gMediaList->addedMediaURL(objectp); - } - - if (pum_flags & LLViewerObject::MEDIA_URL_UPDATED) - { - //llwarns << "WEBONPRIM media url updated " << objectp->getMediaURL() << llendl; - gMediaList->updatedMediaURL(objectp); - } - - if (pum_flags & LLViewerObject::MEDIA_URL_REMOVED) - { - //llwarns << "WEBONPRIM media url removed " << objectp->getMediaURL() << llendl; - gMediaList->removedMediaURL(objectp); - } - - // Make sure we get moved in or out of LLDrawPoolMedia, as needed - if (pum_flags & (LLViewerObject::MEDIA_URL_ADDED | LLViewerObject::MEDIA_URL_REMOVED | LLViewerObject::MEDIA_URL_UPDATED)) - { - if (objectp->mDrawable.notNull()) - { - gPipeline.markTextured(objectp->mDrawable); - } - } - } } void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 8e7edab927..b29b49b399 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1866,15 +1866,8 @@ void prepare_video(const LLParcel *parcel) void start_video(const LLParcel *parcel) { prepare_video(parcel); - bool web_url = (parcel->getParcelFlag(PF_URL_WEB_PAGE) || parcel->getParcelFlag(PF_URL_RAW_HTML)); std::string path( "" ); - #if LL_MOZILLA_ENABLED - if (web_url) - { - path = get_mozilla_path(); - } - #endif - LLMediaEngine::getInstance ()->convertImageAndLoadUrl ( true, web_url, path); + LLMediaEngine::getInstance ()->convertImageAndLoadUrl ( true, false, path); } void stop_video() diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index 5c50fef58e..76efdb8595 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -15,10 +15,18 @@ // in viewer. // It is used to precompile headers for improved build speed. -// Reference headers your program requires here: #include "linden_common.h" -// The rest of the common system headers go here: +// We may want to take the windows.h include out, but it used to be in +// linden_common.h, and hence in all the libraries. This is better. JC +#if LL_WINDOWS + // Limit Windows API to small and manageable set. + // If you get undefined symbols, find the appropriate + // Windows header file and include that in your .cpp file. + #define WIN32_LEAN_AND_MEAN + #include + #include +#endif // Work around stupid Microsoft STL warning #ifdef LL_WINDOWS diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ea73a969d6..331502c28a 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1023,7 +1023,7 @@ BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S #if LL_WINDOWS if (gNoRender) { - HWND window_handle = llwindow_get_hwnd(window); + HWND window_handle = (HWND)window->getPlatformWindow(); PAINTSTRUCT ps; HDC hdc; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d1e4de5478..d1bcacb5c4 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -35,7 +35,6 @@ #include "lldrawable.h" #include "lldrawpoolavatar.h" #include "lldrawpoolalpha.h" -#include "lldrawpoolmedia.h" #include "lldrawpoolbump.h" #include "lldriverparam.h" #include "lleditingmotion.h" diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index d57bb7da82..1f87cf225d 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -19,18 +19,7 @@ // static void LLWeb::loadURL(std::string url) { -#if LL_MOZILLA_ENABLED - if (gSavedSettings.getBOOL("UseExternalBrowser")) - { - loadURLExternal(url); - } - else - { - LLFloaterHTML::show((void*)url.c_str()); - } -#else loadURLExternal(url); -#endif } -- cgit v1.2.3