summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llmessage/llexperiencecache.cpp26
-rw-r--r--indra/llmessage/llexperiencecache.h3
-rw-r--r--indra/llprimitive/llprimitive.cpp2
-rw-r--r--indra/llui/lleditmenuhandler.h3
-rw-r--r--indra/llui/lltexteditor.cpp4
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/llfilteredwearablelist.cpp30
-rw-r--r--indra/newview/llfilteredwearablelist.h12
-rw-r--r--indra/newview/llfloatermarketplacelistings.cpp1
-rw-r--r--indra/newview/llinventoryitemslist.h5
-rw-r--r--indra/newview/llpaneloutfitedit.cpp6
-rw-r--r--indra/newview/llpreviewscript.cpp10
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp11
-rw-r--r--indra/newview/llviewermenu.cpp25
-rw-r--r--indra/newview/skins/default/xui/en/menu_edit.xml9
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml9
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_uploads.xml20
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml3
18 files changed, 120 insertions, 61 deletions
diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp
index 779d1d9d99..aa7b3c1260 100644
--- a/indra/llmessage/llexperiencecache.cpp
+++ b/indra/llmessage/llexperiencecache.cpp
@@ -540,18 +540,34 @@ void LLExperienceCache::fetchAssociatedExperience(const LLUUID& objectId, const
}
LLCoprocedureManager::instance().enqueueCoprocedure("ExpCache", "Fetch Associated",
- boost::bind(&LLExperienceCache::fetchAssociatedExperienceCoro, this, _1, objectId, itemId, fn));
+ boost::bind(&LLExperienceCache::fetchAssociatedExperienceCoro, this, _1, objectId, itemId, std::string(), fn));
}
-void LLExperienceCache::fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID objectId, LLUUID itemId, ExperienceGetFn_t fn)
+void LLExperienceCache::fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, std::string url, ExperienceGetFn_t fn)
+{
+ if (mCapability.empty())
+ {
+ LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL;
+ return;
+ }
+
+ LLCoprocedureManager::instance().enqueueCoprocedure("ExpCache", "Fetch Associated",
+ boost::bind(&LLExperienceCache::fetchAssociatedExperienceCoro, this, _1, objectId, itemId, url, fn));
+}
+
+void LLExperienceCache::fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID objectId, LLUUID itemId, std::string url, ExperienceGetFn_t fn)
{
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest());
- std::string url = mCapability("GetMetadata");
if (url.empty())
{
- LL_WARNS("ExperienceCache") << "No Metadata capability." << LL_ENDL;
- return;
+ url = mCapability("GetMetadata");
+
+ if (url.empty())
+ {
+ LL_WARNS("ExperienceCache") << "No Metadata capability." << LL_ENDL;
+ return;
+ }
}
LLSD fields;
diff --git a/indra/llmessage/llexperiencecache.h b/indra/llmessage/llexperiencecache.h
index 8ee7080d38..f9ff69c2b6 100644
--- a/indra/llmessage/llexperiencecache.h
+++ b/indra/llmessage/llexperiencecache.h
@@ -64,6 +64,7 @@ public:
//-------------------------------------------
void fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, ExperienceGetFn_t fn);
+ void fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, std::string url, ExperienceGetFn_t fn);
void findExperienceByName(const std::string text, int page, ExperienceGetFn_t fn);
void getGroupExperiences(const LLUUID &groupId, ExperienceGetFn_t fn);
@@ -148,7 +149,7 @@ private:
void requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, std::string, RequestQueue_t);
void requestExperiences();
- void fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID, LLUUID, ExperienceGetFn_t);
+ void fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID, LLUUID, std::string, ExperienceGetFn_t);
void findExperienceByNameCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, std::string, int, ExperienceGetFn_t);
void getGroupExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID , ExperienceGetFn_t);
void regionExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, CapabilityQuery_t regioncaps, bool update, LLSD experiences, ExperienceGetFn_t fn);
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 186716609c..bfa65666b5 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -172,7 +172,7 @@ LLPrimitive::~LLPrimitive()
{
clearTextureList();
// Cleanup handled by volume manager
- if (mVolumep)
+ if (mVolumep && sVolumeManager)
{
sVolumeManager->unrefVolume(mVolumep);
}
diff --git a/indra/llui/lleditmenuhandler.h b/indra/llui/lleditmenuhandler.h
index 0932f094ef..cd4fea8c52 100644
--- a/indra/llui/lleditmenuhandler.h
+++ b/indra/llui/lleditmenuhandler.h
@@ -58,9 +58,6 @@ public:
virtual void deselect() {};
virtual BOOL canDeselect() const { return FALSE; }
-
- virtual void duplicate() {};
- virtual BOOL canDuplicate() const { return FALSE; }
// TODO: Instead of being a public data member, it would be better to hide it altogether
// and have a "set" method and then a bunch of static versions of the cut, copy, paste
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 73f961b36b..1a49b94c23 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -1459,6 +1459,10 @@ void LLTextEditor::pasteHelper(bool is_primary)
// Clean up string (replace tabs and remove characters that our fonts don't support).
void LLTextEditor::cleanStringForPaste(LLWString & clean_string)
{
+ std::string clean_string_utf = wstring_to_utf8str(clean_string);
+ std::replace( clean_string_utf.begin(), clean_string_utf.end(), '\r', '\n');
+ clean_string = utf8str_to_wstring(clean_string_utf);
+
LLWStringUtil::replaceTabsWithSpaces(clean_string, SPACES_PER_TAB);
if( mAllowEmbeddedItems )
{
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 62e32c0bdc..f53ba01d37 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -5592,6 +5592,8 @@ void LLAppViewer::forceErrorBreakpoint()
LL_WARNS() << "Forcing a deliberate breakpoint" << LL_ENDL;
#ifdef LL_WINDOWS
DebugBreak();
+#else
+ asm ("int $3");
#endif
return;
}
diff --git a/indra/newview/llfilteredwearablelist.cpp b/indra/newview/llfilteredwearablelist.cpp
index f2af9b5300..e67a6a2b77 100644
--- a/indra/newview/llfilteredwearablelist.cpp
+++ b/indra/newview/llfilteredwearablelist.cpp
@@ -37,6 +37,7 @@
LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector)
: mWearableList(list)
, mCollector(collector)
+, mListStale(true)
{
llassert(mWearableList);
gInventory.addObserver(this);
@@ -64,7 +65,16 @@ void LLFilteredWearableListManager::changed(U32 mask)
return;
}
- populateList();
+ if (mWearableList->isInVisibleChain() || mWearableList->getForceRefresh())
+ {
+ // Todo: current populateList() is time consuming and changed() is time-sensitive,
+ // either move from here or optimize
+ populateList();
+ }
+ else
+ {
+ mListStale = true;
+ }
}
void LLFilteredWearableListManager::setFilterCollector(LLInventoryCollectFunctor* collector)
@@ -73,13 +83,31 @@ void LLFilteredWearableListManager::setFilterCollector(LLInventoryCollectFunctor
populateList();
}
+void LLFilteredWearableListManager::populateIfNeeded()
+{
+ if (mListStale)
+ {
+ populateList();
+ }
+}
+
+LLTrace::BlockTimerStatHandle FTM_MANAGER_LIST_POPULATION("Manager List Population");
+
void LLFilteredWearableListManager::populateList()
{
+ LL_RECORD_BLOCK_TIME(FTM_MANAGER_LIST_POPULATION);
+
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
if(mCollector)
{
+ // Too slow with large inventory!
+ // Consider refactoring into "request once, append ids on changed()", since
+ // Inventory observer provides ids of changed items this should be possible,
+ // but will likely require modifying LLInventoryItemsList to avoid code-repeats.
+ // Or make something like "gather everything and filter manually on idle"
+ mListStale = false;
gInventory.collectDescendentsIf(
gInventory.getRootFolderID(),
cat_array,
diff --git a/indra/newview/llfilteredwearablelist.h b/indra/newview/llfilteredwearablelist.h
index f44ab1466f..197302f41d 100644
--- a/indra/newview/llfilteredwearablelist.h
+++ b/indra/newview/llfilteredwearablelist.h
@@ -52,9 +52,9 @@ public:
void setFilterCollector(LLInventoryCollectFunctor* collector);
/**
- * Populates wearable list with filtered data.
- */
- void populateList();
+ * Populates wearable list with filtered data in case there were any updates.
+ */
+ void populateIfNeeded();
/**
* Drop operation
@@ -62,8 +62,14 @@ public:
void holdProgress();
private:
+ /**
+ * Populates wearable list with filtered data.
+ */
+ void populateList();
+
LLInventoryItemsList* mWearableList;
LLInventoryCollectFunctor* mCollector;
+ bool mListStale;
};
#endif //LL_LLFILTEREDWEARABLELIST_H
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp
index 18f0bc4498..889d017389 100644
--- a/indra/newview/llfloatermarketplacelistings.cpp
+++ b/indra/newview/llfloatermarketplacelistings.cpp
@@ -603,6 +603,7 @@ void LLFloaterMarketplaceListings::updateView()
text = LLTrans::getString("InventoryMarketplaceError", subs);
title = LLTrans::getString("InventoryOutboxErrorTitle");
tooltip = LLTrans::getString("InventoryOutboxErrorTooltip");
+ LL_WARNS() << "Marketplace status code: " << mkt_status << LL_ENDL;
}
mInventoryText->setValue(text);
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index fe05c2ed7c..ce41105f98 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -61,6 +61,11 @@ public:
*/
void setForceRefresh(bool force_refresh){ mForceRefresh = force_refresh; }
+ /**
+ * If refreshes when invisible.
+ */
+ bool getForceRefresh(){ return mForceRefresh; }
+
virtual bool selectItemByValue(const LLSD& value, bool select = true);
void updateSelection();
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 208ee77f2d..3f6bdde127 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -578,7 +578,6 @@ void LLPanelOutfitEdit::onOpen(const LLSD& key)
// *TODO: this method is called even panel is not visible to user because its parent layout panel is hidden.
// So, we can defer initializing a bit.
mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, mListViewItemTypes[LVIT_ALL]->collector);
- mWearableListManager->populateList();
displayCurrentOutfit();
mInitialized = true;
}
@@ -632,6 +631,10 @@ void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables)
// Reset mWearableItemsList position to top. See EXT-8180.
mWearableItemsList->goToTop();
}
+ else
+ {
+ mWearableListManager->populateIfNeeded();
+ }
//switching button bars
getChildView("no_add_wearables_button_bar")->setVisible( !show_add_wearables);
@@ -661,6 +664,7 @@ void LLPanelOutfitEdit::showWearablesListView()
{
updateWearablesPanelVerbButtons();
updateFiltersVisibility();
+ mWearableListManager->populateIfNeeded();
}
mListViewBtn->setToggleState(TRUE);
}
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index f28ffce602..5cdc5dfd38 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1870,8 +1870,14 @@ void LLLiveLSLEditor::loadAsset()
if(item)
{
- LLExperienceCache::instance().fetchAssociatedExperience(item->getParentUUID(), item->getUUID(),
- boost::bind(&LLLiveLSLEditor::setAssociatedExperience, getDerivedHandle<LLLiveLSLEditor>(), _1));
+ LLViewerRegion* region = object->getRegion();
+ std::string url = std::string();
+ if(region)
+ {
+ url = region->getCapability("GetMetadata");
+ }
+ LLExperienceCache::instance().fetchAssociatedExperience(item->getParentUUID(), item->getUUID(), url,
+ boost::bind(&LLLiveLSLEditor::setAssociatedExperience, getDerivedHandle<LLLiveLSLEditor>(), _1));
bool isGodlike = gAgent.isGodlike();
bool copyManipulate = gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE);
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index af2173dd17..3c58dd7194 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -46,6 +46,7 @@
#include "llviewerobjectlist.h"
#include "llexperiencecache.h"
#include "lltrans.h"
+#include "llviewerregion.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -327,9 +328,13 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
LLTextBox* tb = getChild<LLTextBox>("LabelItemExperience");
tb->setText(getString("loading_experience"));
tb->setVisible(TRUE);
-
- LLExperienceCache::instance().fetchAssociatedExperience(item->getParentUUID(), item->getUUID(),
- boost::bind(&LLSidepanelItemInfo::setAssociatedExperience, getDerivedHandle<LLSidepanelItemInfo>(), _1));
+ std::string url = std::string();
+ if(object && object->getRegion())
+ {
+ url = object->getRegion()->getCapability("GetMetadata");
+ }
+ LLExperienceCache::instance().fetchAssociatedExperience(item->getParentUUID(), item->getUUID(), url,
+ boost::bind(&LLSidepanelItemInfo::setAssociatedExperience, getDerivedHandle<LLSidepanelItemInfo>(), _1));
}
//////////////////////
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 605d1a04e6..c68f6b8a15 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -4177,27 +4177,6 @@ class LLViewToggleUI : public view_listener_t
}
};
-class LLEditDuplicate : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- if(LLEditMenuHandler::gEditMenuHandler)
- {
- LLEditMenuHandler::gEditMenuHandler->duplicate();
- }
- return true;
- }
-};
-
-class LLEditEnableDuplicate : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDuplicate();
- return new_value;
- }
-};
-
void handle_duplicate_in_place(void*)
{
LL_INFOS() << "handle_duplicate_in_place" << LL_ENDL;
@@ -8710,7 +8689,6 @@ void initialize_edit_menu()
view_listener_t::addMenu(new LLEditDelete(), "Edit.Delete");
view_listener_t::addMenu(new LLEditSelectAll(), "Edit.SelectAll");
view_listener_t::addMenu(new LLEditDeselect(), "Edit.Deselect");
- view_listener_t::addMenu(new LLEditDuplicate(), "Edit.Duplicate");
view_listener_t::addMenu(new LLEditTakeOff(), "Edit.TakeOff");
view_listener_t::addMenu(new LLEditEnableUndo(), "Edit.EnableUndo");
view_listener_t::addMenu(new LLEditEnableRedo(), "Edit.EnableRedo");
@@ -8720,7 +8698,6 @@ void initialize_edit_menu()
view_listener_t::addMenu(new LLEditEnableDelete(), "Edit.EnableDelete");
view_listener_t::addMenu(new LLEditEnableSelectAll(), "Edit.EnableSelectAll");
view_listener_t::addMenu(new LLEditEnableDeselect(), "Edit.EnableDeselect");
- view_listener_t::addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate");
}
@@ -9131,6 +9108,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLObjectAttachToAvatar(true), "Object.AttachToAvatar");
view_listener_t::addMenu(new LLObjectAttachToAvatar(false), "Object.AttachAddToAvatar");
view_listener_t::addMenu(new LLObjectReturn(), "Object.Return");
+ commit.add("Object.Duplicate", boost::bind(&LLSelectMgr::duplicate, LLSelectMgr::getInstance()));
view_listener_t::addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse");
view_listener_t::addMenu(new LLObjectMute(), "Object.Mute");
@@ -9152,6 +9130,7 @@ void initialize_menus()
enable.add("Object.EnableSit", boost::bind(&enable_object_sit, _1));
view_listener_t::addMenu(new LLObjectEnableReturn(), "Object.EnableReturn");
+ enable.add("Object.EnableDuplicate", boost::bind(&LLSelectMgr::canDuplicate, LLSelectMgr::getInstance()));
view_listener_t::addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse");
enable.add("Avatar.EnableMute", boost::bind(&enable_object_mute));
diff --git a/indra/newview/skins/default/xui/en/menu_edit.xml b/indra/newview/skins/default/xui/en/menu_edit.xml
index 99061e089a..6f83756f83 100644
--- a/indra/newview/skins/default/xui/en/menu_edit.xml
+++ b/indra/newview/skins/default/xui/en/menu_edit.xml
@@ -62,15 +62,6 @@
<menu_item_call.on_enable
function="Edit.EnableDelete" />
</menu_item_call>
- <menu_item_call
- label="Duplicate"
- name="Duplicate"
- shortcut="control|D">
- <menu_item_call.on_click
- function="Edit.Duplicate" />
- <menu_item_call.on_enable
- function="Edit.EnableDuplicate" />
- </menu_item_call>
<menu_item_separator/>
<menu_item_call
label="Select All"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index c96b7ae673..12df3749f6 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1025,6 +1025,15 @@
<menu_item_call.on_enable
function="Object.EnableReturn" />
</menu_item_call>
+ <menu_item_call
+ label="Duplicate"
+ name="DuplicateObject"
+ shortcut="control|D">
+ <menu_item_call.on_click
+ function="Object.Duplicate" />
+ <menu_item_call.on_enable
+ function="Object.EnableDuplicate" />
+ </menu_item_call>
</menu>
<menu
create_jump_keys="true"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml b/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml
index 487da54fdf..343c2db2f1 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml
@@ -38,13 +38,14 @@
type="string"
use_ellipses="true"
follows="left|top"
- height="23"
+ height="27"
layout="topleft"
font.style="BOLD"
left="37"
name="upload_textures"
top_pad="5"
- width="350" />
+ width="370"
+ word_wrap="true"/>
<text
type="string"
@@ -62,13 +63,14 @@
type="string"
use_ellipses="true"
follows="left|top"
- height="23"
+ height="27"
layout="topleft"
font.style="BOLD"
left="37"
name="upload_sounds"
top_pad="5"
- width="350" />
+ width="370"
+ word_wrap="true"/>
<text
type="string"
@@ -86,13 +88,14 @@
type="string"
use_ellipses="true"
follows="left|top"
- height="23"
+ height="27"
layout="topleft"
font.style="BOLD"
left="37"
name="upload_animation"
top_pad="5"
- width="350" />
+ width="370"
+ word_wrap="true"/>
<text
type="string"
@@ -110,13 +113,14 @@
type="string"
use_ellipses="true"
follows="left|top"
- height="23"
+ height="27"
layout="topleft"
font.style="BOLD"
left="37"
name="upload_models"
top_pad="5"
- width="350" />
+ width="370"
+ word_wrap="true"/>
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 5f686a87be..d6c06b0ecc 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2312,7 +2312,8 @@ We are accessing your account on the [[MARKETPLACE_CREATE_STORE_URL] Marketplace
The [[MARKETPLACE_CREATE_STORE_URL] Marketplace store] is returning errors.
</string>
<string name="InventoryMarketplaceError">
-This feature is currently in Beta. Please add your name to this [http://goo.gl/forms/FCQ7UXkakz Google form] if you would like to participate.
+An error occurred while opening Marketplace Listings.
+If you continue to receive this message, please contact Second Life support for assistance at http://support.secondlife.com
</string>
<string name="InventoryMarketplaceListingsNoItemsTitle">Your Marketplace Listings folder is empty.</string>
<string name="InventoryMarketplaceListingsNoItemsTooltip"></string>