summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdoc/contributions.txt1
-rw-r--r--indra/llcommon/llinitparam.cpp7
-rw-r--r--indra/llcommon/llinitparam.h1
-rw-r--r--indra/llcommon/llsdparam.h1
-rw-r--r--indra/llmath/llmath.h5
-rw-r--r--indra/llui/llflatlistview.cpp114
-rw-r--r--indra/llui/llflatlistview.h11
-rw-r--r--indra/llui/llspinctrl.cpp2
-rw-r--r--indra/llui/llxuiparser.h4
-rw-r--r--indra/newview/CMakeLists.txt6
-rw-r--r--indra/newview/app_settings/commands.xml10
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/app_settings/settings_per_account.xml11
-rw-r--r--indra/newview/llappdelegate-objc.mm2
-rw-r--r--indra/newview/lldrawpoolalpha.cpp4
-rw-r--r--indra/newview/llfilteredwearablelist.cpp5
-rw-r--r--indra/newview/llfilteredwearablelist.h5
-rw-r--r--indra/newview/llfloateroutfitphotopreview.cpp289
-rw-r--r--indra/newview/llfloateroutfitphotopreview.h77
-rw-r--r--indra/newview/llfloaterpay.cpp5
-rw-r--r--indra/newview/llfloaterreporter.cpp78
-rw-r--r--indra/newview/llfloaterreporter.h9
-rw-r--r--indra/newview/llinventorybridge.cpp15
-rw-r--r--indra/newview/llinventoryitemslist.cpp207
-rw-r--r--indra/newview/llinventoryitemslist.h28
-rw-r--r--indra/newview/lloutfitgallery.cpp4
-rw-r--r--indra/newview/lloutfitgallery.h1
-rw-r--r--indra/newview/llpaneloutfitedit.cpp4
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp8
-rw-r--r--indra/newview/llpresetsmanager.cpp4
-rw-r--r--indra/newview/llstatusbar.cpp6
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
-rw-r--r--indra/newview/llviewermedia.cpp86
-rw-r--r--indra/newview/llviewermedia.h5
-rw-r--r--indra/newview/llviewermessage.cpp18
-rw-r--r--indra/newview/llwearableitemslist.cpp24
-rw-r--r--indra/newview/llwearableitemslist.h2
-rw-r--r--indra/newview/skins/default/textures/textures.xml1
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/report_abuse.pngbin0 -> 407 bytes
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_destinations.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_hover_height.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_container.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_outfit_photo_preview.xml65
-rw-r--r--indra/newview/skins/default/xui/en/floater_pay.xml24
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml1
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml15
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml5
-rw-r--r--indra/newview/skins/default/xui/en/panel_notification.xml13
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_gallery.xml3
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml5
-rw-r--r--indra/newview/skins/default/xui/en/widgets/slider.xml1
-rw-r--r--indra/newview/skins/default/xui/en/widgets/texture_picker.xml3
55 files changed, 1034 insertions, 183 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 772d7fe3b5..bd534ecc88 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -203,6 +203,7 @@ Ansariel Hiller
MAINT-6636
MAINT-6744
MAINT-6752
+ MAINT-6773
Aralara Rajal
Arare Chantilly
CHUIBUG-191
diff --git a/indra/llcommon/llinitparam.cpp b/indra/llcommon/llinitparam.cpp
index aa2f4eb289..1d104cf55d 100644
--- a/indra/llcommon/llinitparam.cpp
+++ b/indra/llcommon/llinitparam.cpp
@@ -193,7 +193,12 @@ namespace LLInitParam
{
if (!silent)
{
- p.parserWarning(llformat("Failed to parse parameter \"%s\"", p.getCurrentElementName().c_str()));
+ std::string file_name = p.getCurrentFileName();
+ if(!file_name.empty())
+ {
+ file_name = "in file: " + file_name;
+ }
+ p.parserWarning(llformat("Failed to parse parameter \"%s\" %s", p.getCurrentElementName().c_str(), file_name.c_str()));
}
return false;
}
diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h
index c65b05f610..f1f4226c40 100644
--- a/indra/llcommon/llinitparam.h
+++ b/indra/llcommon/llinitparam.h
@@ -551,6 +551,7 @@ namespace LLInitParam
}
virtual std::string getCurrentElementName() = 0;
+ virtual std::string getCurrentFileName() = 0;
virtual void parserWarning(const std::string& message);
virtual void parserError(const std::string& message);
void setParseSilently(bool silent) { mParseSilently = silent; }
diff --git a/indra/llcommon/llsdparam.h b/indra/llcommon/llsdparam.h
index 09f1bdf1e3..93910b70ae 100644
--- a/indra/llcommon/llsdparam.h
+++ b/indra/llcommon/llsdparam.h
@@ -66,6 +66,7 @@ public:
}
/*virtual*/ std::string getCurrentElementName();
+ /*virtual*/ std::string getCurrentFileName(){ return LLStringUtil::null; }
private:
void writeSDImpl(LLSD& sd,
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index 93b9f22b25..692284e04b 100644
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
@@ -254,6 +254,11 @@ inline int round_int(double x)
}
#endif // BOGUS_ROUND
+inline F64 ll_round(const F64 val)
+{
+ return F64(floor(val + 0.5f));
+}
+
inline F32 ll_round( F32 val, F32 nearest )
{
return F32(floor(val * (1.0f / nearest) + 0.5f)) * nearest;
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index 299f5e42d4..4729eb4023 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -105,6 +105,81 @@ bool LLFlatListView::addItem(LLPanel * item, const LLSD& value /*= LLUUID::null*
return true;
}
+bool LLFlatListView::addItemPairs(pairs_list_t panel_list, bool rearrange /*= true*/)
+{
+ if (!mItemComparator)
+ {
+ LL_WARNS_ONCE() << "No comparator specified for inserting FlatListView items." << LL_ENDL;
+ return false;
+ }
+ if (panel_list.size() == 0)
+ {
+ return false;
+ }
+
+ // presort list so that it will be easier to sort elements into mItemPairs
+ panel_list.sort(ComparatorAdaptor(*mItemComparator));
+
+ pairs_const_iterator_t new_pair_it = panel_list.begin();
+ item_pair_t* new_pair = *new_pair_it;
+ pairs_iterator_t pair_it = mItemPairs.begin();
+ item_pair_t* item_pair = *pair_it;
+
+ // sort panel_list into mItemPars
+ while (new_pair_it != panel_list.end() && pair_it != mItemPairs.end())
+ {
+ if (!new_pair->first || new_pair->first->getParent() == mItemsPanel)
+ {
+ // iterator already used or we are reusing existing panel
+ new_pair_it++;
+ new_pair = *new_pair_it;
+ }
+ else if (mItemComparator->compare(new_pair->first, item_pair->first))
+ {
+ LLPanel* panel = new_pair->first;
+
+ mItemPairs.insert(pair_it, new_pair);
+ mItemsPanel->addChild(panel);
+
+ //_4 is for MASK
+ panel->setMouseDownCallback(boost::bind(&LLFlatListView::onItemMouseClick, this, new_pair, _4));
+ panel->setRightMouseDownCallback(boost::bind(&LLFlatListView::onItemRightMouseClick, this, new_pair, _4));
+ // Children don't accept the focus
+ panel->setTabStop(false);
+ }
+ else
+ {
+ pair_it++;
+ item_pair = *pair_it;
+ }
+ }
+
+ // Add what is left of panel_list into the end of mItemPairs.
+ for (; new_pair_it != panel_list.end(); ++new_pair_it)
+ {
+ item_pair_t* item_pair = *new_pair_it;
+ LLPanel *panel = item_pair->first;
+ if (panel && panel->getParent() != mItemsPanel)
+ {
+ mItemPairs.push_back(item_pair);
+ mItemsPanel->addChild(panel);
+
+ //_4 is for MASK
+ panel->setMouseDownCallback(boost::bind(&LLFlatListView::onItemMouseClick, this, new_pair, _4));
+ panel->setRightMouseDownCallback(boost::bind(&LLFlatListView::onItemRightMouseClick, this, new_pair, _4));
+ // Children don't accept the focus
+ panel->setTabStop(false);
+ }
+ }
+
+ if (rearrange)
+ {
+ rearrangeItems();
+ notifyParentItemsRectChanged();
+ }
+ return true;
+}
+
bool LLFlatListView::insertItemAfter(LLPanel* after_item, LLPanel* item_to_add, const LLSD& value /*= LLUUID::null*/)
{
@@ -1289,6 +1364,28 @@ void LLFlatListViewEx::setFilterSubString(const std::string& filter_str)
}
}
+void LLFlatListViewEx::updateItemVisibility(LLPanel* item, const LLSD &action)
+{
+ if (!item) return;
+
+ // 0 signifies that filter is matched,
+ // i.e. we don't hide items that don't support 'match_filter' action, separators etc.
+ if (0 == item->notify(action))
+ {
+ mHasMatchedItems = true;
+ item->setVisible(true);
+ }
+ else
+ {
+ // TODO: implement (re)storing of current selection.
+ if (!mForceShowingUnmatchedItems)
+ {
+ selectItem(item, false);
+ }
+ item->setVisible(mForceShowingUnmatchedItems);
+ }
+}
+
void LLFlatListViewEx::filterItems()
{
typedef std::vector <LLPanel*> item_panel_list_t;
@@ -1309,22 +1406,7 @@ void LLFlatListViewEx::filterItems()
iter != iter_end; ++iter)
{
LLPanel* pItem = (*iter);
- // 0 signifies that filter is matched,
- // i.e. we don't hide items that don't support 'match_filter' action, separators etc.
- if (0 == pItem->notify(action))
- {
- mHasMatchedItems = true;
- pItem->setVisible(true);
- }
- else
- {
- // TODO: implement (re)storing of current selection.
- if(!mForceShowingUnmatchedItems)
- {
- selectItem(pItem, false);
- }
- pItem->setVisible(mForceShowingUnmatchedItems);
- }
+ updateItemVisibility(pItem, action);
}
sort();
diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h
index 92bf429031..230ea200d8 100644
--- a/indra/llui/llflatlistview.h
+++ b/indra/llui/llflatlistview.h
@@ -351,6 +351,8 @@ protected:
virtual bool removeItemPair(item_pair_t* item_pair, bool rearrange);
+ bool addItemPairs(pairs_list_t panel_list, bool rearrange = true);
+
/**
* Notify parent about changed size of internal controls with "size_changes" action
*
@@ -480,6 +482,7 @@ public:
* Sets up new filter string and filters the list.
*/
void setFilterSubString(const std::string& filter_str);
+ std::string getFilterSubString() { return mFilterSubString; }
/**
* Filters the list, rearranges and notifies parent about shape changes.
@@ -503,6 +506,14 @@ protected:
*/
void updateNoItemsMessage(const std::string& filter_string);
+ /**
+ * Applies visibility acording to action and LLFlatListView settings.
+ *
+ * @param item - item we are changing
+ * @param item - action - parameters to determin visibility from
+ */
+ void updateItemVisibility(LLPanel* item, const LLSD &action);
+
private:
std::string mNoFilteredItemsMsg;
std::string mNoItemsMsg;
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index 8b1ba406c8..d49e216898 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -153,7 +153,7 @@ F32 clamp_precision(F32 value, S32 decimal_precision)
for (S32 i = 0; i < decimal_precision; i++)
clamped_value *= 10.0;
- clamped_value = ll_round((F32)clamped_value);
+ clamped_value = ll_round(clamped_value);
for (S32 i = 0; i < decimal_precision; i++)
clamped_value /= 10.0;
diff --git a/indra/llui/llxuiparser.h b/indra/llui/llxuiparser.h
index ad2a39cab7..bb11a23938 100644
--- a/indra/llui/llxuiparser.h
+++ b/indra/llui/llxuiparser.h
@@ -60,7 +60,7 @@ public:
void writeXSD(const std::string& name, LLXMLNodePtr node, const LLInitParam::BaseBlock& block, const std::string& xml_namespace);
/*virtual*/ std::string getCurrentElementName() { return LLStringUtil::null; }
-
+ /*virtual*/ std::string getCurrentFileName() { return LLStringUtil::null; }
LLXSDWriter();
~LLXSDWriter();
@@ -98,6 +98,7 @@ public:
typedef LLInitParam::Parser::name_stack_t name_stack_t;
/*virtual*/ std::string getCurrentElementName();
+ /*virtual*/ std::string getCurrentFileName() { return mCurFileName; }
/*virtual*/ void parserWarning(const std::string& message);
/*virtual*/ void parserError(const std::string& message);
@@ -200,6 +201,7 @@ public:
virtual ~LLSimpleXUIParser();
/*virtual*/ std::string getCurrentElementName();
+ /*virtual*/ std::string getCurrentFileName() { return mCurFileName; }
/*virtual*/ void parserWarning(const std::string& message);
/*virtual*/ void parserError(const std::string& message);
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 16edd39ecc..905f870a56 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -262,7 +262,8 @@ set(viewer_SOURCE_FILES
llfloatermodeluploadbase.cpp
llfloaternamedesc.cpp
llfloaternotificationsconsole.cpp
- llfloaternotificationstabbed.cpp
+ llfloaternotificationstabbed.cpp
+ llfloateroutfitphotopreview.cpp
llfloateroutfitsnapshot.cpp
llfloaterobjectweights.cpp
llfloateropenobject.cpp
@@ -880,7 +881,8 @@ set(viewer_HEADER_FILES
llfloatermodeluploadbase.h
llfloaternamedesc.h
llfloaternotificationsconsole.h
- llfloaternotificationstabbed.h
+ llfloaternotificationstabbed.h
+ llfloateroutfitphotopreview.h
llfloateroutfitsnapshot.h
llfloaterobjectweights.h
llfloateropenobject.h
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index a0d3dc0f99..9bc0a7c701 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -282,4 +282,14 @@
is_running_function="Floater.IsOpen"
is_running_parameters="camera"
/>
+ <command name="reporter"
+ available_in_toybox="true"
+ icon="Command_Report_Abuse_Icon"
+ label_ref="Command_Report_Abuse_Label"
+ tooltip_ref="Command_Report_Abuse_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="reporter"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="reporter"
+ />
</commands>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 460c0809a6..a8bd5c7183 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5241,6 +5241,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>LastAppearanceTab</key>
+ <map>
+ <key>Comment</key>
+ <string>Last selected tab in appearance floater</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>LastMediaSettingsTab</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index fd6b1b5b3f..bed392d738 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -242,6 +242,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>PreviousScreenshotForReport</key>
+ <map>
+ <key>Comment</key>
+ <string>Use Previous Screenshot for Abuse report</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<!-- Settings below are for back compatibility only.
They are not used in current viewer anymore. But they can't be removed to avoid
influence on previous versions of the viewer in case of settings are not used or default value
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index be8877328d..8188c6c3f9 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -58,7 +58,7 @@
frameTimer = [NSTimer scheduledTimerWithTimeInterval:0.0 target:self
selector:@selector(oneFrame) userInfo:nil repeats:YES];
} else {
- handleQuit();
+ exit(0);
}
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(languageUpdated) name:@"NSTextInputContextKeyboardSelectionDidChangeNotification" object:nil];
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 84ead0bdde..60056ac21d 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -401,7 +401,9 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
if ((params.mVertexBuffer->getTypeMask() & mask) != mask)
{ //FIXME!
- LL_WARNS() << "Missing required components, skipping render batch." << LL_ENDL;
+ LL_WARNS_ONCE() << "Missing required components, expected mask: " << mask
+ << " present: " << (params.mVertexBuffer->getTypeMask() & mask)
+ << ". Skipping render batch." << LL_ENDL;
continue;
}
diff --git a/indra/newview/llfilteredwearablelist.cpp b/indra/newview/llfilteredwearablelist.cpp
index a29ccf2b6d..f2af9b5300 100644
--- a/indra/newview/llfilteredwearablelist.cpp
+++ b/indra/newview/llfilteredwearablelist.cpp
@@ -93,4 +93,9 @@ void LLFilteredWearableListManager::populateList()
mWearableList->refreshList(item_array);
}
+void LLFilteredWearableListManager::holdProgress()
+{
+ mWearableList->setForceRefresh(false);
+}
+
// EOF
diff --git a/indra/newview/llfilteredwearablelist.h b/indra/newview/llfilteredwearablelist.h
index c21458ca98..f44ab1466f 100644
--- a/indra/newview/llfilteredwearablelist.h
+++ b/indra/newview/llfilteredwearablelist.h
@@ -56,6 +56,11 @@ public:
*/
void populateList();
+ /**
+ * Drop operation
+ */
+ void holdProgress();
+
private:
LLInventoryItemsList* mWearableList;
LLInventoryCollectFunctor* mCollector;
diff --git a/indra/newview/llfloateroutfitphotopreview.cpp b/indra/newview/llfloateroutfitphotopreview.cpp
new file mode 100644
index 0000000000..6c39db730c
--- /dev/null
+++ b/indra/newview/llfloateroutfitphotopreview.cpp
@@ -0,0 +1,289 @@
+/**
+ * @file llfloateroutfitphotopreview.cpp
+ * @brief LLFloaterOutfitPhotoPreview 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 "llwindow.h"
+
+#include "llfloateroutfitphotopreview.h"
+
+#include "llagent.h"
+#include "llappearancemgr.h"
+#include "llbutton.h"
+#include "llcombobox.h"
+#include "llfilepicker.h"
+#include "llfloaterreg.h"
+#include "llimagetga.h"
+#include "llimagepng.h"
+#include "llinventory.h"
+#include "llinventorymodel.h"
+#include "llnotificationsutil.h"
+#include "llresmgr.h"
+#include "lltrans.h"
+#include "lltextbox.h"
+#include "lltextureview.h"
+#include "llui.h"
+#include "llviewerinventory.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
+#include "lluictrlfactory.h"
+#include "llviewerwindow.h"
+#include "lllineeditor.h"
+
+const S32 MAX_OUTFIT_PHOTO_WIDTH = 256;
+const S32 MAX_OUTFIT_PHOTO_HEIGHT = 256;
+
+const S32 CLIENT_RECT_VPAD = 4;
+
+LLFloaterOutfitPhotoPreview::LLFloaterOutfitPhotoPreview(const LLSD& key)
+ : LLPreview(key),
+ mUpdateDimensions(TRUE),
+ mImage(NULL),
+ mOutfitID(LLUUID()),
+ mImageOldBoostLevel(LLGLTexture::BOOST_NONE),
+ mExceedLimits(FALSE)
+{
+ updateImageID();
+}
+
+LLFloaterOutfitPhotoPreview::~LLFloaterOutfitPhotoPreview()
+{
+ LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList) ;
+
+ if (mImage.notNull())
+ {
+ mImage->setBoostLevel(mImageOldBoostLevel);
+ mImage = NULL;
+ }
+}
+
+// virtual
+BOOL LLFloaterOutfitPhotoPreview::postBuild()
+{
+ getChild<LLButton>("ok_btn")->setClickedCallback(boost::bind(&LLFloaterOutfitPhotoPreview::onOkBtn, this));
+ getChild<LLButton>("cancel_btn")->setClickedCallback(boost::bind(&LLFloaterOutfitPhotoPreview::onCancelBtn, this));
+
+ return LLPreview::postBuild();
+}
+
+void LLFloaterOutfitPhotoPreview::draw()
+{
+ updateDimensions();
+
+ LLPreview::draw();
+
+ if (!isMinimized())
+ {
+ LLGLSUIDefault gls_ui;
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+ const LLRect& border = mClientRect;
+ LLRect interior = mClientRect;
+ interior.stretch( -PREVIEW_BORDER_WIDTH );
+
+ // ...border
+ gl_rect_2d( border, LLColor4(0.f, 0.f, 0.f, 1.f));
+ gl_rect_2d_checkerboard( interior );
+
+ if ( mImage.notNull() )
+ {
+ // Draw the texture
+ gGL.diffuseColor3f( 1.f, 1.f, 1.f );
+ gl_draw_scaled_image(interior.mLeft,
+ interior.mBottom,
+ interior.getWidth(),
+ interior.getHeight(),
+ mImage);
+
+ // Pump the texture priority
+ F32 pixel_area = (F32)(interior.getWidth() * interior.getHeight() );
+ mImage->addTextureStats( pixel_area );
+
+ S32 int_width = interior.getWidth();
+ S32 int_height = interior.getHeight();
+ mImage->setKnownDrawSize(int_width, int_height);
+ }
+ }
+
+}
+
+// virtual
+void LLFloaterOutfitPhotoPreview::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ LLPreview::reshape(width, height, called_from_parent);
+
+ LLRect dim_rect(getChildView("dimensions")->getRect());
+
+ S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE;
+
+ S32 info_height = dim_rect.mTop + CLIENT_RECT_VPAD;
+
+ 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 ;
+
+ S32 client_width = client_rect.getWidth();
+ S32 client_height = client_width;
+
+ if(client_height > client_rect.getHeight())
+ {
+ client_height = client_rect.getHeight();
+ client_width = client_height;
+ }
+ mClientRect.setLeftTopAndSize(client_rect.getCenterX() - (client_width / 2), client_rect.getCenterY() + (client_height / 2), client_width, client_height);
+
+}
+
+
+void LLFloaterOutfitPhotoPreview::updateDimensions()
+{
+ if (!mImage)
+ {
+ return;
+ }
+ if ((mImage->getFullWidth() * mImage->getFullHeight()) == 0)
+ {
+ return;
+ }
+
+ if (mAssetStatus != PREVIEW_ASSET_LOADED)
+ {
+ mAssetStatus = PREVIEW_ASSET_LOADED;
+ mUpdateDimensions = TRUE;
+ }
+
+ getChild<LLUICtrl>("dimensions")->setTextArg("[WIDTH]", llformat("%d", mImage->getFullWidth()));
+ getChild<LLUICtrl>("dimensions")->setTextArg("[HEIGHT]", llformat("%d", mImage->getFullHeight()));
+
+ if ((mImage->getFullWidth() <= MAX_OUTFIT_PHOTO_WIDTH) && (mImage->getFullHeight() <= MAX_OUTFIT_PHOTO_HEIGHT))
+ {
+ getChild<LLButton>("ok_btn")->setEnabled(TRUE);
+ mExceedLimits = FALSE;
+ }
+ else
+ {
+ mExceedLimits = TRUE;
+ LLStringUtil::format_map_t args;
+ args["MAX_WIDTH"] = llformat("%d", MAX_OUTFIT_PHOTO_WIDTH);
+ args["MAX_HEIGHT"] = llformat("%d", MAX_OUTFIT_PHOTO_HEIGHT);
+ std::string label = getString("exceed_limits", args);
+ getChild<LLUICtrl>("notification")->setValue(label);
+ getChild<LLUICtrl>("notification")->setColor(LLColor4::yellow);
+ getChild<LLButton>("ok_btn")->setEnabled(FALSE);
+ }
+
+ if (mUpdateDimensions)
+ {
+ mUpdateDimensions = FALSE;
+
+ reshape(getRect().getWidth(), getRect().getHeight());
+ gFloaterView->adjustToFitScreen(this, FALSE);
+ }
+}
+
+void LLFloaterOutfitPhotoPreview::loadAsset()
+{
+ if (mImage.notNull())
+ {
+ mImage->setBoostLevel(mImageOldBoostLevel);
+ }
+ mImage = LLViewerTextureManager::getFetchedTexture(mImageID, FTT_DEFAULT, MIPMAP_TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ mImageOldBoostLevel = mImage->getBoostLevel();
+ mImage->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
+ mImage->forceToSaveRawImage(0) ;
+ mAssetStatus = PREVIEW_ASSET_LOADING;
+ mUpdateDimensions = TRUE;
+ updateDimensions();
+}
+
+LLPreview::EAssetStatus LLFloaterOutfitPhotoPreview::getAssetStatus()
+{
+ if (mImage.notNull() && (mImage->getFullWidth() * mImage->getFullHeight() > 0))
+ {
+ mAssetStatus = PREVIEW_ASSET_LOADED;
+ }
+ return mAssetStatus;
+}
+
+void LLFloaterOutfitPhotoPreview::updateImageID()
+{
+ const LLViewerInventoryItem *item = static_cast<const LLViewerInventoryItem*>(getItem());
+ if(item)
+ {
+ mImageID = item->getAssetUUID();
+ LLPermissions perm(item->getPermissions());
+ }
+ else
+ {
+ mImageID = mItemUUID;
+ }
+
+}
+
+/* virtual */
+void LLFloaterOutfitPhotoPreview::setObjectID(const LLUUID& object_id)
+{
+ mObjectUUID = object_id;
+
+ const LLUUID old_image_id = mImageID;
+
+ updateImageID();
+ if (mImageID != old_image_id)
+ {
+ mAssetStatus = PREVIEW_ASSET_UNLOADED;
+ loadAsset();
+ }
+ refreshFromItem();
+}
+
+void LLFloaterOutfitPhotoPreview::setOutfitID(const LLUUID& outfit_id)
+{
+ mOutfitID = outfit_id;
+ LLViewerInventoryCategory* outfit_folder = gInventory.getCategory(mOutfitID);
+ if(outfit_folder && !mExceedLimits)
+ {
+ getChild<LLUICtrl>("notification")->setValue( getString("photo_confirmation"));
+ getChild<LLUICtrl>("notification")->setTextArg("[OUTFIT]", outfit_folder->getName());
+ getChild<LLUICtrl>("notification")->setColor(LLColor4::white);
+ }
+
+}
+
+void LLFloaterOutfitPhotoPreview::onOkBtn()
+{
+ if(mOutfitID.notNull() && getItem())
+ {
+ LLAppearanceMgr::instance().removeOutfitPhoto(mOutfitID);
+ LLPointer<LLInventoryCallback> cb = NULL;
+ link_inventory_object(mOutfitID, LLConstPointer<LLInventoryObject>(getItem()), cb);
+ }
+ closeFloater();
+}
+
+void LLFloaterOutfitPhotoPreview::onCancelBtn()
+{
+ closeFloater();
+}
diff --git a/indra/newview/llfloateroutfitphotopreview.h b/indra/newview/llfloateroutfitphotopreview.h
new file mode 100644
index 0000000000..a1e7b58abe
--- /dev/null
+++ b/indra/newview/llfloateroutfitphotopreview.h
@@ -0,0 +1,77 @@
+/**
+ * @file llfloateroutfitphotopreview.h
+ * @brief LLFloaterOutfitPhotoPreview class definition
+ *
+ * $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_LLFLOATEROUTFITPHOTOPREVIEW_H
+#define LL_LLFLOATEROUTFITPHOTOPREVIEW_H
+
+#include "llpreview.h"
+#include "llbutton.h"
+#include "llframetimer.h"
+#include "llviewertexture.h"
+
+class LLComboBox;
+class LLImageRaw;
+
+class LLFloaterOutfitPhotoPreview : public LLPreview
+{
+public:
+ LLFloaterOutfitPhotoPreview(const LLSD& key);
+ ~LLFloaterOutfitPhotoPreview();
+
+ virtual void draw();
+
+ virtual void loadAsset();
+ virtual EAssetStatus getAssetStatus();
+
+ virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+
+ /*virtual*/ void setObjectID(const LLUUID& object_id);
+
+ void setOutfitID(const LLUUID& outfit_id);
+ void onOkBtn();
+ void onCancelBtn();
+
+protected:
+ void init();
+ /* virtual */ BOOL postBuild();
+
+private:
+ void updateImageID(); // set what image is being uploaded.
+ void updateDimensions();
+ LLUUID mImageID;
+ LLUUID mOutfitID;
+ LLPointer<LLViewerFetchedTexture> mImage;
+ S32 mImageOldBoostLevel;
+
+ // This is stored off in a member variable, because the save-as
+ // button and drag and drop functionality need to know.
+ BOOL mUpdateDimensions;
+
+ BOOL mExceedLimits;
+
+ LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
+};
+#endif // LL_LLFLOATEROUTFITPHOTOPREVIEW_H
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp
index dfe462c8d1..87973c2286 100644
--- a/indra/newview/llfloaterpay.cpp
+++ b/indra/newview/llfloaterpay.cpp
@@ -284,7 +284,6 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata)
self->mQuickPayButton[i]->setLabelUnselected(button_str);
self->mQuickPayButton[i]->setVisible(TRUE);
self->mQuickPayInfo[i]->mAmount = pay_button;
- self->getChildView("fastpay text")->setVisible(TRUE);
if ( pay_button > max_pay_amount )
{
@@ -412,7 +411,6 @@ void LLFloaterPay::payDirectly(money_callback callback,
floater->getChildView("pay btn")->setVisible(TRUE);
floater->getChildView("amount text")->setVisible(TRUE);
- floater->getChildView("fastpay text")->setVisible(TRUE);
for(S32 i=0;i<MAX_PAY_BUTTONS;++i)
{
floater->mQuickPayButton[i]->setVisible(TRUE);
@@ -594,7 +592,8 @@ void LLFloaterPay::give(S32 amount)
else
{
// just transfer the L$
- mCallback(mTargetUUID, gAgent.getRegion(), amount, mTargetIsGroup, TRANS_GIFT, LLStringUtil::null);
+ std::string paymentMessage(getChild<LLLineEditor>("payment_message")->getValue().asString());
+ mCallback(mTargetUUID, gAgent.getRegion(), amount, mTargetIsGroup, TRANS_GIFT, (paymentMessage.empty() ? LLStringUtil::null : paymentMessage));
// check if the payee needs to be unmuted
LLMuteList::getInstance()->autoRemove(mTargetUUID, LLMuteList::AR_MONEY);
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index a6ce0ba678..790e2b3ad1 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -37,6 +37,7 @@
#include "llcachename.h"
#include "llcheckboxctrl.h"
#include "llfontgl.h"
+#include "llimagebmp.h"
#include "llimagej2c.h"
#include "llinventory.h"
#include "llnotificationsutil.h"
@@ -76,6 +77,7 @@
#include "llselectmgr.h"
#include "llversioninfo.h"
#include "lluictrlfactory.h"
+#include "llviewercontrol.h"
#include "llviewernetwork.h"
#include "llagentui.h"
@@ -86,6 +88,7 @@
#include "llcorehttputil.h"
#include "llviewerassetupload.h"
+const std::string SCREEN_PREV_FILENAME = "screen_report_last.bmp";
//=========================================================================
//-----------------------------------------------------------------------------
@@ -181,11 +184,6 @@ BOOL LLFloaterReporter::postBuild()
}
setPosBox(pos);
- // Take a screenshot, but don't draw this floater.
- setVisible(FALSE);
- takeScreenshot();
- setVisible(TRUE);
-
// Default text to be blank
getChild<LLUICtrl>("object_name")->setValue(LLStringUtil::null);
getChild<LLUICtrl>("owner_name")->setValue(LLStringUtil::null);
@@ -769,18 +767,24 @@ void LLFloaterReporter::sendReportViaCaps(std::string url, std::string sshot_url
}
}
-void LLFloaterReporter::takeScreenshot()
+void LLFloaterReporter::takeScreenshot(bool use_prev_screenshot)
{
- const S32 IMAGE_WIDTH = 1024;
- const S32 IMAGE_HEIGHT = 768;
-
- LLPointer<LLImageRaw> raw = new LLImageRaw;
- if( !gViewerWindow->rawSnapshot(raw, IMAGE_WIDTH, IMAGE_HEIGHT, TRUE, FALSE, TRUE, FALSE))
+ gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", TRUE);
+ if(!use_prev_screenshot)
{
- LL_WARNS() << "Unable to take screenshot" << LL_ENDL;
- return;
+ std::string screenshot_filename(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + SCREEN_PREV_FILENAME);
+ LLPointer<LLImageBMP> bmp_image = new LLImageBMP;
+ if(bmp_image->encode(mImageRaw, 0.0f))
+ {
+ bmp_image->save(screenshot_filename);
+ }
+ }
+ else
+ {
+ mImageRaw = mPrevImageRaw;
}
- LLPointer<LLImageJ2C> upload_data = LLViewerTextureList::convertToUploadFile(raw);
+
+ LLPointer<LLImageJ2C> upload_data = LLViewerTextureList::convertToUploadFile(mImageRaw);
// create a resource data
mResourceDatap->mInventoryType = LLInventoryType::IT_NONE;
@@ -812,7 +816,7 @@ void LLFloaterReporter::takeScreenshot()
// store in the image list so it doesn't try to fetch from the server
LLPointer<LLViewerFetchedTexture> image_in_list =
LLViewerTextureManager::getFetchedTexture(mResourceDatap->mAssetInfo.mUuid);
- image_in_list->createGLTexture(0, raw, 0, TRUE, LLGLTexture::OTHER);
+ image_in_list->createGLTexture(0, mImageRaw, 0, TRUE, LLGLTexture::OTHER);
// the texture picker then uses that texture
LLTextureCtrl* texture = getChild<LLTextureCtrl>("screenshot");
@@ -822,7 +826,46 @@ void LLFloaterReporter::takeScreenshot()
texture->setDefaultImageAssetID(mResourceDatap->mAssetInfo.mUuid);
texture->setCaption(getString("Screenshot"));
}
+}
+
+void LLFloaterReporter::onOpen(const LLSD& key)
+{
+ mImageRaw = new LLImageRaw;
+ const S32 IMAGE_WIDTH = 1024;
+ const S32 IMAGE_HEIGHT = 768;
+
+ // Take a screenshot, but don't draw this floater.
+ setVisible(FALSE);
+ if( !gViewerWindow->rawSnapshot(mImageRaw, IMAGE_WIDTH, IMAGE_HEIGHT, TRUE, FALSE, TRUE, FALSE))
+ {
+ LL_WARNS() << "Unable to take screenshot" << LL_ENDL;
+ setVisible(TRUE);
+ return;
+ }
+ setVisible(TRUE);
+
+ if(gSavedPerAccountSettings.getBOOL("PreviousScreenshotForReport"))
+ {
+ std::string screenshot_filename(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + SCREEN_PREV_FILENAME);
+ mPrevImageRaw = new LLImageRaw;
+ LLPointer<LLImageBMP> start_image_bmp = new LLImageBMP;
+ if(start_image_bmp->load(screenshot_filename))
+ {
+ if (start_image_bmp->decode(mPrevImageRaw, 0.0f))
+ {
+ LLNotificationsUtil::add("LoadPreviousReportScreenshot", LLSD(), LLSD(), boost::bind(&LLFloaterReporter::onLoadScreenshotDialog,this, _1, _2));
+ return;
+ }
+ }
+ }
+ takeScreenshot();
+}
+
+void LLFloaterReporter::onLoadScreenshotDialog(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ takeScreenshot(option == 0);
}
void LLFloaterReporter::uploadImage()
@@ -886,6 +929,11 @@ void LLFloaterReporter::setPosBox(const LLVector3d &pos)
getChild<LLUICtrl>("pos_field")->setValue(pos_string);
}
+void LLFloaterReporter::onClose(bool app_quitting)
+{
+ gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", app_quitting);
+}
+
// void LLFloaterReporter::setDescription(const std::string& description, LLMeanCollisionData *mcd)
// {
diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h
index 1aff07bd37..e5232268c0 100644
--- a/indra/newview/llfloaterreporter.h
+++ b/indra/newview/llfloaterreporter.h
@@ -81,6 +81,8 @@ public:
LLFloaterReporter(const LLSD& key);
/*virtual*/ ~LLFloaterReporter();
/*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void onClose(bool app_quitting);
virtual void draw();
void setReportType(EReportType type) { mReportType = type; }
@@ -103,10 +105,12 @@ public:
void setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id);
+ void onLoadScreenshotDialog(const LLSD& notification, const LLSD& response);
+
private:
static void show(const LLUUID& object_id, const std::string& avatar_name = LLStringUtil::null, const LLUUID& experience_id = LLUUID::null);
- void takeScreenshot();
+ void takeScreenshot(bool use_prev_screenshot = false);
void sendReportViaCaps(std::string url);
void uploadImage();
bool validateReport();
@@ -140,6 +144,9 @@ private:
std::string mDefaultSummary;
LLResourceData* mResourceDatap;
boost::signals2::connection mAvatarNameCacheConnection;
+
+ LLPointer<LLImageRaw> mImageRaw;
+ LLPointer<LLImageRaw> mPrevImageRaw;
};
#endif
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index eebb6a0384..02fa81d5be 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -41,6 +41,7 @@
#include "llfloateropenobject.h"
#include "llfloaterreg.h"
#include "llfloatermarketplacelistings.h"
+#include "llfloateroutfitphotopreview.h"
#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
#include "llfolderview.h"
@@ -4393,7 +4394,7 @@ static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_curr
if((inv_type == LLInventoryType::IT_TEXTURE) || (inv_type == LLInventoryType::IT_SNAPSHOT))
{
- return TRUE;
+ return !move_is_into_current_outfit;
}
if (move_is_into_current_outfit && get_is_item_worn(inv_item->getUUID()))
@@ -4448,9 +4449,15 @@ void LLFolderBridge::dropToOutfit(LLInventoryItem* inv_item, BOOL move_is_into_c
{
if((inv_item->getInventoryType() == LLInventoryType::IT_TEXTURE) || (inv_item->getInventoryType() == LLInventoryType::IT_SNAPSHOT))
{
- LLAppearanceMgr::instance().removeOutfitPhoto(mUUID);
- LLPointer<LLInventoryCallback> cb = NULL;
- link_inventory_object(mUUID, LLConstPointer<LLInventoryObject>(inv_item), cb);
+ const LLUUID &my_outifts_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS, false);
+ if(mUUID != my_outifts_id)
+ {
+ LLFloaterOutfitPhotoPreview* photo_preview = LLFloaterReg::showTypedInstance<LLFloaterOutfitPhotoPreview>("outfit_photo_preview", inv_item->getUUID());
+ if(photo_preview)
+ {
+ photo_preview->setOutfitID(mUUID);
+ }
+ }
return;
}
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp
index 36e1cc97d1..1dc1aa395e 100644
--- a/indra/newview/llinventoryitemslist.cpp
+++ b/indra/newview/llinventoryitemslist.cpp
@@ -45,7 +45,7 @@ LLInventoryItemsList::Params::Params()
LLInventoryItemsList::LLInventoryItemsList(const LLInventoryItemsList::Params& p)
: LLFlatListViewEx(p)
-, mNeedsRefresh(false)
+, mRefreshState(REFRESH_COMPLETE)
, mForceRefresh(false)
{
// TODO: mCommitOnSelectionChange is set to "false" in LLFlatListView
@@ -66,13 +66,13 @@ LLInventoryItemsList::~LLInventoryItemsList()
void LLInventoryItemsList::refreshList(const LLInventoryModel::item_array_t item_array)
{
- getIDs().clear();
+ getIDs().clear();
LLInventoryModel::item_array_t::const_iterator it = item_array.begin();
for( ; item_array.end() != it; ++it)
{
getIDs().push_back((*it)->getUUID());
}
- mNeedsRefresh = true;
+ mRefreshState = REFRESH_ALL;
}
boost::signals2::connection LLInventoryItemsList::setRefreshCompleteCallback(const commit_signal_t::slot_type& cb)
@@ -113,9 +113,9 @@ void LLInventoryItemsList::updateSelection()
void LLInventoryItemsList::doIdle()
{
- if (!mNeedsRefresh) return;
+ if (mRefreshState == REFRESH_COMPLETE) return;
- if (isInVisibleChain() || mForceRefresh)
+ if (isInVisibleChain() || mForceRefresh )
{
refresh();
@@ -137,54 +137,130 @@ LLTrace::BlockTimerStatHandle FTM_INVENTORY_ITEMS_REFRESH("Inventory List Refres
void LLInventoryItemsList::refresh()
{
- LL_RECORD_BLOCK_TIME(FTM_INVENTORY_ITEMS_REFRESH);
- static const unsigned ADD_LIMIT = 20;
-
- uuid_vec_t added_items;
- uuid_vec_t removed_items;
-
- computeDifference(getIDs(), added_items, removed_items);
-
- bool add_limit_exceeded = false;
- unsigned int nadded = 0;
-
- uuid_vec_t::const_iterator it = added_items.begin();
- for( ; added_items.end() != it; ++it)
- {
- if(nadded >= ADD_LIMIT)
- {
- add_limit_exceeded = true;
- break;
- }
- LLViewerInventoryItem* item = gInventory.getItem(*it);
- // Do not rearrange items on each adding, let's do that on filter call
- llassert(item);
- if (item)
- {
- addNewItem(item, false);
- ++nadded;
- }
- }
-
- it = removed_items.begin();
- for( ; removed_items.end() != it; ++it)
- {
- // don't filter items right away
- removeItemByUUID(*it, false);
- }
-
- // Filter, rearrange and notify parent about shape changes
- filterItems();
-
- bool needs_refresh = add_limit_exceeded;
- setNeedsRefresh(needs_refresh);
- setForceRefresh(needs_refresh);
-
- // After list building completed, select items that had been requested to select before list was build
- if(!needs_refresh)
- {
- updateSelection();
- }
+ LL_RECORD_BLOCK_TIME(FTM_INVENTORY_ITEMS_REFRESH);
+
+ switch (mRefreshState)
+ {
+ case REFRESH_ALL:
+ {
+ mAddedItems.clear();
+ mRemovedItems.clear();
+ computeDifference(getIDs(), mAddedItems, mRemovedItems);
+ if (mRemovedItems.size() > 0)
+ {
+ mRefreshState = REFRESH_LIST_ERASE;
+ }
+ else if (mAddedItems.size() > 0)
+ {
+ mRefreshState = REFRESH_LIST_APPEND;
+ }
+ else
+ {
+ mRefreshState = REFRESH_LIST_SORT;
+ }
+
+ rearrangeItems();
+ notifyParentItemsRectChanged();
+ break;
+ }
+ case REFRESH_LIST_ERASE:
+ {
+ uuid_vec_t::const_iterator it = mRemovedItems.begin();
+ for (; mRemovedItems.end() != it; ++it)
+ {
+ // don't filter items right away
+ removeItemByUUID(*it, false);
+ }
+ mRemovedItems.clear();
+ mRefreshState = REFRESH_LIST_SORT; // fix visibility and arrange
+ break;
+ }
+ case REFRESH_LIST_APPEND:
+ {
+ static const unsigned ADD_LIMIT = 25; // Note: affects perfomance
+
+ unsigned int nadded = 0;
+
+ // form a list to add
+ uuid_vec_t::iterator it = mAddedItems.begin();
+ pairs_list_t panel_list;
+ while(mAddedItems.size() > 0 && nadded < ADD_LIMIT)
+ {
+ LLViewerInventoryItem* item = gInventory.getItem(*it);
+ llassert(item);
+ if (item)
+ {
+ LLPanel *list_item = createNewItem(item);
+ if (list_item)
+ {
+ item_pair_t* new_pair = new item_pair_t(list_item, item->getUUID());
+ panel_list.push_back(new_pair);
+ ++nadded;
+ }
+ }
+
+ it = mAddedItems.erase(it);
+ }
+
+ // add the list
+ // Note: usually item pairs are sorted with std::sort, but we are calling
+ // this function on idle and pairs' list can take a lot of time to sort
+ // through, so we are sorting items into list while adding them
+ addItemPairs(panel_list, false);
+
+ // update visibility of items in the list
+ std::string cur_filter = getFilterSubString();
+ LLStringUtil::toUpper(cur_filter);
+ LLSD action;
+ action.with("match_filter", cur_filter);
+
+ pairs_const_iterator_t pair_it = panel_list.begin();
+ for (; pair_it != panel_list.end(); ++pair_it)
+ {
+ item_pair_t* item_pair = *pair_it;
+ if (item_pair->first->getParent() != NULL)
+ {
+ updateItemVisibility(item_pair->first, action);
+ }
+ }
+
+ rearrangeItems();
+ notifyParentItemsRectChanged();
+
+ if (mAddedItems.size() > 0)
+ {
+ mRefreshState = REFRESH_LIST_APPEND;
+ }
+ else
+ {
+ // Note: while we do sort and check visibility at REFRESH_LIST_APPEND, update
+ // could have changed something about existing items so redo checks for all items.
+ mRefreshState = REFRESH_LIST_SORT;
+ }
+ break;
+ }
+ case REFRESH_LIST_SORT:
+ {
+ // Filter, sort, rearrange and notify parent about shape changes
+ filterItems();
+
+ if (mAddedItems.size() == 0)
+ {
+ // After list building completed, select items that had been requested to select before list was build
+ updateSelection();
+ mRefreshState = REFRESH_COMPLETE;
+ }
+ else
+ {
+ mRefreshState = REFRESH_LIST_APPEND;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ setForceRefresh(mRefreshState != REFRESH_COMPLETE);
}
void LLInventoryItemsList::computeDifference(
@@ -204,24 +280,15 @@ void LLInventoryItemsList::computeDifference(
LLCommonUtils::computeDifference(vnew, vcur, vadded, vremoved);
}
-void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrange /*= true*/)
+LLPanel* LLInventoryItemsList::createNewItem(LLViewerInventoryItem* item)
{
- if (!item)
- {
- LL_WARNS() << "No inventory item. Couldn't create flat list item." << LL_ENDL;
- llassert(item != NULL);
- }
-
- LLPanelInventoryListItemBase *list_item = LLPanelInventoryListItemBase::create(item);
- if (!list_item)
- return;
-
- bool is_item_added = addItem(list_item, item->getUUID(), ADD_BOTTOM, rearrange);
- if (!is_item_added)
- {
- LL_WARNS() << "Couldn't add flat list item." << LL_ENDL;
- llassert(is_item_added);
- }
+ if (!item)
+ {
+ LL_WARNS() << "No inventory item. Couldn't create flat list item." << LL_ENDL;
+ llassert(item != NULL);
+ return NULL;
+ }
+ return LLPanelInventoryListItemBase::create(item);
}
// EOF
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index 1aa230df99..fe05c2ed7c 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -51,9 +51,9 @@ public:
/**
* Let list know items need to be refreshed in next doIdle()
*/
- void setNeedsRefresh(bool needs_refresh){ mNeedsRefresh = needs_refresh; }
+ void setNeedsRefresh(bool needs_refresh){ mRefreshState = needs_refresh ? REFRESH_ALL : REFRESH_COMPLETE; }
- bool getNeedsRefresh(){ return mNeedsRefresh; }
+ U32 getNeedsRefresh(){ return mRefreshState; }
/**
* Sets the flag indicating that the list needs to be refreshed even if it is
@@ -71,7 +71,7 @@ public:
* This is needed for example to filter items of the list hidden by closed
* accordion tab.
*/
- void doIdle(); // Real idle routine
+ virtual void doIdle(); // Real idle routine
static void idle(void* user_data); // static glue to doIdle()
protected:
@@ -94,17 +94,29 @@ protected:
void computeDifference(const uuid_vec_t& vnew, uuid_vec_t& vadded, uuid_vec_t& vremoved);
/**
- * Add an item to the list
- */
- virtual void addNewItem(LLViewerInventoryItem* item, bool rearrange = true);
+ * Create panel(item) from inventory item
+ */
+ virtual LLPanel* createNewItem(LLViewerInventoryItem* item);
+
+protected:
+ enum ERefreshStates
+ {
+ REFRESH_COMPLETE = 0,
+ REFRESH_LIST_SORT,
+ REFRESH_LIST_APPEND,
+ REFRESH_LIST_ERASE,
+ REFRESH_ALL
+ };
+
+ ERefreshStates mRefreshState;
private:
uuid_vec_t mIDs; // IDs of items that were added in refreshList().
// Will be used in refresh() to determine added and removed ids
uuid_vec_t mSelectTheseIDs; // IDs that will be selected if list is not loaded till now
-
- bool mNeedsRefresh;
+ uuid_vec_t mAddedItems;
+ uuid_vec_t mRemovedItems;
bool mForceRefresh;
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index de6a36ce2f..13eb148788 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -106,7 +106,8 @@ BOOL LLOutfitGallery::postBuild()
{
BOOL rv = LLOutfitListBase::postBuild();
mScrollPanel = getChild<LLScrollContainer>("gallery_scroll_panel");
- mGalleryPanel = getChild<LLPanel>("gallery_panel");
+ LLPanel::Params params = LLPanel::getDefaultParams(); // Don't parse XML when creating dummy LLPanel
+ mGalleryPanel = LLUICtrlFactory::create<LLPanel>(params);
mMessageTextBox = getChild<LLTextBox>("no_outfits_txt");
mOutfitGalleryMenu = new LLOutfitGalleryContextMenu(this);
return rv;
@@ -640,7 +641,6 @@ BOOL LLOutfitGalleryItem::postBuild()
mOutfitNameText = getChild<LLTextBox>("outfit_name");
mOutfitWornText = getChild<LLTextBox>("outfit_worn_text");
- mFotoBgPanel = getChild<LLPanel>("foto_bg_panel");
mTextBgPanel = getChild<LLPanel>("text_bg_panel");
setOutfitWorn(false);
mHidden = false;
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index 6b13f264a4..140e68067b 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -273,7 +273,6 @@ private:
LLTextBox* mOutfitNameText;
LLTextBox* mOutfitWornText;
LLPanel* mTextBgPanel;
- LLPanel* mFotoBgPanel;
bool mSelected;
bool mWorn;
bool mDefaultImage;
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 8b9941c0ca..d897449310 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -779,6 +779,10 @@ void LLPanelOutfitEdit::onVisibilityChanged(const LLSD &in_visible_chain)
{
update();
}
+ else
+ {
+ mWearableListManager->holdProgress(); //list population restarts with visibility
+ }
}
void LLPanelOutfitEdit::onAddWearableClicked(void)
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 3f700496a9..3a35c49007 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -42,6 +42,7 @@
#include "llpanelwearing.h"
#include "llsaveoutfitcombobtn.h"
#include "llsidepanelappearance.h"
+#include "llviewercontrol.h"
#include "llviewerfoldertype.h"
static const std::string OUTFITS_TAB_NAME = "outfitslist_tab";
@@ -67,6 +68,10 @@ LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
LLPanelOutfitsInventory::~LLPanelOutfitsInventory()
{
+ if (mAppearanceTabs)
+ {
+ gSavedSettings.setS32("LastAppearanceTab", mAppearanceTabs->getCurrentPanelIndex());
+ }
}
// virtual
@@ -87,6 +92,9 @@ BOOL LLPanelOutfitsInventory::postBuild()
mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this, true));
+ if (!mAppearanceTabs->selectTab(gSavedSettings.getS32("LastAppearanceTab")))
+ mAppearanceTabs->selectFirstTab();
+
return TRUE;
}
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index 836f63bffa..f40b3e0295 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -55,6 +55,10 @@ void LLPresetsManager::triggerChangeSignal()
void LLPresetsManager::createMissingDefault()
{
+ if(gDirUtilp->getLindenUserDir().empty())
+ {
+ return;
+ }
std::string default_file = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR, PRESETS_GRAPHIC, PRESETS_DEFAULT + ".xml");
if (!gDirUtilp->fileExists(default_file))
{
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 041eae4b3c..72c5c961aa 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -309,7 +309,7 @@ void LLStatusBar::refresh()
(LLViewerMedia::hasInWorldMedia() || LLViewerMedia::hasParcelMedia() || LLViewerMedia::hasParcelAudio());
mMediaToggle->setEnabled(button_enabled);
// Note the "sense" of the toggle is opposite whether media is playing or not
- bool any_media_playing = (LLViewerMedia::isAnyMediaShowing() ||
+ bool any_media_playing = (LLViewerMedia::isAnyMediaPlaying() ||
LLViewerMedia::isParcelMediaPlaying() ||
LLViewerMedia::isParcelAudioPlaying());
mMediaToggle->setValue(!any_media_playing);
@@ -562,8 +562,8 @@ void LLStatusBar::onClickMediaToggle(void* data)
{
LLStatusBar *status_bar = (LLStatusBar*)data;
// "Selected" means it was showing the "play" icon (so media was playing), and now it shows "pause", so turn off media
- bool enable = ! status_bar->mMediaToggle->getValue();
- LLViewerMedia::setAllMediaEnabled(enable);
+ bool pause = status_bar->mMediaToggle->getValue();
+ LLViewerMedia::setAllMediaPaused(pause);
}
BOOL can_afford_transaction(S32 cost)
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 6d13d28e18..0a78686cd4 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -93,6 +93,7 @@
#include "llfloaternotificationstabbed.h"
#include "llfloaterobjectweights.h"
#include "llfloateropenobject.h"
+#include "llfloateroutfitphotopreview.h"
#include "llfloateroutfitsnapshot.h"
#include "llfloaterpathfindingcharacters.h"
#include "llfloaterpathfindingconsole.h"
@@ -277,6 +278,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("object_weights", "floater_object_weights.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterObjectWeights>);
LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>);
LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>);
+ LLFloaterReg::add("outfit_photo_preview", "floater_outfit_photo_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOutfitPhotoPreview>);
LLFloaterPayUtil::registerFloater();
LLFloaterReg::add("pathfinding_characters", "floater_pathfinding_characters.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingCharacters>);
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 6ed063e066..00d14f1fd5 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -167,6 +167,7 @@ static bool sForceUpdate = false;
static LLUUID sOnlyAudibleTextureID = LLUUID::null;
static F64 sLowestLoadableImplInterest = 0.0f;
static bool sAnyMediaShowing = false;
+static bool sAnyMediaPlaying = false;
static boost::signals2::connection sTeleportFinishConnection;
static std::string sUpdatedCookies;
static const char *PLUGIN_COOKIE_FILE_NAME = "plugin_cookies.txt";
@@ -606,6 +607,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
createSpareBrowserMediaSource();
sAnyMediaShowing = false;
+ sAnyMediaPlaying = false;
sUpdatedCookies = getCookieStore()->getChangedCookies();
if(!sUpdatedCookies.empty())
{
@@ -808,6 +810,11 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
sAnyMediaShowing = true;
}
+ if (!pimpl->getUsedInUI() && pimpl->hasMedia() && (!pimpl->isMediaPaused() || !pimpl->isMediaTimeBased()))
+ {
+ sAnyMediaPlaying = true;
+ }
+
}
}
@@ -858,6 +865,13 @@ bool LLViewerMedia::isAnyMediaShowing()
//////////////////////////////////////////////////////////////////////////////////////////
// static
+bool LLViewerMedia::isAnyMediaPlaying()
+{
+ return sAnyMediaPlaying;
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// static
void LLViewerMedia::setAllMediaEnabled(bool val)
{
// Set "tentative" autoplay first. We need to do this here or else
@@ -913,6 +927,78 @@ void LLViewerMedia::setAllMediaEnabled(bool val)
//////////////////////////////////////////////////////////////////////////////////////////
// static
+void LLViewerMedia::setAllMediaPaused(bool val)
+{
+ // Set "tentative" autoplay first. We need to do this here or else
+ // re-enabling won't start up the media below.
+ gSavedSettings.setBOOL("MediaTentativeAutoPlay", val);
+
+ // Then
+ impl_list::iterator iter = sViewerMediaImplList.begin();
+ impl_list::iterator end = sViewerMediaImplList.end();
+
+ for (; iter != end; iter++)
+ {
+ LLViewerMediaImpl* pimpl = *iter;
+ if (!pimpl->getUsedInUI())
+ {
+ // upause/pause time based media, enable/disable any other
+ if (!val)
+ {
+ pimpl->setDisabled(val);
+ if (pimpl->isMediaTimeBased() && pimpl->isMediaPaused())
+ {
+ pimpl->play();
+ return;
+ }
+ }
+ else if (pimpl->isMediaTimeBased() && pimpl->mMediaSource)
+ {
+ pimpl->pause();
+ }
+ else
+ {
+ pimpl->setDisabled(val);
+ }
+ }
+ }
+
+ // Also do Parcel Media and Parcel Audio
+ if (!val)
+ {
+ if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia())
+ {
+ LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel());
+ }
+
+ if (gSavedSettings.getBOOL("AudioStreamingMusic") &&
+ !LLViewerMedia::isParcelAudioPlaying() &&
+ gAudiop &&
+ LLViewerMedia::hasParcelAudio())
+ {
+ if (LLAudioEngine::AUDIO_PAUSED == gAudiop->isInternetStreamPlaying())
+ {
+ // 'false' means unpause
+ gAudiop->pauseInternetStream(false);
+ }
+ else
+ {
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL());
+ }
+ }
+ }
+ else {
+ // This actually unloads the impl, as opposed to "stop"ping the media
+ LLViewerParcelMedia::stop();
+ if (gAudiop)
+ {
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// static
bool LLViewerMedia::isParcelMediaPlaying()
{
return (LLViewerMedia::hasParcelMedia() && LLViewerParcelMedia::getParcelMedia() && LLViewerParcelMedia::getParcelMedia()->hasMedia());
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 48f0d9dc4d..db07f4115b 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -105,9 +105,12 @@ public:
// Is any media currently "showing"? Includes Parcel Media. Does not include media in the UI.
static bool isAnyMediaShowing();
+ static bool isAnyMediaPlaying();
// Set all media enabled or disabled, depending on val. Does not include media in the UI.
static void setAllMediaEnabled(bool val);
-
+ // Set all media paused or playing, depending on val. Does not include media in the UI.
+ static void setAllMediaPaused(bool val);
+
static void updateMedia(void* dummy_arg = NULL);
static void initClass();
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index f472db080f..f27b77e2f1 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5467,9 +5467,12 @@ static std::string reason_from_transaction_type(S32 transaction_type,
case TRANS_CLASSIFIED_CHARGE:
return LLTrans::getString("to publish a classified ad");
+ case TRANS_GIFT:
+ // Simulator returns "Payment" if no custom description has been entered
+ return (item_desc == "Payment" ? std::string() : item_desc);
+
// These have no reason to display, but are expected and should not
// generate warnings
- case TRANS_GIFT:
case TRANS_PAY_OBJECT:
case TRANS_OBJECT_PAYS:
return std::string();
@@ -5579,6 +5582,7 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
LLSD payload;
bool you_paid_someone = (source_id == gAgentID);
+ std::string gift_suffix = (transaction_type == TRANS_GIFT ? "_gift" : "");
if (you_paid_someone)
{
if(!gSavedSettings.getBOOL("NotifyMoneySpend"))
@@ -5592,8 +5596,8 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
{
if (dest_id.notNull())
{
- message = success ? LLTrans::getString("you_paid_ldollars", args) :
- LLTrans::getString("you_paid_failure_ldollars", args);
+ message = success ? LLTrans::getString("you_paid_ldollars" + gift_suffix, args) :
+ LLTrans::getString("you_paid_failure_ldollars" + gift_suffix, args);
}
else
{
@@ -5620,7 +5624,8 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
payload["dest_id"] = dest_id;
notification = success ? "PaymentSent" : "PaymentFailure";
}
- else {
+ else
+ {
// ...someone paid you
if(!gSavedSettings.getBOOL("NotifyMoneyReceived"))
{
@@ -5631,9 +5636,10 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
name_id = source_id;
if (!reason.empty())
{
- message = LLTrans::getString("paid_you_ldollars", args);
+ message = LLTrans::getString("paid_you_ldollars" + gift_suffix, args);
}
- else {
+ else
+ {
message = LLTrans::getString("paid_you_ldollars_no_reason", args);
}
final_args["MESSAGE"] = message;
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index f8981d0c51..ee2270c323 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -653,24 +653,16 @@ LLWearableItemsList::~LLWearableItemsList()
{}
// virtual
-void LLWearableItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrange /*= true*/)
+LLPanel* LLWearableItemsList::createNewItem(LLViewerInventoryItem* item)
{
- if (!item)
- {
- LL_WARNS() << "No inventory item. Couldn't create flat list item." << LL_ENDL;
- llassert(item != NULL);
- }
-
- LLPanelWearableOutfitItem *list_item = LLPanelWearableOutfitItem::create(item, mWornIndicationEnabled);
- if (!list_item)
- return;
+ if (!item)
+ {
+ LL_WARNS() << "No inventory item. Couldn't create flat list item." << LL_ENDL;
+ llassert(item != NULL);
+ return NULL;
+ }
- bool is_item_added = addItem(list_item, item->getUUID(), ADD_BOTTOM, rearrange);
- if (!is_item_added)
- {
- LL_WARNS() << "Couldn't add flat list item." << LL_ENDL;
- llassert(is_item_added);
- }
+ return LLPanelWearableOutfitItem::create(item, mWornIndicationEnabled);
}
void LLWearableItemsList::updateList(const LLUUID& category_id)
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index 18a30f083b..63e3e9dbc9 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -453,7 +453,7 @@ public:
virtual ~LLWearableItemsList();
- /*virtual*/ void addNewItem(LLViewerInventoryItem* item, bool rearrange = true);
+ /*virtual*/ LLPanel* createNewItem(LLViewerInventoryItem* item);
void updateList(const LLUUID& category_id);
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index f2da22256c..760c294f90 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -150,6 +150,7 @@ with the same filename but different name
<texture name="Command_Places_Icon" file_name="toolbar_icons/places.png" preload="true" />
<texture name="Command_Preferences_Icon" file_name="toolbar_icons/preferences.png" preload="true" />
<texture name="Command_Profile_Icon" file_name="toolbar_icons/profile.png" preload="true" />
+ <texture name="Command_Report_Abuse_Icon" file_name="toolbar_icons/report_abuse.png" preload="true" />
<texture name="Command_Search_Icon" file_name="toolbar_icons/search.png" preload="true" />
<texture name="Command_Snapshot_Icon" file_name="toolbar_icons/snapshot.png" preload="true" />
<texture name="Command_Speak_Icon" file_name="toolbar_icons/speak.png" preload="true" />
diff --git a/indra/newview/skins/default/textures/toolbar_icons/report_abuse.png b/indra/newview/skins/default/textures/toolbar_icons/report_abuse.png
new file mode 100644
index 0000000000..d5cb6ca259
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/report_abuse.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml
index cd5cca02bd..92c5d8bcbe 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
positioning="cascading"
- ignore_ui_scale="false"
legacy_header_height="225"
can_minimize="true"
can_close="true"
diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index 521389d7b3..456e0c6b1e 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -49,7 +49,6 @@
layout="topleft"
left="8"
name="preset_views_list"
- opaque="true"
top="24"
width="212"
visible="false">
@@ -107,7 +106,6 @@
layout="topleft"
left="8"
name="camera_modes_list"
- opaque="true"
top="24"
width="212"
visible="false">
diff --git a/indra/newview/skins/default/xui/en/floater_destinations.xml b/indra/newview/skins/default/xui/en/floater_destinations.xml
index 94ebaa9cb2..4fe8e3bdd1 100644
--- a/indra/newview/skins/default/xui/en/floater_destinations.xml
+++ b/indra/newview/skins/default/xui/en/floater_destinations.xml
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
positioning="cascading"
- ignore_ui_scale="false"
legacy_header_height="225"
can_minimize="true"
can_close="true"
- user_resize="true"
can_resize="true"
min_height="230"
min_width="350"
diff --git a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml
index 8ec6735a01..52084e5f8e 100644
--- a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml
+++ b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
positioning="cascading"
- ignore_ui_scale="false"
legacy_header_height="225"
can_minimize="true"
can_close="true"
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 28c89868bd..34fa0b0fe9 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -121,7 +121,6 @@
follows="all"
layout="topleft"
name="conversations_list_panel"
- opaque="true"
top_pad="0"
left="5"
right="-1"/>
@@ -144,7 +143,6 @@
follows="all"
layout="topleft"
name="stub_panel"
- opaque="true"
top_pad="0"
left="0"
right="-1">
diff --git a/indra/newview/skins/default/xui/en/floater_outfit_photo_preview.xml b/indra/newview/skins/default/xui/en/floater_outfit_photo_preview.xml
new file mode 100644
index 0000000000..bfc1c39e9d
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_outfit_photo_preview.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ can_resize="false"
+ height="325"
+ layout="topleft"
+ name="outfit_photo_preview"
+ help_topic="preview_texture"
+ width="410">
+ <floater.string
+ name="Title">
+ Texture: [NAME]
+ </floater.string>
+ <floater.string
+ name="exceed_limits">
+ Max outfit photo size is [MAX_WIDTH]*[MAX_HEIGHT]. Please select another texture.
+ </floater.string>
+ <floater.string
+ name="photo_confirmation">
+ Set this as Outfit Photo for [OUTFIT]?
+ </floater.string>
+ <text
+ type="string"
+ halign="right"
+ length="1"
+ follows="right|bottom"
+ height="16"
+ layout="topleft"
+ left="110"
+ name="dimensions"
+ top="255"
+ width="200">
+ [WIDTH]px x [HEIGHT]px
+ </text>
+ <text
+ type="string"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="notification"
+ left="25"
+ halign="center"
+ top_pad="5"
+ width="360">
+ </text>
+ <button
+ follows="right|bottom"
+ height="22"
+ label="OK"
+ layout="topleft"
+ name="ok_btn"
+ top_pad="5"
+ right="-115"
+ top_delta="0"
+ width="90" />
+ <button
+ follows="right|bottom"
+ height="22"
+ label="Cancel"
+ layout="topleft"
+ name="cancel_btn"
+ right="-20"
+ top_delta="0"
+ width="90" />
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_pay.xml b/indra/newview/skins/default/xui/en/floater_pay.xml
index 9d91f801a6..3e3f8b49ce 100644
--- a/indra/newview/skins/default/xui/en/floater_pay.xml
+++ b/indra/newview/skins/default/xui/en/floater_pay.xml
@@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_minimize="false"
- height="186"
+ height="208"
layout="topleft"
name="Give Money"
help_topic="give_money"
@@ -43,6 +43,26 @@
width="180">
Test Name That Is Extremely Long To Check Clipping
</text>
+ <text
+ type="string"
+ follows="top|left"
+ height="18"
+ left="10"
+ name="payment_message_label"
+ top_pad="6"
+ width="120">
+ Description (optional):
+ </text>
+ <line_editor
+ border_style="line"
+ follows="left|top|right"
+ height="19"
+ top_delta="-2"
+ layout="topleft"
+ max_length_bytes="127"
+ name="payment_message"
+ right="-11"
+ width="109" />
<panel
border_thickness="0"
height="104"
@@ -125,7 +145,7 @@
top_pad="0"
max_length_bytes="9"
name="amount"
- width="90" />
+ right="-1" />
<button
enabled="false"
height="23"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 3c28233875..91e4c1b603 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -1104,7 +1104,6 @@ even though the user gets a free copy.
name="Edit Cost"
label="L$"
label_width="15"
- label_text.valign="center"
valign="center"
width="85"
min_val="0"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 5c896b8511..bc8166fcce 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1491,7 +1491,20 @@ Delete Notecard?
notext="Cancel"
yestext="OK"/>
</notification>
-
+
+ <notification
+ icon="alertmodal.tga"
+ name="LoadPreviousReportScreenshot"
+ type="alertmodal">
+ <unique/>
+Do you want to use previous screenshot for your report?
+ <tag>confirm</tag>
+ <usetemplate
+ name="okcancelbuttons"
+ notext="Cancel"
+ yestext="OK"/>
+ </notification>
+
<notification
icon="alertmodal.tga"
name="GestureSaveFailedTooManySteps"
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index ded814bbeb..3a34bcbe21 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -15,7 +15,6 @@
<layout_stack
follows="left|right|top"
height="172"
- min_height="172"
left="0"
name="ui_stack"
orientation="horizontal"
@@ -50,7 +49,7 @@
label="Username"
combo_editor.font="SansSerifLarge"
max_chars="128"
- commit_on_focus_lost="false"
+ combo_editor.commit_on_focus_lost="false"
combo_editor.prevalidate_callback="ascii"
tool_tip="The username you chose when you registered, like bobsmith12 or Steller Sunshine"
name="username_combo"
@@ -107,7 +106,7 @@
follows="left|top"
image_unselected="PushButton_Login"
image_pressed="PushButton_Login_Pressed"
- image_hover="PushButton_Login_Over"
+ image_hover_unselected="PushButton_Login_Over"
label="Log In"
label_color="White"
font="SansSerifMedium"
diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml
index 94c468e1bb..4d9316768b 100644
--- a/indra/newview/skins/default/xui/en/panel_notification.xml
+++ b/indra/newview/skins/default/xui/en/panel_notification.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_opaque="false"
- border_visible="false"
+ border_visible="false"
background_visible="true"
bg_alpha_color="PanelNotificationBackground"
bg_opaque_color="PanelNotificationBackground"
@@ -10,18 +10,17 @@
left="0"
name="notification_panel"
chrome="true"
- show_title="false"
top="0"
- height="140"
+ height="140"
translate="false"
width="305">
<!-- THIS PANEL CONTROLS TOAST HEIGHT? -->
<panel
- border_visible="false"
- bevel_style="none"
+ border_visible="false"
+ bevel_style="none"
background_visible="true"
- bg_alpha_color="ToastBackground"
- bg_opaque_color="ToastBackground"
+ bg_alpha_color="ToastBackground"
+ bg_opaque_color="ToastBackground"
follows="left|right|top"
height="100"
label="info_panel"
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml
index c1272c6bf8..e3790ae09b 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml
@@ -34,12 +34,9 @@
Searching...
</text>
<scroll_container
- border="true"
- bevel_style="none"
follows="all"
height="400"
width="312"
- min_width="312"
layout="topleft"
left="4"
top="0"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index d3e24a19ef..9995523e61 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -59,7 +59,6 @@
name="inbox_layout_panel"
visible="false"
min_dim="35"
- max_dim="235"
expanded_min_dim="90"
height="235">
<panel
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 9b3fb06bdf..23379ff777 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3698,12 +3698,15 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<!-- Financial operations strings -->
<string name="paid_you_ldollars">[NAME] paid you L$[AMOUNT] [REASON].</string>
+ <string name="paid_you_ldollars_gift">[NAME] paid you L$[AMOUNT]: [REASON]</string>
<string name="paid_you_ldollars_no_reason">[NAME] paid you L$[AMOUNT].</string>
<string name="you_paid_ldollars">You paid [NAME] L$[AMOUNT] [REASON].</string>
+ <string name="you_paid_ldollars_gift">You paid [NAME] L$[AMOUNT]: [REASON]</string>
<string name="you_paid_ldollars_no_info">You paid L$[AMOUNT].</string>
<string name="you_paid_ldollars_no_reason">You paid [NAME] L$[AMOUNT].</string>
<string name="you_paid_ldollars_no_name">You paid L$[AMOUNT] [REASON].</string>
<string name="you_paid_failure_ldollars">You failed to pay [NAME] L$[AMOUNT] [REASON].</string>
+ <string name="you_paid_failure_ldollars_gift">You failed to pay [NAME] L$[AMOUNT]: [REASON]</string>
<string name="you_paid_failure_ldollars_no_info">You failed to pay L$[AMOUNT].</string>
<string name="you_paid_failure_ldollars_no_reason">You failed to pay [NAME] L$[AMOUNT].</string>
<string name="you_paid_failure_ldollars_no_name">You failed to pay L$[AMOUNT] [REASON].</string>
@@ -4038,6 +4041,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Places_Label">Places</string>
<string name="Command_Preferences_Label">Preferences</string>
<string name="Command_Profile_Label">Profile</string>
+ <string name="Command_Report_Abuse_Label">Report Abuse</string>
<string name="Command_Search_Label">Search</string>
<string name="Command_Snapshot_Label">Snapshot</string>
<string name="Command_Speak_Label">Speak</string>
@@ -4069,6 +4073,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Places_Tooltip">Places you've saved</string>
<string name="Command_Preferences_Tooltip">Preferences</string>
<string name="Command_Profile_Tooltip">Edit or view your profile</string>
+ <string name="Command_Report_Abuse_Tooltip">Report Abuse</string>
<string name="Command_Search_Tooltip">Find places, events, people</string>
<string name="Command_Snapshot_Tooltip">Take a picture</string>
<string name="Command_Speak_Tooltip">Speak with people nearby using your microphone</string>
diff --git a/indra/newview/skins/default/xui/en/widgets/slider.xml b/indra/newview/skins/default/xui/en/widgets/slider.xml
index f735d09476..6cceafc9ae 100644
--- a/indra/newview/skins/default/xui/en/widgets/slider.xml
+++ b/indra/newview/skins/default/xui/en/widgets/slider.xml
@@ -8,7 +8,6 @@
text_color="LabelTextColor"
text_disabled_color="LabelDisabledColor">
<slider.value_editor name="slider editor"
- max_length="10"
follows="left|bottom"/>
<slider.value_text name="slider text"
follows="left|bottom"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/texture_picker.xml b/indra/newview/skins/default/xui/en/widgets/texture_picker.xml
index ba2fdf4f1f..1511116ba6 100644
--- a/indra/newview/skins/default/xui/en/widgets/texture_picker.xml
+++ b/indra/newview/skins/default/xui/en/widgets/texture_picker.xml
@@ -5,8 +5,7 @@
follows="left|top"
>
<multiselect_text font="SansSerifSmall"/>
- <caption_text text="Multiple"
- halign="center"
+ <caption_text halign="center"
font="SansSerifSmall"
v_pad="2"/>
<border bevel_style="in"/>