summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDessie Linden <dessie@lindenlab.com>2010-12-16 14:35:08 -0800
committerDessie Linden <dessie@lindenlab.com>2010-12-16 14:35:08 -0800
commit8a6cb0399230953dda23b47edec07e5082e5dafd (patch)
treecf775805e18cff0ac6ba01160e15de126eb95e6c
parentaa212430857e59e317d65b61748365a2fc4eb0ba (diff)
parent73962e2134035855def0177db171d8eddaa193cb (diff)
Merge
-rw-r--r--BuildParams3
-rw-r--r--doc/contributions.txt1
-rw-r--r--indra/cmake/PulseAudio.cmake2
-rw-r--r--indra/llcommon/llprocesslauncher.cpp9
-rw-r--r--indra/llui/lltexteditor.cpp10
-rw-r--r--indra/llui/lltexteditor.h1
-rw-r--r--indra/newview/llfloaterpostcard.cpp4
-rw-r--r--indra/newview/llfloatersnapshot.cpp9
-rw-r--r--indra/newview/llinventorybridge.cpp30
-rw-r--r--indra/newview/llpanelprofile.cpp131
-rw-r--r--indra/newview/llpanelprofile.h30
-rw-r--r--indra/newview/llpaneltopinfobar.cpp9
-rw-r--r--indra/newview/llpreview.cpp3
-rw-r--r--indra/newview/llpreviewscript.cpp12
-rw-r--r--indra/newview/llpreviewtexture.cpp77
-rw-r--r--indra/newview/llscreenchannel.cpp10
-rw-r--r--indra/newview/llscreenchannel.h3
-rw-r--r--indra/newview/llscriptfloater.h4
-rw-r--r--indra/newview/llscrollingpanelparam.cpp8
-rw-r--r--indra/newview/llsearchcombobox.cpp3
-rw-r--r--indra/newview/lltoastscripttextbox.cpp16
-rw-r--r--indra/newview/lltoastscripttextbox.h13
-rw-r--r--indra/newview/lltoolmorph.cpp4
-rw-r--r--indra/newview/lltoolmorph.h2
-rw-r--r--indra/newview/llviewermenufile.cpp2
-rw-r--r--indra/newview/llviewermessage.cpp3
-rw-r--r--indra/newview/skins/default/xui/en/floater_windlight_options.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_notify_textbox.xml66
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile.xml2
-rw-r--r--indra/viewer_components/updater/scripts/darwin/update_install3
-rw-r--r--indra/viewer_components/updater/scripts/linux/update_install8
31 files changed, 312 insertions, 167 deletions
diff --git a/BuildParams b/BuildParams
index e2d97211ed..a676ece1ea 100644
--- a/BuildParams
+++ b/BuildParams
@@ -46,9 +46,6 @@ viewer-beta.viewer_channel = "Second Life Beta Viewer"
viewer-beta.login_channel = "Second Life Beta Viewer"
viewer-beta.build_debug_release_separately = true
viewer-beta.build_viewer_update_version_manager = true
-# Settings to test new code ticket service
-viewer-beta.codeticket_server_url = "http://pdp75.lindenlab.com:8000/codeticket/linden/"
-viewer-beta.codeticket_add_context = true
# ========================================
# Viewer Release
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 4c33834a46..67683204e2 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -607,6 +607,7 @@ Sammy Frederix
VWR-6186
Satomi Ahn
STORM-501
+ STORM-229
Scrippy Scofield
VWR-3748
Seg Baphomet
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)
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/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;
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..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
@@ -1006,6 +1004,7 @@ void LLSnapshotLivePreview::saveTexture()
LLFloaterPerms::getEveryonePerms(),
"Snapshot : " + pos_string,
callback, expected_upload_cost, userdata);
+ gViewerWindow->playSnapshotAnimAndSound();
}
else
{
@@ -1027,6 +1026,10 @@ BOOL LLSnapshotLivePreview::saveLocal()
mDataSize = 0;
updateSnapshot(FALSE, FALSE);
+ if(success)
+ {
+ gViewerWindow->playSnapshotAnimAndSound();
+ }
return success;
}
@@ -1046,6 +1049,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/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 5ba87423c7..ab0acbae50 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -104,6 +104,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_
bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv*);
bool confirm_attachment_rez(const LLSD& notification, const LLSD& response);
void teleport_via_landmark(const LLUUID& asset_id);
+static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit);
// +=================================================+
// | LLInvFVBridge |
@@ -2341,6 +2342,10 @@ void LLFolderBridge::pasteFromClipboard()
LLInventoryModel* model = getInventoryModel();
if(model && isClipboardPasteable())
{
+ const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
+ const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
+ const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
+
const LLUUID parent_id(mUUID);
LLDynamicArray<LLUUID> objects;
@@ -2353,7 +2358,14 @@ void LLFolderBridge::pasteFromClipboard()
LLInventoryItem *item = model->getItem(item_id);
if (item)
{
- if(LLInventoryClipboard::instance().isCutMode())
+ if (move_is_into_current_outfit || move_is_into_outfit)
+ {
+ if (can_move_to_outfit(item, move_is_into_current_outfit))
+ {
+ dropToOutfit(item, move_is_into_current_outfit);
+ }
+ }
+ else if(LLInventoryClipboard::instance().isCutMode())
{
// move_inventory_item() is not enough,
//we have to update inventory locally too
@@ -2381,9 +2393,13 @@ void LLFolderBridge::pasteFromClipboard()
void LLFolderBridge::pasteLinkFromClipboard()
{
- const LLInventoryModel* model = getInventoryModel();
+ LLInventoryModel* model = getInventoryModel();
if(model)
{
+ const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
+ const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
+ const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
+
const LLUUID parent_id(mUUID);
LLDynamicArray<LLUUID> objects;
@@ -2393,7 +2409,15 @@ void LLFolderBridge::pasteLinkFromClipboard()
++iter)
{
const LLUUID &object_id = (*iter);
- if (LLInventoryCategory *cat = model->getCategory(object_id))
+ if (move_is_into_current_outfit || move_is_into_outfit)
+ {
+ LLInventoryItem *item = model->getItem(object_id);
+ if (item && can_move_to_outfit(item, move_is_into_current_outfit))
+ {
+ dropToOutfit(item, move_is_into_current_outfit);
+ }
+ }
+ else if (LLInventoryCategory *cat = model->getCategory(object_id))
{
const std::string empty_description = "";
link_inventory_item(
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 6038ab20d8..b035d7d473 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -114,11 +114,109 @@ public:
LLAgentHandler gAgentHandler;
+//-- LLPanelProfile::ChildStack begins ----------------------------------------
+LLPanelProfile::ChildStack::ChildStack()
+: mParent(NULL)
+{
+}
+
+void LLPanelProfile::ChildStack::setParent(LLPanel* parent)
+{
+ llassert_always(parent != NULL);
+ mParent = parent;
+}
+
+/// Save current parent's child views and remove them from the child list.
+bool LLPanelProfile::ChildStack::push()
+{
+ view_list_t vlist = *mParent->getChildList();
+
+ for (view_list_t::const_iterator it = vlist.begin(); it != vlist.end(); ++it)
+ {
+ LLView* viewp = *it;
+ mParent->removeChild(viewp);
+ }
+
+ mStack.push_back(vlist);
+ dump();
+ return true;
+}
+
+/// Restore saved children (adding them back to the child list).
+bool LLPanelProfile::ChildStack::pop()
+{
+ if (mStack.size() == 0)
+ {
+ llwarns << "Empty stack" << llendl;
+ llassert(mStack.size() == 0);
+ return false;
+ }
+
+ view_list_t& top = mStack.back();
+ for (view_list_t::const_iterator it = top.begin(); it != top.end(); ++it)
+ {
+ LLView* viewp = *it;
+ mParent->addChild(viewp);
+ }
+
+ mStack.pop_back();
+ dump();
+ return true;
+}
+
+/// Temporarily add all saved children back.
+void LLPanelProfile::ChildStack::preParentReshape()
+{
+ mSavedStack = mStack;
+ while(mStack.size() > 0)
+ {
+ pop();
+ }
+}
+
+/// Add the temporarily saved children back.
+void LLPanelProfile::ChildStack::postParentReshape()
+{
+ mStack = mSavedStack;
+ mSavedStack = stack_t();
+
+ for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it)
+ {
+ const view_list_t& vlist = (*stack_it);
+ for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it)
+ {
+ LLView* viewp = *list_it;
+ lldebugs << "removing " << viewp->getName() << llendl;
+ mParent->removeChild(viewp);
+ }
+ }
+}
+
+void LLPanelProfile::ChildStack::dump()
+{
+ unsigned lvl = 0;
+ lldebugs << "child stack dump:" << llendl;
+ for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it, ++lvl)
+ {
+ std::ostringstream dbg_line;
+ dbg_line << "lvl #" << lvl << ":";
+ const view_list_t& vlist = (*stack_it);
+ for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it)
+ {
+ dbg_line << " " << (*list_it)->getName();
+ }
+ lldebugs << dbg_line.str() << llendl;
+ }
+}
+
+//-- LLPanelProfile::ChildStack ends ------------------------------------------
+
LLPanelProfile::LLPanelProfile()
: LLPanel()
, mTabCtrl(NULL)
, mAvatarId(LLUUID::null)
{
+ mChildStack.setParent(this);
}
BOOL LLPanelProfile::postBuild()
@@ -136,6 +234,15 @@ BOOL LLPanelProfile::postBuild()
return TRUE;
}
+// virtual
+void LLPanelProfile::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ // Temporarily add saved children back and reshape them.
+ mChildStack.preParentReshape();
+ LLPanel::reshape(width, height, called_from_parent);
+ mChildStack.postParentReshape();
+}
+
void LLPanelProfile::onOpen(const LLSD& key)
{
// open the desired panel
@@ -177,7 +284,6 @@ void LLPanelProfile::onOpen(const LLSD& key)
}
}
-//*TODO redo panel toggling
void LLPanelProfile::togglePanel(LLPanel* panel, const LLSD& key)
{
// TRUE - we need to open/expand "panel"
@@ -204,21 +310,10 @@ void LLPanelProfile::onTabSelected(const LLSD& param)
}
}
-void LLPanelProfile::setAllChildrenVisible(BOOL visible)
-{
- const child_list_t* child_list = getChildList();
- child_list_const_iter_t child_it = child_list->begin();
- for (; child_it != child_list->end(); ++child_it)
- {
- LLView* viewp = *child_it;
- viewp->setVisible(visible);
- }
-}
-
void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
{
// Hide currently visible panel (STORM-690).
- setAllChildrenVisible(FALSE);
+ mChildStack.push();
// Add the panel or bring it to front.
if (panel->getParent() != this)
@@ -231,7 +326,7 @@ void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
}
panel->setVisible(TRUE);
-
+ panel->setFocus(TRUE); // prevent losing focus by the floater
panel->onOpen(params);
LLRect new_rect = getRect();
@@ -249,15 +344,17 @@ void LLPanelProfile::closePanel(LLPanel* panel)
removeChild(panel);
// Make the underlying panel visible.
+ mChildStack.pop();
+
+ // Prevent losing focus by the floater
const child_list_t* child_list = getChildList();
if (child_list->size() > 0)
{
- child_list->front()->setVisible(TRUE);
- child_list->front()->setFocus(TRUE); // prevent losing focus by the floater
+ child_list->front()->setFocus(TRUE);
}
else
{
- llwarns << "No underlying panel to make visible." << llendl;
+ llwarns << "No underlying panel to focus." << llendl;
}
}
}
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index d2bcee8076..0a572e6f25 100644
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -41,7 +41,7 @@ class LLPanelProfile : public LLPanel
public:
/*virtual*/ BOOL postBuild();
-
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/*virtual*/ void onOpen(const LLSD& key);
virtual void togglePanel(LLPanel*, const LLSD& key = LLSD());
@@ -58,8 +58,6 @@ protected:
virtual void onTabSelected(const LLSD& param);
- virtual void setAllChildrenVisible(BOOL visible);
-
LLTabContainer* getTabCtrl() { return mTabCtrl; }
const LLUUID& getAvatarId() { return mAvatarId; }
@@ -72,8 +70,34 @@ protected:
private:
+ //-- ChildStack begins ----------------------------------------------------
+ class ChildStack
+ {
+ LOG_CLASS(LLPanelProfile::ChildStack);
+ public:
+ ChildStack();
+ void setParent(LLPanel* parent);
+
+ bool push();
+ bool pop();
+ void preParentReshape();
+ void postParentReshape();
+
+ private:
+ void dump();
+
+ typedef LLView::child_list_t view_list_t;
+ typedef std::list<view_list_t> stack_t;
+
+ stack_t mStack;
+ stack_t mSavedStack;
+ LLPanel* mParent;
+ };
+ //-- ChildStack ends ------------------------------------------------------
+
LLTabContainer* mTabCtrl;
profile_tabs_t mTabContainer;
+ ChildStack mChildStack;
LLUUID mAvatarId;
};
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index a9ca7314ce..30949f8f02 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -38,6 +38,7 @@
#include "llsidetray.h"
#include "llslurl.h"
#include "llstatusbar.h"
+#include "lltrans.h"
#include "llviewercontrol.h"
#include "llviewerinventory.h"
#include "llviewermenu.h"
@@ -102,6 +103,13 @@ void LLPanelTopInfoBar::initParcelIcons()
mParcelIcon[SCRIPTS_ICON] = getChild<LLIconCtrl>("scripts_icon");
mParcelIcon[DAMAGE_ICON] = getChild<LLIconCtrl>("damage_icon");
+ mParcelIcon[VOICE_ICON]->setToolTip(LLTrans::getString("LocationCtrlVoiceTooltip"));
+ mParcelIcon[FLY_ICON]->setToolTip(LLTrans::getString("LocationCtrlFlyTooltip"));
+ mParcelIcon[PUSH_ICON]->setToolTip(LLTrans::getString("LocationCtrlPushTooltip"));
+ mParcelIcon[BUILD_ICON]->setToolTip(LLTrans::getString("LocationCtrlBuildTooltip"));
+ mParcelIcon[SCRIPTS_ICON]->setToolTip(LLTrans::getString("LocationCtrlScriptsTooltip"));
+ mParcelIcon[DAMAGE_ICON]->setToolTip(LLTrans::getString("LocationCtrlDamageTooltip"));
+
mParcelIcon[VOICE_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, VOICE_ICON));
mParcelIcon[FLY_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, FLY_ICON));
mParcelIcon[PUSH_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, PUSH_ICON));
@@ -129,6 +137,7 @@ BOOL LLPanelTopInfoBar::postBuild()
{
mInfoBtn = getChild<LLButton>("place_info_btn");
mInfoBtn->setClickedCallback(boost::bind(&LLPanelTopInfoBar::onInfoButtonClicked, this));
+ mInfoBtn->setToolTip(LLTrans::getString("LocationCtrlInfoBtnTooltip"));
mParcelInfoText = getChild<LLTextBox>("parcel_info_text");
mDamageText = getChild<LLTextBox>("damage_text");
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/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,
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<LLUICtrl>("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);
}
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 9e0e10d66f..0eeb89792b 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -595,20 +595,15 @@ 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();
}
}
- else
- {
- closeOverflowToastPanel();
- }
}
//--------------------------------------------------------------------------
@@ -731,7 +726,6 @@ void LLNotificationsUI::LLScreenChannel::startToastTimer(LLToast* toast)
//--------------------------------------------------------------------------
void LLScreenChannel::hideToastsFromScreen()
{
- closeOverflowToastPanel();
for(std::vector<ToastElem>::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
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/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/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;
}
}
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<LLTextEditor>("text_editor_box");
+ text_editorp->setValue(notification->getMessage());
+
+ getChild<LLButton>("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/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; }
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index b7be3bc5b3..fda291f3c1 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<LLImageFormatted> formatted;
switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat")))
{
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();
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" />
<slider
control_name="WLSunAngle"
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 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
- height="230"
+ height="220"
label="instant_message"
layout="topleft"
left="0"
@@ -14,55 +14,81 @@
<panel
bevel_style="none"
follows="left|right|top"
- height="150"
+ height="185"
label="info_panel"
layout="topleft"
left="0"
name="info_panel"
top="0"
- width="305">
+ width="305">
+ <text_editor
+ bg_readonly_color="0.0 0.0 0.0 0"
+ enabled="false"
+ follows="left|right|top|bottom"
+ font="SansSerif"
+ height="110"
+ layout="topleft"
+ left="10"
+ mouse_opaque="false"
+ name="text_editor_box"
+ read_only="true"
+ text_color="white"
+ text_readonly_color="white"
+ top="10"
+ width="285"
+ wrap="true"
+ parse_highlights="true"
+ parse_urls="true"/>
<text_editor
parse_urls="true"
enabled="true"
follows="all"
- height="60"
+ height="50"
layout="topleft"
- left="25"
+ left="10"
max_length="250"
name="message"
parse_highlights="true"
read_only="false"
- top="40"
+ top_pad="10"
type="string"
use_ellipses="true"
value="message"
- width="260"
- word_wrap="true" >
+ width="285"
+ word_wrap="true"
+ parse_url="false" >
</text_editor>
- parse_urls="false"
- <button
- top="110"
- follows="top|left"
- height="20"
- label="Submit"
- layout="topleft"
- left="25"
- name="btn_submit"
- width="70" />
</panel>
<panel
background_visible="false"
follows="left|right|bottom"
- height="0"
+ height="25"
width="290"
label="control_panel"
layout="topleft"
left="10"
name="control_panel"
- top_pad="5">
+ top_pad="0">
<!--
Notes:
This panel holds the Ignore button and possibly other buttons of notification.
-->
+ <button
+ top="0"
+ follows="top|left"
+ height="20"
+ label="Submit"
+ layout="topleft"
+ name="btn_submit"
+ width="70" />
+ <button
+ follows="top|right"
+ height="20"
+ label="Ignore"
+ layout="topleft"
+ left="215"
+ name="ignore_btn"
+ top="0"
+ width="70" />
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
index 7caf425058..61e3bb354f 100644
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile.xml
@@ -59,7 +59,7 @@
left="0"
name="profile_scroll"
opaque="true"
- height="527"
+ height="400"
width="317"
top="0">
<panel
diff --git a/indra/viewer_components/updater/scripts/darwin/update_install b/indra/viewer_components/updater/scripts/darwin/update_install
index b174b3570a..9df382f119 100644
--- 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
diff --git a/indra/viewer_components/updater/scripts/linux/update_install b/indra/viewer_components/updater/scripts/linux/update_install
index fef5ef7d09..a271926e25 100644
--- 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"