From e2049c332b9b834e843249c1ae0ba8542491940f Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Sun, 24 Oct 2010 16:01:57 +0200 Subject: CTS-323: (part 1 of 2) Don't cast pointers to U32 --- indra/llmath/llsimdmath.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h index 9377bfdb53..1be1b7a55f 100644 --- a/indra/llmath/llsimdmath.h +++ b/indra/llmath/llsimdmath.h @@ -41,16 +41,18 @@ #error SSE2 not enabled. LLVector4a and related class will not compile. #endif +#include + template T* LL_NEXT_ALIGNED_ADDRESS(T* address) { return reinterpret_cast( - (reinterpret_cast(address) + 0xF) & ~0xF); + (reinterpret_cast(address) + 0xF) & ~0xF); } template T* LL_NEXT_ALIGNED_ADDRESS_64(T* address) { return reinterpret_cast( - (reinterpret_cast(address) + 0x3F) & ~0x3F); + (reinterpret_cast(address) + 0x3F) & ~0x3F); } #if LL_LINUX || LL_DARWIN -- cgit v1.2.3 From b3541777921142572f735c4b028e4fba91ae80a0 Mon Sep 17 00:00:00 2001 From: Tofu Buzzard Date: Mon, 15 Nov 2010 16:48:10 +0000 Subject: VWR-23839 Pulseaudio support is crashing web media on some new Linux distros --- indra/cmake/PulseAudio.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/cmake/PulseAudio.cmake b/indra/cmake/PulseAudio.cmake index e918de0198..360a971058 100644 --- a/indra/cmake/PulseAudio.cmake +++ b/indra/cmake/PulseAudio.cmake @@ -1,7 +1,7 @@ # -*- cmake -*- include(Prebuilt) -set(PULSEAUDIO ON CACHE BOOL "Build with PulseAudio support, if available.") +set(PULSEAUDIO OFF CACHE BOOL "Build with PulseAudio support, if available.") if (PULSEAUDIO) if (STANDALONE) -- cgit v1.2.3 From ee538257d316696382d12ea222294a4b8786dc84 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Fri, 10 Dec 2010 13:01:01 +0200 Subject: STORM-622 FIXED Texture picker screws up when multiple textures are opened. Reason: In viewer 2 ability was added to set aspect ratio while previewing textures. It was achieved by resizing the floater containing a texture, instead of proportionally resize the texture. The problem happened when multifloater was opened with texture preview floaters and for some floaters textures were not loaded yet. After texture was loaded, the floater (in multifloater) which contained just loaded texture resized to fit with the new texture's size and texture preview floaters screwed up from the multifloater. Solution: Proportionally resizing a texture inside the floater instead of the floater itself. Also two issues was fixed: 1. when floater resized the texture streched in the floater and lost its proportions. 2. When docking texture floater to the multifloater, multifloater resized to fit with docked floater and other texture lost their proportions. --- indra/newview/llpreview.cpp | 3 +- indra/newview/llpreviewtexture.cpp | 77 ++------------------------------------ 2 files changed, 6 insertions(+), 74 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index 69542764d2..a90f23d637 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -454,12 +454,13 @@ LLMultiPreview::LLMultiPreview() { // start with a rect in the top-left corner ; will get resized LLRect rect; - rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 200, 200); + rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 200, 400); setRect(rect); } setTitle(LLTrans::getString("MultiPreviewTitle")); buildTabContainer(); setCanResize(TRUE); + mAutoResize = FALSE; } void LLMultiPreview::onOpen(const LLSD& key) diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index fd6b326ef1..7657cccd4e 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -318,7 +318,7 @@ void LLPreviewTexture::reshape(S32 width, S32 height, BOOL called_from_parent) } } - mClientRect.setLeftTopAndSize(client_rect.getCenterX() - (client_width / 2), client_rect.getCenterY() + (client_height / 2), client_width, client_height); + mClientRect.setLeftTopAndSize(client_rect.getCenterX() - (client_width / 2), client_rect.getCenterY() + (client_height / 2), client_width, client_height); } @@ -400,7 +400,6 @@ void LLPreviewTexture::updateDimensions() { return; } - mUpdateDimensions = FALSE; @@ -408,80 +407,12 @@ void LLPreviewTexture::updateDimensions() getChild("dimensions")->setTextArg("[HEIGHT]", llformat("%d", mImage->getFullHeight())); - LLRect dim_rect(getChildView("dimensions")->getRect()); - - S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE; - - // add space for dimensions and aspect ratio - S32 info_height = dim_rect.mTop + CLIENT_RECT_VPAD; - - S32 screen_width = gFloaterView->getSnapRect().getWidth(); - S32 screen_height = gFloaterView->getSnapRect().getHeight(); - - S32 max_image_width = screen_width - 2*horiz_pad; - S32 max_image_height = screen_height - (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD) - - (PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height); - - S32 client_width = llmin(max_image_width,mImage->getFullWidth()); - S32 client_height = llmin(max_image_height,mImage->getFullHeight()); - - if (mAspectRatio > 0.f) - { - if(mAspectRatio > 1.f) - { - client_height = llceil((F32)client_width / mAspectRatio); - if(client_height > max_image_height) - { - client_height = max_image_height; - client_width = llceil((F32)client_height * mAspectRatio); - } - } - else//mAspectRatio < 1.f - { - client_width = llceil((F32)client_height * mAspectRatio); - if(client_width > max_image_width) - { - client_width = max_image_width; - client_height = llceil((F32)client_width / mAspectRatio); - } - } - } - else - { - - if(client_height > max_image_height) - { - F32 ratio = (F32)max_image_height/client_height; - client_height = max_image_height; - client_width = llceil((F32)client_height * ratio); - } - - if(client_width > max_image_width) - { - F32 ratio = (F32)max_image_width/client_width; - client_width = max_image_width; - client_height = llceil((F32)client_width * ratio); - } - } - - //now back to whole floater - S32 floater_width = llmax(getMinWidth(),client_width + 2*horiz_pad); - S32 floater_height = llmax(getMinHeight(),client_height + (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD) - + (PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height)); - //reshape floater - reshape( floater_width, floater_height ); - gFloaterView->adjustToFitScreen(this, FALSE); + reshape(getRect().getWidth(), getRect().getHeight()); - //setup image rect... - LLRect client_rect(horiz_pad, getRect().getHeight(), getRect().getWidth() - horiz_pad, 0); - client_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD); - client_rect.mBottom += PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height ; - - mClientRect.setLeftTopAndSize(client_rect.getCenterX() - (client_width / 2), client_rect.getCenterY() + (client_height / 2), client_width, client_height); + gFloaterView->adjustToFitScreen(this, FALSE); - // Hide the aspect ratio label if the window is too narrow - // Assumes the label should be to the right of the dimensions + LLRect dim_rect(getChildView("dimensions")->getRect()); LLRect aspect_label_rect(getChildView("aspect_ratio")->getRect()); getChildView("aspect_ratio")->setVisible( dim_rect.mRight < aspect_label_rect.mLeft); } -- cgit v1.2.3 From a42b6acd6ae677a4347771baa49d75dc560269a3 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 10 Dec 2010 16:30:45 +0200 Subject: STORM-431 FIXED Hot keys did't work with autocompletion in search field. --- indra/newview/llsearchcombobox.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp index db531b5695..6558c9a7fa 100644 --- a/indra/newview/llsearchcombobox.cpp +++ b/indra/newview/llsearchcombobox.cpp @@ -131,6 +131,9 @@ void LLSearchComboBox::focusTextEntry() if (mTextEntry) { gFocusMgr.setKeyboardFocus(mTextEntry); + + // Let the editor handle editing hotkeys (STORM-431). + LLEditMenuHandler::gEditMenuHandler = mTextEntry; } } -- cgit v1.2.3 From 18a18f5985c76adaed040b4bdcba15cc251dbeb5 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Fri, 10 Dec 2010 19:13:25 +0200 Subject: STORM-693 FIXED Preview thumbnails in the Edit Wearable and Edit Body Parts panels now follow opacity settings for inactive floater. When the floater is active the thumbnails are opaque. The behavior is similar to texture control's. --- indra/newview/llscrollingpanelparam.cpp | 8 ++++++-- indra/newview/lltoolmorph.cpp | 4 ++-- indra/newview/lltoolmorph.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp index 05b273cd29..f8c20dada0 100644 --- a/indra/newview/llscrollingpanelparam.cpp +++ b/indra/newview/llscrollingpanelparam.cpp @@ -165,12 +165,16 @@ void LLScrollingPanelParam::draw() getChildView("max param text")->setVisible( FALSE ); LLPanel::draw(); + // If we're in a focused floater, don't apply the floater's alpha to visual param hint, + // making its behavior similar to texture controls'. + F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); + // Draw the hints over the "less" and "more" buttons. gGL.pushUIMatrix(); { const LLRect& r = mHintMin->getRect(); gGL.translateUI((F32)r.mLeft, (F32)r.mBottom, 0.f); - mHintMin->draw(); + mHintMin->draw(alpha); } gGL.popUIMatrix(); @@ -178,7 +182,7 @@ void LLScrollingPanelParam::draw() { const LLRect& r = mHintMax->getRect(); gGL.translateUI((F32)r.mLeft, (F32)r.mBottom, 0.f); - mHintMax->draw(); + mHintMax->draw(alpha); } gGL.popUIMatrix(); diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index ca80a1db79..964b17d3a6 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -244,13 +244,13 @@ BOOL LLVisualParamHint::render() //----------------------------------------------------------------------------- // draw() //----------------------------------------------------------------------------- -void LLVisualParamHint::draw() +void LLVisualParamHint::draw(F32 alpha) { if (!mIsVisible) return; gGL.getTexUnit(0)->bind(this); - gGL.color4f(1.f, 1.f, 1.f, 1.f); + gGL.color4f(1.f, 1.f, 1.f, alpha); LLGLSUIDefault gls_ui; gGL.begin(LLRender::QUADS); diff --git a/indra/newview/lltoolmorph.h b/indra/newview/lltoolmorph.h index 59201233ae..a6889be151 100644 --- a/indra/newview/lltoolmorph.h +++ b/indra/newview/lltoolmorph.h @@ -68,7 +68,7 @@ public: BOOL render(); void requestUpdate( S32 delay_frames ) {mNeedsUpdate = TRUE; mDelayFrames = delay_frames; } void setUpdateDelayFrames( S32 delay_frames ) { mDelayFrames = delay_frames; } - void draw(); + void draw(F32 alpha); LLViewerVisualParam* getVisualParam() { return mVisualParam; } F32 getVisualParamWeight() { return mVisualParamWeight; } -- cgit v1.2.3 From 26d063f5521f80bc7eca214fb8338fee4e87f301 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Fri, 10 Dec 2010 19:54:07 +0200 Subject: STORM-378 FIX REVERTED Backed out changeset: 1bce3dd882df --- indra/newview/llfloaterpostcard.cpp | 4 +++- indra/newview/llfloatersnapshot.cpp | 7 +++++++ indra/newview/llviewermenufile.cpp | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp index 054ab4538b..dd0b1d999c 100644 --- a/indra/newview/llfloaterpostcard.cpp +++ b/indra/newview/llfloaterpostcard.cpp @@ -366,7 +366,9 @@ void LLFloaterPostcard::sendPostcard() { gAssetStorage->storeAssetData(mTransactionID, LLAssetType::AT_IMAGE_JPEG, &uploadCallback, (void *)this, FALSE); } - + + // give user feedback of the event + gViewerWindow->playSnapshotAnimAndSound(); LLUploadDialog::modalUploadDialog(getString("upload_message")); // don't destroy the window until the upload is done diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 1aba5ef92f..b310256874 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1006,6 +1006,7 @@ void LLSnapshotLivePreview::saveTexture() LLFloaterPerms::getEveryonePerms(), "Snapshot : " + pos_string, callback, expected_upload_cost, userdata); + gViewerWindow->playSnapshotAnimAndSound(); } else { @@ -1027,6 +1028,10 @@ BOOL LLSnapshotLivePreview::saveLocal() mDataSize = 0; updateSnapshot(FALSE, FALSE); + if(success) + { + gViewerWindow->playSnapshotAnimAndSound(); + } return success; } @@ -1046,6 +1051,8 @@ void LLSnapshotLivePreview::saveWeb() LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(gAgentCamera.getCameraPositionGlobal(), boost::bind(&LLSnapshotLivePreview::regionNameCallback, this, jpg, metadata, _1, _2, _3, _4)); + + gViewerWindow->playSnapshotAnimAndSound(); } void LLSnapshotLivePreview::regionNameCallback(LLImageJPEG* snapshot, LLSD& metadata, const std::string& name, S32 x, S32 y, S32 z) diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 048691696b..237aa39e6e 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -404,6 +404,8 @@ class LLFileTakeSnapshotToDisk : public view_listener_t gSavedSettings.getBOOL("RenderUIInSnapshot"), FALSE)) { + gViewerWindow->playSnapshotAnimAndSound(); + LLPointer formatted; switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))) { -- cgit v1.2.3 From bae83c7eac98229271a6baf4c961fe167c74a597 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Fri, 10 Dec 2010 19:55:47 +0200 Subject: STORM-378 ADDITIONAL FIX REVERTED Backed out changeset: f858446d207f --- indra/newview/llfloatersnapshot.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index b310256874..0931f77281 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -908,8 +908,6 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal(); previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame } - - gViewerWindow->playSnapshotAnimAndSound(); } previewp->getWindow()->decBusyCount(); // only show fullscreen preview when in freeze frame mode -- cgit v1.2.3 From 8ab943f470552dd9469d6025bcd359a67ad5513e Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 10 Dec 2010 15:41:14 -0800 Subject: fix working directory in install script and remove dependency on open option --args which is 10.6 only. Also fix erroneous check in process launcher which was mistakenly reporting a failed execution of the new updater script. --- indra/llcommon/llprocesslauncher.cpp | 9 +-------- indra/viewer_components/updater/scripts/darwin/update_install | 3 ++- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llprocesslauncher.cpp b/indra/llcommon/llprocesslauncher.cpp index 81e5f8820d..4b0f6b0251 100644 --- a/indra/llcommon/llprocesslauncher.cpp +++ b/indra/llcommon/llprocesslauncher.cpp @@ -265,14 +265,7 @@ int LLProcessLauncher::launch(void) delete[] fake_argv; mProcessID = id; - - // At this point, the child process will have been created (since that's how vfork works -- the child borrowed our execution context until it forked) - // If the process doesn't exist at this point, the exec failed. - if(!isRunning()) - { - result = -1; - } - + return result; } diff --git a/indra/viewer_components/updater/scripts/darwin/update_install b/indra/viewer_components/updater/scripts/darwin/update_install index b174b3570a..bfc12ada11 100755 --- a/indra/viewer_components/updater/scripts/darwin/update_install +++ b/indra/viewer_components/updater/scripts/darwin/update_install @@ -5,5 +5,6 @@ # to a marker file which should be created if the installer fails.q # -open ../Resources/mac-updater.app --args -dmg "$1" -name "Second Life Viewer 2" -marker "$2" +cd "$(dirname $0)" +../Resources/mac-updater.app/Contents/MacOS/mac-updater -dmg "$1" -name "Second Life Viewer 2" -marker "$2" & exit 0 -- cgit v1.2.3 From ac2253abc430093ae15708bfb582448fb36c00ed Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 10 Dec 2010 16:11:16 -0800 Subject: fix quoting in script to work with spaces in directory names. --- indra/viewer_components/updater/scripts/darwin/update_install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/viewer_components/updater/scripts/darwin/update_install b/indra/viewer_components/updater/scripts/darwin/update_install index bfc12ada11..9df382f119 100755 --- a/indra/viewer_components/updater/scripts/darwin/update_install +++ b/indra/viewer_components/updater/scripts/darwin/update_install @@ -5,6 +5,6 @@ # to a marker file which should be created if the installer fails.q # -cd "$(dirname $0)" +cd "$(dirname "$0")" ../Resources/mac-updater.app/Contents/MacOS/mac-updater -dmg "$1" -name "Second Life Viewer 2" -marker "$2" & exit 0 -- cgit v1.2.3 From 4f9e6ff2ffcd3c277399d35e5765b8525b3e1b53 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Fri, 10 Dec 2010 17:27:17 -0800 Subject: Defensive coding for linux updater script for consistency with alain's work on the mac script. Should be safer if the user is installing to a path with spaces in it. --- indra/viewer_components/updater/scripts/linux/update_install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/viewer_components/updater/scripts/linux/update_install b/indra/viewer_components/updater/scripts/linux/update_install index fef5ef7d09..a271926e25 100755 --- a/indra/viewer_components/updater/scripts/linux/update_install +++ b/indra/viewer_components/updater/scripts/linux/update_install @@ -1,10 +1,10 @@ #! /bin/bash -INSTALL_DIR=$(cd "$(dirname $0)/.." ; pwd) -export LD_LIBRARY_PATH=$INSTALL_DIR/lib +INSTALL_DIR=$(cd "$(dirname "$0")/.." ; pwd) +export LD_LIBRARY_PATH="$INSTALL_DIR/lib" bin/linux-updater.bin --file "$1" --dest "$INSTALL_DIR" --name "Second Life Viewer 2" --stringsdir "$INSTALL_DIR/skins/default/xui/en" --stringsfile "strings.xml" if [ $? -ne 0 ] - then touch $2 + then touch "$2" fi -rm -f $1 +rm -f "$1" -- cgit v1.2.3 From 1d686283a467808eda2d7bd8a2c109d4924151f2 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Sat, 11 Dec 2010 17:24:39 +0200 Subject: STORM-391 WIP Removed unused methods. --- indra/newview/llscreenchannel.cpp | 5 ----- indra/newview/llscreenchannel.h | 3 --- 2 files changed, 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 9e0e10d66f..64e75a6cb2 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -605,10 +605,6 @@ void LLScreenChannel::showToastsBottom() mHiddenToastsNum++; } } - else - { - closeOverflowToastPanel(); - } } //-------------------------------------------------------------------------- @@ -731,7 +727,6 @@ void LLNotificationsUI::LLScreenChannel::startToastTimer(LLToast* toast) //-------------------------------------------------------------------------- void LLScreenChannel::hideToastsFromScreen() { - closeOverflowToastPanel(); for(std::vector::iterator it = mToastList.begin(); it != mToastList.end(); it++) (*it).toast->setVisible(FALSE); } diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index 023a65d872..c536a21779 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -81,9 +81,6 @@ public: // show all toasts in a channel virtual void redrawToasts() {}; - virtual void closeOverflowToastPanel() {}; - virtual void hideOverflowToastPanel() {}; - // Channel's behavior-functions // set whether a channel will control hovering inside itself or not -- cgit v1.2.3 From 0d764afb9c0ba5dd3aeed67370f8d5c7d9b7cf45 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Sat, 11 Dec 2010 18:02:59 +0200 Subject: STORM-391 FIXED Dismiss toasts that don't fit on screen. Make sure older toasts don't appear after newer ones fade out. --- indra/newview/llscreenchannel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 64e75a6cb2..0eeb89792b 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -595,14 +595,13 @@ void LLScreenChannel::showToastsBottom() } } + // Dismiss toasts we don't have space for (STORM-391). if(it != mToastList.rend()) { mHiddenToastsNum = 0; for(; it != mToastList.rend(); it++) { - (*it).toast->stopTimer(); - (*it).toast->setVisible(FALSE); - mHiddenToastsNum++; + (*it).toast->hide(); } } } -- cgit v1.2.3 From 872e4dcdde979981d35889152dbee827775c4b7c Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Sat, 11 Dec 2010 18:54:33 +0200 Subject: STORM-766 ADDITIONAL FIX Made day cycle image in the advanced sky editor honor floater opacity settings. --- indra/newview/skins/default/xui/en/floater_windlight_options.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_windlight_options.xml b/indra/newview/skins/default/xui/en/floater_windlight_options.xml index 85a5be369c..249ad95c41 100644 --- a/indra/newview/skins/default/xui/en/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/en/floater_windlight_options.xml @@ -594,6 +594,7 @@ left_delta="14" top_pad="10" name="SkyDayCycle" + use_draw_context_alpha="false" width="148" /> Date: Mon, 13 Dec 2010 13:17:48 +0200 Subject: STORM-229 FIXED Fixed long loading times and stalling of Viewer while loading big scripts or pasting a lot of text into script. The bug was fixed by Satomi Ahn. Here is the description of what causes the problem from her comment in ticket: "Disabling the loading of syntax keywords in LLScriptEdCore::postBuild() removes the freeze (and with it: syntax highlighting). So it obviously comes from the parsing of the text. I also noticed something else: by adding a llwarn in LLTextEditor::updateSegments(), I saw that this function was called a lot of times when loading a script, roughly once for each line in the script (naively I would have thought only necessary to update when finished... or to only update the new line). My llwarn was in the "if (mReflowIndex < S32_MAX && mKeywords.isLoaded())", which means that, at each call, the text is actually parsed for all keywords... so the parsing of the script becomes quadratic instead of linear!!!" - To fix this, Satomi added a flag depending on which parsing is disabled when it is not necessary. --- indra/llui/lltexteditor.cpp | 10 ++++++++-- indra/llui/lltexteditor.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 94bf716e7d..5a46c7c98e 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -277,6 +277,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : mHPad += UI_TEXTEDITOR_LINE_NUMBER_MARGIN; updateRects(); } + + mParseOnTheFly = TRUE; } void LLTextEditor::initFromParams( const LLTextEditor::Params& p) @@ -324,8 +326,10 @@ void LLTextEditor::setText(const LLStringExplicit &utf8str, const LLStyle::Param blockUndo(); deselect(); - + + mParseOnTheFly = FALSE; LLTextBase::setText(utf8str, input_params); + mParseOnTheFly = TRUE; resetDirty(); } @@ -1367,6 +1371,7 @@ void LLTextEditor::pastePrimary() // paste from primary (itsprimary==true) or clipboard (itsprimary==false) void LLTextEditor::pasteHelper(bool is_primary) { + mParseOnTheFly = FALSE; bool can_paste_it; if (is_primary) { @@ -1450,6 +1455,7 @@ void LLTextEditor::pasteHelper(bool is_primary) deselect(); onKeyStroke(); + mParseOnTheFly = TRUE; } @@ -2385,7 +2391,7 @@ void LLTextEditor::loadKeywords(const std::string& filename, void LLTextEditor::updateSegments() { - if (mReflowIndex < S32_MAX && mKeywords.isLoaded()) + if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly) { LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); // HACK: No non-ascii keywords for now diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 58ecefdccb..9e4b95003b 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -315,6 +315,7 @@ private: BOOL mAllowEmbeddedItems; bool mShowContextMenu; + bool mParseOnTheFly; LLUUID mSourceID; -- cgit v1.2.3 From 37cd8ad2a27188538c29fdcce58cf8ec6185231c Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 13 Dec 2010 13:38:46 +0200 Subject: STORM-781 FIXED Added support for editing multiple scripts within inventory of the same object using external editor. The bug was caused by using the object ID as temporary file name for editing script, which of course didn't work for multiple scripts in the same object inventory. The fix is to use MD5("object id" + "script inventory item id") for the file name. --- indra/newview/llpreviewscript.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 330e809c53..d0ebf047e8 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -2034,7 +2034,17 @@ bool LLLiveLSLEditor::writeToFile(const std::string& filename) std::string LLLiveLSLEditor::getTmpFileName() { - return std::string(LLFile::tmpdir()) + "sl_script_" + mObjectUUID.asString() + ".lsl"; + // Take script inventory item id (within the object inventory) + // to consideration so that it's possible to edit multiple scripts + // in the same object inventory simultaneously (STORM-781). + std::string script_id = mObjectUUID.asString() + "_" + mItemUUID.asString(); + + // Use MD5 sum to make the file name shorter and not exceed maximum path length. + char script_id_hash_str[33]; /* Flawfinder: ignore */ + LLMD5 script_id_hash((const U8 *)script_id.c_str()); + script_id_hash.hex_digest(script_id_hash_str); + + return std::string(LLFile::tmpdir()) + "sl_script_" + script_id_hash_str + ".lsl"; } void LLLiveLSLEditor::uploadAssetViaCaps(const std::string& url, -- cgit v1.2.3 From 31d401e1c3ccedfc06b9efda51923d050029cfc9 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 13 Dec 2010 18:38:12 +0200 Subject: STORM-401 FIXED Add recepients of teleport offers to the recent people list. --- indra/newview/llviewermessage.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b7f72a2e4c..7313463f1b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6306,6 +6306,9 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response) payload["from_id"] = target_id; payload["SUPPRESS_TOAST"] = true; LLNotificationsUtil::add("TeleportOfferSent", args, payload); + + // Add the recepient to the recent people list. + LLRecentPeople::instance().add(target_id); } } gAgent.sendReliableMessage(); -- cgit v1.2.3 From 29dc24a3ea8d6f3d3aa83fd6b22921937d0dd430 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Tue, 14 Dec 2010 14:53:51 +0200 Subject: STORM-713 FIXED XML/UI issues in llTextBox - As the class LLToastNotifyPanel is deprecated, made the class LLToastScriptTextbox derived directly from LLToastPanel. - Added callback for ignore button. Now LLToastScriptTextbox has its own XML, therefore it's not needed to dynamically create toast panel. Since LLToastNotifyPanel is deprecated all new notification toasts should be created this way. --- indra/newview/llscriptfloater.h | 4 +- indra/newview/lltoastscripttextbox.cpp | 16 +++++- indra/newview/lltoastscripttextbox.h | 13 +++-- .../skins/default/xui/en/panel_notify_textbox.xml | 66 +++++++++++++++------- 4 files changed, 69 insertions(+), 30 deletions(-) (limited to 'indra') diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index dc52baa115..8e959a3d0e 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -30,7 +30,7 @@ #include "lltransientdockablefloater.h" #include "llnotificationptr.h" -class LLToastNotifyPanel; +class LLToastPanel; /** * Handles script notifications ("ScriptDialog" and "ScriptDialogGroup") @@ -206,7 +206,7 @@ protected: private: bool isScriptTextbox(LLNotificationPtr notification); - LLToastNotifyPanel* mScriptForm; + LLToastPanel* mScriptForm; LLUUID mNotificationId; LLUUID mObjectId; bool mSaveFloaterPosition; diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp index c013f521cc..2529ec865a 100644 --- a/indra/newview/lltoastscripttextbox.cpp +++ b/indra/newview/lltoastscripttextbox.cpp @@ -46,11 +46,16 @@ const S32 LLToastScriptTextbox::DEFAULT_MESSAGE_MAX_LINE_COUNT= 7; -LLToastScriptTextbox::LLToastScriptTextbox(LLNotificationPtr& notification) -: LLToastNotifyPanel(notification) +LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification) +: LLToastPanel(notification) { buildFromFile( "panel_notify_textbox.xml"); + LLTextEditor* text_editorp = getChild("text_editor_box"); + text_editorp->setValue(notification->getMessage()); + + getChild("ignore_btn")->setClickedCallback(boost::bind(&LLToastScriptTextbox::onClickIgnore, this)); + const LLSD& payload = notification->getPayload(); //message body @@ -107,3 +112,10 @@ void LLToastScriptTextbox::onClickSubmit() llwarns << response << llendl; } } + +void LLToastScriptTextbox::onClickIgnore() +{ + LLSD response = mNotification->getResponseTemplate(); + mNotification->respond(response); + close(); +} diff --git a/indra/newview/lltoastscripttextbox.h b/indra/newview/lltoastscripttextbox.h index ae3b545e0a..8e69d8834d 100644 --- a/indra/newview/lltoastscripttextbox.h +++ b/indra/newview/lltoastscripttextbox.h @@ -30,13 +30,11 @@ #include "lltoastnotifypanel.h" #include "llnotificationptr.h" -class LLButton; - /** * Toast panel for scripted llTextbox notifications. */ class LLToastScriptTextbox -: public LLToastNotifyPanel +: public LLToastPanel { public: void close(); @@ -46,12 +44,15 @@ public: // Non-transient messages. You can specify non-default button // layouts (like one for script dialogs) by passing various // numbers in for "layout". - LLToastScriptTextbox(LLNotificationPtr& notification); + LLToastScriptTextbox(const LLNotificationPtr& notification); /*virtual*/ ~LLToastScriptTextbox(); -protected: - void onClickSubmit(); + private: + + void onClickSubmit(); + void onClickIgnore(); + static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT; }; diff --git a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml index 4634eeed46..d5b6057233 100644 --- a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml +++ b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml @@ -1,7 +1,7 @@ + width="305"> + + width="285" + word_wrap="true" + parse_url="false" > - parse_urls="false" -