summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llcofwearables.cpp22
-rw-r--r--indra/newview/llcofwearables.h4
-rw-r--r--indra/newview/llexpandabletextbox.cpp8
-rw-r--r--indra/newview/llinventoryfunctions.h17
-rw-r--r--indra/newview/llpaneloutfitedit.cpp25
-rw-r--r--indra/newview/llpaneloutfitedit.h3
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml3
7 files changed, 66 insertions, 16 deletions
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 88782e35dc..86d9121213 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -283,7 +283,8 @@ LLCOFWearables::LLCOFWearables() : LLPanel(),
mClothingTab(NULL),
mAttachmentsTab(NULL),
mBodyPartsTab(NULL),
- mLastSelectedTab(NULL)
+ mLastSelectedTab(NULL),
+ mCOFVersion(-1)
{
mClothingMenu = new CofClothingContextMenu(this);
mAttachmentMenu = new CofAttachmentContextMenu(this);
@@ -378,6 +379,23 @@ void LLCOFWearables::onAccordionTabStateChanged(LLUICtrl* ctrl, const LLSD& expa
void LLCOFWearables::refresh()
{
+ const LLUUID cof_id = LLAppearanceMgr::instance().getCOF();
+ if (cof_id.isNull())
+ {
+ llwarns << "COF ID cannot be NULL" << llendl;
+ return;
+ }
+
+ LLViewerInventoryCategory* catp = gInventory.getCategory(cof_id);
+ if (!catp)
+ {
+ llwarns << "COF category cannot be NULL" << llendl;
+ return;
+ }
+
+ if (mCOFVersion == catp->getVersion()) return;
+ mCOFVersion = catp->getVersion();
+
typedef std::vector<LLSD> values_vector_t;
typedef std::map<LLFlatListView*, values_vector_t> selection_map_t;
@@ -393,7 +411,7 @@ void LLCOFWearables::refresh()
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t cof_items;
- gInventory.collectDescendents(LLAppearanceMgr::getInstance()->getCOF(), cats, cof_items, LLInventoryModel::EXCLUDE_TRASH);
+ gInventory.collectDescendents(cof_id, cats, cof_items, LLInventoryModel::EXCLUDE_TRASH);
populateAttachmentsAndBodypartsLists(cof_items);
diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h
index 0518d59df3..d005b75eaa 100644
--- a/indra/newview/llcofwearables.h
+++ b/indra/newview/llcofwearables.h
@@ -81,6 +81,7 @@ public:
LLPanel* getSelectedItem();
void getSelectedItems(std::vector<LLPanel*>& selected_items) const;
+ /* Repopulate the COF wearables list if the COF category has been changed since the last refresh */
void refresh();
void clear();
@@ -123,6 +124,9 @@ protected:
LLListContextMenu* mClothingMenu;
LLListContextMenu* mAttachmentMenu;
LLListContextMenu* mBodyPartMenu;
+
+ /* COF category version since last refresh */
+ S32 mCOFVersion;
};
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 149ba2478d..92fda31cc2 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -140,7 +140,13 @@ void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,cons
// LLTextBox::setText will obliterate the expander segment, so make sure
// we generate it again by clearing mExpanderVisible
mExpanderVisible = false;
- LLTextEditor::setText(text, input_params);
+
+ // Workaround for EXT-8259: trim text before rendering it.
+ {
+ std::string trimmed_text(text);
+ LLStringUtil::trim(trimmed_text);
+ LLTextEditor::setText(trimmed_text, input_params);
+ }
// text contents have changed, segments are cleared out
// so hide the expander and determine if we need it
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 1c3f82c531..a6d7fcd956 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -271,9 +271,7 @@ public:
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLFindNonLinksByMask
-//
-//
+// Class LLFindByMask
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLFindByMask : public LLInventoryCollectFunctor
{
@@ -382,6 +380,19 @@ public:
}
};
+/* Filters out items of a particular asset type */
+class LLIsTypeActual : public LLIsType
+{
+public:
+ LLIsTypeActual(LLAssetType::EType type) : LLIsType(type) {}
+ virtual ~LLIsTypeActual() {}
+ virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+ {
+ if (item && item->getIsLinkType()) return false;
+ return LLIsType::operator()(cat, item);
+ }
+};
+
// Collect non-removable folders and items.
class LLFindNonRemovableObjects : public LLInventoryCollectFunctor
{
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index f8350a56ef..31c427d2ba 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -263,7 +263,7 @@ LLPanelOutfitEdit::LLPanelOutfitEdit()
observer.addBOFReplacedCallback(boost::bind(&LLPanelOutfitEdit::updateCurrentOutfitName, this));
observer.addBOFChangedCallback(boost::bind(&LLPanelOutfitEdit::updateVerbs, this));
observer.addOutfitLockChangedCallback(boost::bind(&LLPanelOutfitEdit::updateVerbs, this));
- observer.addCOFChangedCallback(boost::bind(&LLPanelOutfitEdit::update, this));
+ observer.addCOFChangedCallback(boost::bind(&LLPanelOutfitEdit::onCOFChanged, this));
gAgentWearables.addLoadingStartedCallback(boost::bind(&LLPanelOutfitEdit::onOutfitChanging, this, true));
gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitEdit::onOutfitChanging, this, false));
@@ -297,9 +297,9 @@ BOOL LLPanelOutfitEdit::postBuild()
mFolderViewItemTypes[FVIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK);
//order is important, see EListViewItemType for order information
- mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.All"), new LLFindByMask(ALL_ITEMS_MASK)));
- mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Clothing"), new LLIsType(LLAssetType::AT_CLOTHING)));
- mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Bodyparts"), new LLIsType(LLAssetType::AT_BODYPART)));
+ mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.All"), new LLFindNonLinksByMask(ALL_ITEMS_MASK)));
+ mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Clothing"), new LLIsTypeActual(LLAssetType::AT_CLOTHING)));
+ mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Bodyparts"), new LLIsTypeActual(LLAssetType::AT_BODYPART)));
mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Objects"), new LLFindByMask(ATTACHMENT_MASK)));;
mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("shape"), new LLFindActualWearablesOfType(LLWearableType::WT_SHAPE)));
mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("skin"), new LLFindActualWearablesOfType(LLWearableType::WT_SKIN)));
@@ -331,7 +331,7 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetCommitCallback("shop_btn_1", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL);
childSetCommitCallback("shop_btn_2", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL);
- setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChange, this));
+ setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChange, this, _2));
mCOFWearables = getChild<LLCOFWearables>("cof_wearables_list");
mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::filterWearablesBySelectedItem, this));
@@ -583,11 +583,16 @@ void LLPanelOutfitEdit::onPlusBtnClicked(void)
}
}
-void LLPanelOutfitEdit::onVisibilityChange()
+void LLPanelOutfitEdit::onVisibilityChange(const LLSD &in_visible_chain)
{
showAddWearablesPanel(false);
mWearableItemsList->resetSelection();
mInventoryItemsPanel->clearSelection();
+
+ if (in_visible_chain.asBoolean())
+ {
+ update();
+ }
}
void LLPanelOutfitEdit::onAddWearableClicked(void)
@@ -1014,5 +1019,13 @@ void LLPanelOutfitEdit::getSelectedItemsUUID(uuid_vec_t& uuid_list)
// return selected_id;
}
+void LLPanelOutfitEdit::onCOFChanged()
+{
+ //the panel is only updated when is visible to a user
+ if (!isInVisibleChain()) return;
+
+ update();
+}
+
// EOF
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index fb9a35411c..1eef211276 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -148,7 +148,7 @@ public:
void onInventorySelectionChange();
void onPlusBtnClicked(void);
- void onVisibilityChange();
+ void onVisibilityChange(const LLSD &in_visible_chain);
void applyFolderViewFilter(EFolderViewItemType type);
void applyListViewFilter(EListViewItemType type);
@@ -196,6 +196,7 @@ private:
void onOutfitChanging(bool started);
void getSelectedItemsUUID(uuid_vec_t& uuid_list);
void getCurrentItemUUID(LLUUID& selected_id);
+ void onCOFChanged();
LLTextBox* mCurrentOutfitName;
LLTextBox* mStatus;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 04a8a02ecd..60d3fb708e 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5493,7 +5493,6 @@ If you stay in this region you will be logged out.
<notification
icon="notify.tga"
name="LoadWebPage"
- persist="true"
type="notify">
Load web page [URL]?
@@ -5593,7 +5592,6 @@ Grant this request?
<notification
icon="notify.tga"
name="ScriptDialog"
- persist="true"
type="notify">
[FIRST] [LAST]&apos;s &apos;[TITLE]&apos;
[MESSAGE]
@@ -5608,7 +5606,6 @@ Grant this request?
<notification
icon="notify.tga"
name="ScriptDialogGroup"
- persist="true"
type="notify">
[GROUPNAME]&apos;s &apos;[TITLE]&apos;
[MESSAGE]