summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llfloater.cpp43
-rw-r--r--indra/llui/llfloaterreg.cpp4
-rw-r--r--indra/llui/lllayoutstack.cpp73
-rw-r--r--indra/llui/lllayoutstack.h2
-rw-r--r--indra/llui/llscrollcontainer.cpp15
-rw-r--r--indra/llui/llscrollcontainer.h6
-rw-r--r--indra/llui/llview.cpp5
-rw-r--r--indra/newview/llfloaterwebcontent.cpp4
-rw-r--r--indra/newview/llfolderview.cpp31
-rw-r--r--indra/newview/llfolderview.h24
-rw-r--r--indra/newview/llinventorybridge.cpp6
-rw-r--r--indra/newview/llinventoryclipboard.cpp110
-rw-r--r--indra/newview/llinventoryclipboard.h86
-rw-r--r--indra/newview/llinventorypanel.cpp3
-rw-r--r--indra/newview/llpanelobjectinventory.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml5
-rw-r--r--indra/newview/skins/default/xui/en/panel_chat_item.xml1
17 files changed, 367 insertions, 53 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index f49b4edb98..b091a4a1f7 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -884,22 +884,24 @@ bool LLFloater::applyRectControl()
}
}
- if (!mPosXControl.empty() && !mPosYControl.empty())
- {
- LLControlVariablePtr x_control = getControlGroup()->getControl(mPosXControl);
- LLControlVariablePtr y_control = getControlGroup()->getControl(mPosYControl);
- if (x_control.notNull()
- && y_control.notNull()
- && !x_control->isDefault()
- && !y_control->isDefault())
- {
- mPosition.mX = x_control->getValue().asReal();
- mPosition.mY = y_control->getValue().asReal();
- mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
- applyRelativePosition();
+ LLControlVariablePtr x_control = getControlGroup()->getControl(mPosXControl);
+ LLControlVariablePtr y_control = getControlGroup()->getControl(mPosYControl);
+ if (x_control.notNull()
+ && y_control.notNull()
+ && !x_control->isDefault()
+ && !y_control->isDefault())
+ {
+ mPosition.mX = x_control->getValue().asReal();
+ mPosition.mY = y_control->getValue().asReal();
+ mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
+ applyRelativePosition();
- saved_rect = true;
- }
+ saved_rect = true;
+ }
+ else
+ {
+ LLRect screen_rect = calcScreenRect();
+ mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
}
}
@@ -929,11 +931,15 @@ void LLFloater::applyPositioning(LLFloater* other, bool on_open)
break;
case LLFloaterEnums::POSITIONING_SPECIFIED:
- //translateIntoRect(gFloaterView->getSnapRect());
break;
- case LLFloaterEnums::POSITIONING_CASCADE_GROUP:
case LLFloaterEnums::POSITIONING_CASCADING:
+ if (!on_open)
+ {
+ applyRelativePosition();
+ }
+ // fall through
+ case LLFloaterEnums::POSITIONING_CASCADE_GROUP:
if (on_open)
{
if (other != NULL && other != this)
@@ -955,7 +961,6 @@ void LLFloater::applyPositioning(LLFloater* other, bool on_open)
translate(snap_rect.mLeft, snap_rect.mBottom);
}
- //mPositioning = LLFloaterEnums::POSITIONING_SPECIFIED;
setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
}
break;
@@ -3286,7 +3291,7 @@ void LLFloater::stackWith(LLFloater& other)
setShape(next_rect);
- //other.mPositioning = LLFloaterEnums::POSITIONING_SPECIFIED;
+ other.mPositioning = LLFloaterEnums::POSITIONING_CASCADE_GROUP;
other.setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);
}
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index ef55e74166..3d124cf885 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -96,7 +96,9 @@ LLFloater* LLFloaterReg::getLastFloaterCascading()
{
LLFloater* inst = *iter;
- if (inst->getVisible() && inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADING))
+ if (inst->getVisible()
+ && (inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADING)
+ || inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADE_GROUP)))
{
if (candidate_rect.mTop > inst->getRect().mTop)
{
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index ae262f794e..4c730286da 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -113,7 +113,26 @@ S32 LLLayoutPanel::getLayoutDim() const
? getRect().getWidth()
: getRect().getHeight()));
}
-
+
+S32 LLLayoutPanel::getTargetDim() const
+{
+ return mTargetDim;
+}
+
+void LLLayoutPanel::setTargetDim(S32 value)
+{
+ LLRect new_rect(getRect());
+ if (mOrientation == LLLayoutStack::HORIZONTAL)
+ {
+ new_rect.mRight = new_rect.mLeft + value;
+ }
+ else
+ {
+ new_rect.mTop = new_rect.mBottom + value;
+ }
+ setShape(new_rect, true);
+}
+
S32 LLLayoutPanel::getVisibleDim() const
{
F32 min_dim = getRelevantMinDim();
@@ -172,12 +191,15 @@ void LLLayoutPanel::handleReshape(const LLRect& new_rect, bool by_user)
LLLayoutStack* stackp = dynamic_cast<LLLayoutStack*>(getParent());
if (stackp)
{
- stackp->mNeedsLayout = true;
if (by_user)
- {
- // tell layout stack to account for new shape
+ { // tell layout stack to account for new shape
+
+ // make sure that panels have already been auto resized
+ stackp->updateLayout();
+ // now apply requested size to panel
stackp->updatePanelRect(this, new_rect);
}
+ stackp->mNeedsLayout = true;
}
LLPanel::handleReshape(new_rect, by_user);
}
@@ -241,7 +263,6 @@ void LLLayoutStack::draw()
drawChild(panelp, 0, 0, !clip_rect.isEmpty());
}
}
- mAnimatedThisFrame = false;
}
void LLLayoutStack::removeChild(LLView* view)
@@ -310,7 +331,7 @@ void LLLayoutStack::updateLayout()
if (!mNeedsLayout) return;
- bool animation_in_progress = animatePanels();
+ bool continue_animating = animatePanels();
F32 total_visible_fraction = 0.f;
S32 space_to_distribute = (mOrientation == HORIZONTAL)
? getRect().getWidth()
@@ -415,7 +436,7 @@ void LLLayoutStack::updateLayout()
// clear animation flag at end, since panel resizes will set it
// and leave it set if there is any animation in progress
- mNeedsLayout = animation_in_progress;
+ mNeedsLayout = continue_animating;
} // end LLLayoutStack::updateLayout
LLLayoutPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) const
@@ -488,6 +509,7 @@ void LLLayoutStack::updateClass()
for (instance_iter it = beginInstances(); it != endInstances(); ++it)
{
it->updateLayout();
+ it->mAnimatedThisFrame = false;
}
}
@@ -557,7 +579,7 @@ void LLLayoutStack::normalizeFractionalSizes()
bool LLLayoutStack::animatePanels()
{
- bool animation_in_progress = false;
+ bool continue_animating = false;
//
// animate visibility
@@ -577,14 +599,15 @@ bool LLLayoutStack::animatePanels()
}
}
- animation_in_progress = true;
+ mAnimatedThisFrame = true;
+ continue_animating = true;
}
else
{
if (panelp->mVisibleAmt != 1.f)
{
panelp->mVisibleAmt = 1.f;
- animation_in_progress = true;
+ mAnimatedThisFrame = true;
}
}
}
@@ -601,14 +624,15 @@ bool LLLayoutStack::animatePanels()
}
}
- animation_in_progress = true;
+ continue_animating = true;
+ mAnimatedThisFrame = true;
}
else
{
if (panelp->mVisibleAmt != 0.f)
{
panelp->mVisibleAmt = 0.f;
- animation_in_progress = true;
+ mAnimatedThisFrame = true;
}
}
}
@@ -616,22 +640,31 @@ bool LLLayoutStack::animatePanels()
F32 collapse_state = panelp->mCollapsed ? 1.f : 0.f;
if (panelp->mCollapseAmt != collapse_state)
{
- if (!mAnimatedThisFrame)
+ if (mAnimate)
{
- panelp->mCollapseAmt = lerp(panelp->mCollapseAmt, collapse_state, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
- }
- animation_in_progress = true;
+ if (!mAnimatedThisFrame)
+ {
+ panelp->mCollapseAmt = lerp(panelp->mCollapseAmt, collapse_state, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
+ }
- if (llabs(panelp->mCollapseAmt - collapse_state) < 0.001f)
+ if (llabs(panelp->mCollapseAmt - collapse_state) < 0.001f)
+ {
+ panelp->mCollapseAmt = collapse_state;
+ }
+
+ mAnimatedThisFrame = true;
+ continue_animating = true;
+ }
+ else
{
panelp->mCollapseAmt = collapse_state;
+ mAnimatedThisFrame = true;
}
}
}
- mAnimatedThisFrame = true;
-
- return animation_in_progress;
+ if (mAnimatedThisFrame) mNeedsLayout = true;
+ return continue_animating;
}
void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& new_rect )
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index d32caec5f9..648cd5fdce 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -155,6 +155,8 @@ public:
void setVisible(BOOL visible);
S32 getLayoutDim() const;
+ S32 getTargetDim() const;
+ void setTargetDim(S32 value);
S32 getMinDim() const { return llmax(0, mMinDim); }
void setMinDim(S32 value) { mMinDim = value; }
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index 20bed050ad..9b7e30bb04 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -389,10 +389,17 @@ void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height
{
*show_h_scrollbar = TRUE;
*visible_height -= scrollbar_size;
- // Note: Do *not* recompute *show_v_scrollbar here because with
- // the (- scrollbar_size) we just did we will always add a vertical scrollbar
- // even if the height of the items is actually less than the visible size.
- // Fear not though: there's enough calcVisibleSize() calls to add a vertical slider later.
+
+ // The view inside the scroll container should not be extended
+ // to container's full height to ensure the correct computation
+ // of *show_v_scrollbar after subtracting horizontal scrollbar_size.
+
+ // Must retest now that visible_height has changed
+ if( !*show_v_scrollbar && ((doc_height - *visible_height) > 1) )
+ {
+ *show_v_scrollbar = TRUE;
+ *visible_width -= scrollbar_size;
+ }
}
}
}
diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h
index 3aa79cc255..d87c95b3d7 100644
--- a/indra/llui/llscrollcontainer.h
+++ b/indra/llui/llscrollcontainer.h
@@ -91,7 +91,7 @@ public:
void setReserveScrollCorner( BOOL b ) { mReserveScrollCorner = b; }
LLRect getVisibleContentRect();
LLRect getContentWindowRect();
- const LLRect& getScrolledViewRect() const { return mScrolledView ? mScrolledView->getRect() : LLRect::null; }
+ virtual const LLRect getScrolledViewRect() const { return mScrolledView ? mScrolledView->getRect() : LLRect::null; }
void pageUp(S32 overlap = 0);
void pageDown(S32 overlap = 0);
void goToTop();
@@ -116,6 +116,9 @@ public:
bool autoScroll(S32 x, S32 y);
+protected:
+ LLView* mScrolledView;
+
private:
// internal scrollbar handlers
virtual void scrollHorizontal( S32 new_pos );
@@ -124,7 +127,6 @@ private:
void calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const;
LLScrollbar* mScrollbar[SCROLLBAR_COUNT];
- LLView* mScrolledView;
S32 mSize;
BOOL mIsOpaque;
LLUIColor mBackgroundColor;
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 356d5c31d1..54843227b7 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1835,7 +1835,10 @@ const LLCtrlQuery & LLView::getFocusRootsQuery()
void LLView::setShape(const LLRect& new_rect, bool by_user)
{
- handleReshape(new_rect, by_user);
+ if (new_rect != getRect())
+ {
+ handleReshape(new_rect, by_user);
+ }
}
void LLView::handleReshape(const LLRect& new_rect, bool by_user)
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 3b5c3663fb..3fe2518de6 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -169,7 +169,7 @@ void LLFloaterWebContent::geometryChanged(const std::string &uuid, S32 x, S32 y,
void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height)
{
// Make sure the layout of the browser control is updated, so this calculation is correct.
- LLLayoutStack::updateClass();
+ getChild<LLLayoutStack>("stack1")->updateLayout();
// TODO: need to adjust size and constrain position to make sure floaters aren't moved outside the window view, etc.
LLCoordWindow window_size;
@@ -258,7 +258,7 @@ void LLFloaterWebContent::open_media(const Params& p)
if (!p.preferred_media_size().isEmpty())
{
- LLLayoutStack::updateClass();
+ getChild<LLLayoutStack>("stack1")->updateLayout();
LLRect browser_rect = mWebBrowser->calcScreenRect();
LLCoordWindow window_size;
getWindow()->getSize(&window_size);
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 3103267b35..068a6407f7 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -165,6 +165,33 @@ void LLCloseAllFoldersFunctor::doItem(LLFolderViewItem* item)
{ }
///----------------------------------------------------------------------------
+/// Class LLFolderViewScrollContainer
+///----------------------------------------------------------------------------
+
+// virtual
+const LLRect LLFolderViewScrollContainer::getScrolledViewRect() const
+{
+ LLRect rect = LLRect::null;
+ if (mScrolledView)
+ {
+ LLFolderView* folder_view = dynamic_cast<LLFolderView*>(mScrolledView);
+ if (folder_view)
+ {
+ S32 height = folder_view->mRunningHeight;
+
+ rect = mScrolledView->getRect();
+ rect.setLeftTopAndSize(rect.mLeft, rect.mTop, rect.getWidth(), height);
+ }
+ }
+
+ return rect;
+}
+
+LLFolderViewScrollContainer::LLFolderViewScrollContainer(const LLScrollContainer::Params& p)
+: LLScrollContainer(p)
+{}
+
+///----------------------------------------------------------------------------
/// Class LLFolderView
///----------------------------------------------------------------------------
LLFolderView::Params::Params()
@@ -535,6 +562,7 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent)
{
width = scroll_rect.getWidth();
}
+
LLView::reshape(width, height, called_from_parent);
mReshapeSignal(mSelectedItems, FALSE);
}
@@ -943,6 +971,9 @@ void LLFolderView::draw()
// We should call this method to also notify parent about required rect.
// See EXT-7564, EXT-7047.
arrangeFromRoot();
+ LLUI::popMatrix();
+ LLUI::pushMatrix();
+ LLUI::translate((F32)getRect().mLeft, (F32)getRect().mBottom);
}
}
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 5705846c0e..da8bb15f8e 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -44,6 +44,7 @@
#include "lldepthstack.h"
#include "lleditmenuhandler.h"
#include "llfontgl.h"
+#include "llscrollcontainer.h"
#include "lltooldraganddrop.h"
#include "llviewertexture.h"
@@ -54,10 +55,28 @@ class LLInventoryModel;
class LLPanel;
class LLLineEditor;
class LLMenuGL;
-class LLScrollContainer;
class LLUICtrl;
class LLTextBox;
+/**
+ * Class LLFolderViewScrollContainer
+ *
+ * A scroll container which provides the information about the height
+ * of currently displayed folder view contents.
+ * Used for updating vertical scroll bar visibility in inventory panel.
+ * See LLScrollContainer::calcVisibleSize().
+ */
+class LLFolderViewScrollContainer : public LLScrollContainer
+{
+public:
+ /*virtual*/ ~LLFolderViewScrollContainer() {};
+ /*virtual*/ const LLRect getScrolledViewRect() const;
+
+protected:
+ LLFolderViewScrollContainer(const LLScrollContainer::Params& p);
+ friend class LLUICtrlFactory;
+};
+
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLFolderView
//
@@ -81,6 +100,9 @@ public:
Params();
};
+
+ friend class LLFolderViewScrollContainer;
+
LLFolderView(const Params&);
virtual ~LLFolderView( void );
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 03f6a31c6d..9b8c311d16 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -446,7 +446,11 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
for(; it != end; ++it)
{
gInventory.moveObject((*it), trash_id);
- model->updateItem(gInventory.getItem(*it));
+ LLViewerInventoryItem* item = gInventory.getItem(*it);
+ if (item)
+ {
+ model->updateItem(item);
+ }
}
// notify inventory observers.
diff --git a/indra/newview/llinventoryclipboard.cpp b/indra/newview/llinventoryclipboard.cpp
new file mode 100644
index 0000000000..53da34f448
--- /dev/null
+++ b/indra/newview/llinventoryclipboard.cpp
@@ -0,0 +1,110 @@
+/**
+ * @file llinventoryclipboard.cpp
+ * @brief LLInventoryClipboard class implementation
+ *
+ * $LicenseInfo:firstyear=2002&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llinventoryclipboard.h"
+
+
+LLInventoryClipboard LLInventoryClipboard::sInstance;
+
+///----------------------------------------------------------------------------
+/// Local function declarations, constants, enums, and typedefs
+///----------------------------------------------------------------------------
+
+
+///----------------------------------------------------------------------------
+/// Class LLInventoryClipboard
+///----------------------------------------------------------------------------
+
+LLInventoryClipboard::LLInventoryClipboard()
+: mCutMode(false)
+{
+}
+
+LLInventoryClipboard::~LLInventoryClipboard()
+{
+ reset();
+}
+
+void LLInventoryClipboard::add(const LLUUID& object)
+{
+ mObjects.put(object);
+}
+
+// this stores a single inventory object
+void LLInventoryClipboard::store(const LLUUID& object)
+{
+ reset();
+ mObjects.put(object);
+}
+
+void LLInventoryClipboard::store(const LLDynamicArray<LLUUID>& inv_objects)
+{
+ reset();
+ S32 count = inv_objects.count();
+ for(S32 i = 0; i < count; i++)
+ {
+ mObjects.put(inv_objects[i]);
+ }
+}
+
+void LLInventoryClipboard::cut(const LLUUID& object)
+{
+ if(!mCutMode && !mObjects.empty())
+ {
+ //looks like there are some stored items, reset clipboard state
+ reset();
+ }
+ mCutMode = true;
+ add(object);
+}
+void LLInventoryClipboard::retrieve(LLDynamicArray<LLUUID>& inv_objects) const
+{
+ inv_objects.reset();
+ S32 count = mObjects.count();
+ for(S32 i = 0; i < count; i++)
+ {
+ inv_objects.put(mObjects[i]);
+ }
+}
+
+void LLInventoryClipboard::reset()
+{
+ mObjects.reset();
+ mCutMode = false;
+}
+
+// returns true if the clipboard has something pasteable in it.
+BOOL LLInventoryClipboard::hasContents() const
+{
+ return (mObjects.count() > 0);
+}
+
+
+///----------------------------------------------------------------------------
+/// Local function definitions
+///----------------------------------------------------------------------------
diff --git a/indra/newview/llinventoryclipboard.h b/indra/newview/llinventoryclipboard.h
new file mode 100644
index 0000000000..b9f1451e5c
--- /dev/null
+++ b/indra/newview/llinventoryclipboard.h
@@ -0,0 +1,86 @@
+/**
+ * @file llinventoryclipboard.h
+ * @brief LLInventoryClipboard class header file
+ *
+ * $LicenseInfo:firstyear=2002&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLINVENTORYCLIPBOARD_H
+#define LL_LLINVENTORYCLIPBOARD_H
+
+#include "lldarray.h"
+#include "lluuid.h"
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLInventoryClipboard
+//
+// This class is used to cut/copy/paste inventory items around the
+// world. This class is accessed through a singleton (only one
+// inventory clipboard for now) which can be referenced using the
+// instance() method.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+class LLInventoryClipboard
+{
+public:
+ // calling this before main() is undefined
+ static LLInventoryClipboard& instance() { return sInstance; }
+
+ // this method adds to the current list.
+ void add(const LLUUID& object);
+
+ // this stores a single inventory object
+ void store(const LLUUID& object);
+
+ // this method stores an array of objects
+ void store(const LLDynamicArray<LLUUID>& inventory_objects);
+
+ void cut(const LLUUID& object);
+ // this method gets the objects in the clipboard by copying them
+ // into the array provided.
+ void retrieve(LLDynamicArray<LLUUID>& inventory_objects) const;
+
+ // this method empties out the clipboard
+ void reset();
+
+ // returns true if the clipboard has something pasteable in it.
+ BOOL hasContents() const;
+ bool isCutMode() const { return mCutMode; }
+
+protected:
+ static LLInventoryClipboard sInstance;
+
+ LLDynamicArray<LLUUID> mObjects;
+ bool mCutMode;
+
+public:
+ // please don't actually call these
+ LLInventoryClipboard();
+ ~LLInventoryClipboard();
+private:
+ // please don't implement these
+ LLInventoryClipboard(const LLInventoryClipboard&);
+ LLInventoryClipboard& operator=(const LLInventoryClipboard&);
+};
+
+
+#endif // LL_LLINVENTORYCLIPBOARD_H
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index b417689858..71dd963f28 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -207,10 +207,11 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom);
LLScrollContainer::Params scroller_params(params.scroll());
scroller_params.rect(scroller_view_rect);
- mScroller = LLUICtrlFactory::create<LLScrollContainer>(scroller_params);
+ mScroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroller_params);
addChild(mScroller);
mScroller->addChild(mFolderRoot);
mFolderRoot->setScrollContainer(mScroller);
+ mFolderRoot->setFollowsAll();
mFolderRoot->addChild(mFolderRoot->mStatusTextBox);
}
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index eb0a257def..1ca24f3031 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1569,7 +1569,7 @@ void LLPanelObjectInventory::reset()
scroll_p.rect(scroller_rect);
scroll_p.tab_stop(true);
scroll_p.follows.flags(FOLLOWS_ALL);
- mScroller = LLUICtrlFactory::create<LLScrollContainer>(scroll_p);
+ mScroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroll_p);
addChild(mScroller);
mScroller->addChild(mFolders);
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 6443e432fe..9ff2e233af 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -3295,6 +3295,7 @@
name="Set Logging Level"
tear_off="true">
<menu_item_check
+ name="Debug"
label="Debug">
<menu_item_check.on_check
function="Develop.CheckLoggingLevel"
@@ -3304,6 +3305,7 @@
parameter="0" />
</menu_item_check>
<menu_item_check
+ name="Info"
label="Info">
<menu_item_check.on_check
function="Develop.CheckLoggingLevel"
@@ -3313,6 +3315,7 @@
parameter="1" />
</menu_item_check>
<menu_item_check
+ name="Warning"
label="Warning">
<menu_item_check.on_check
function="Develop.CheckLoggingLevel"
@@ -3322,6 +3325,7 @@
parameter="2" />
</menu_item_check>
<menu_item_check
+ name="Error"
label="Error">
<menu_item_check.on_check
function="Develop.CheckLoggingLevel"
@@ -3331,6 +3335,7 @@
parameter="3" />
</menu_item_check>
<menu_item_check
+ name="None"
label="None">
<menu_item_check.on_check
function="Develop.CheckLoggingLevel"
diff --git a/indra/newview/skins/default/xui/en/panel_chat_item.xml b/indra/newview/skins/default/xui/en/panel_chat_item.xml
index 1b97de2b05..1ef99649e6 100644
--- a/indra/newview/skins/default/xui/en/panel_chat_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_chat_item.xml
@@ -18,6 +18,7 @@
<text_chat
top="3"
left="30"
+ right="-10"
height="120"
text_color="white"
word_wrap="true"