summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llaccordionctrl.cpp20
-rw-r--r--indra/llui/llaccordionctrltab.cpp3
-rw-r--r--indra/llui/llflatlistview.cpp6
-rw-r--r--indra/newview/llfloaterbuyland.cpp9
-rw-r--r--indra/newview/llinventoryitemslist.cpp74
-rw-r--r--indra/newview/llinventoryitemslist.h36
-rw-r--r--indra/newview/llinventoryobserver.cpp30
-rw-r--r--indra/newview/lloutfitslist.cpp60
-rw-r--r--indra/newview/lloutfitslist.h13
-rw-r--r--indra/newview/llpanelgroupnotices.cpp13
-rw-r--r--indra/newview/llwearableitemslist.cpp5
-rw-r--r--indra/newview/llwearableitemslist.h19
-rw-r--r--indra/newview/skins/default/xui/de/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/de/floater_buy_object.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml9
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_object.xml7
-rw-r--r--indra/newview/skins/default/xui/en/outfit_accordion_tab.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_setup.xml2
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml3
-rw-r--r--indra/newview/skins/default/xui/es/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/it/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/floater_about_land.xml2
24 files changed, 218 insertions, 109 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 136fd2a9ac..5d1d57cbb2 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -329,7 +329,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view)
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(view);
if(!accordion_tab)
return;
- if(std::find(getChildList()->begin(),getChildList()->end(),accordion_tab) == getChildList()->end())
+ if(std::find(beginChild(), endChild(), accordion_tab) == endChild())
addChild(accordion_tab);
mAccordionTabs.push_back(accordion_tab);
@@ -343,7 +343,7 @@ void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
if(!accordion_tab)
return;
- if(std::find(getChildList()->begin(),getChildList()->end(),accordion_tab) != getChildList()->end())
+ if(std::find(beginChild(), endChild(), accordion_tab) != endChild())
removeChild(accordion_tab);
for (std::vector<LLAccordionCtrlTab*>::iterator iter = mAccordionTabs.begin();
@@ -668,15 +668,23 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
if(accordion_tab->hasFocus() && i>0)
{
+ bool prev_visible_tab_found = false;
while(i>0)
{
if(mAccordionTabs[--i]->getVisible())
+ {
+ prev_visible_tab_found = true;
break;
+ }
}
-
- accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
- accordion_tab->notify(LLSD().with("action","select_last"));
- return 1;
+
+ if (prev_visible_tab_found)
+ {
+ accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
+ accordion_tab->notify(LLSD().with("action","select_last"));
+ return 1;
+ }
+ break;
}
}
return 0;
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index d389236642..3c706ce90e 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -554,7 +554,8 @@ S32 LLAccordionCtrlTab::notifyParent(const LLSD& info)
}
//LLAccordionCtrl should rearrange accodion tab if one of accordion change its size
- getParent()->notifyParent(info);
+ if (getParent()) // A parent may not be set if tabs are added dynamically.
+ getParent()->notifyParent(info);
return 1;
}
else if(str_action == "select_prev")
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index 990bf5cd22..e0b2244654 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -744,12 +744,18 @@ LLRect LLFlatListView::getLastSelectedItemRect()
void LLFlatListView::selectFirstItem ()
{
+ // No items - no actions!
+ if (mItemPairs.empty()) return;
+
selectItemPair(mItemPairs.front(), true);
ensureSelectedVisible();
}
void LLFlatListView::selectLastItem ()
{
+ // No items - no actions!
+ if (mItemPairs.empty()) return;
+
selectItemPair(mItemPairs.back(), true);
ensureSelectedVisible();
}
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index d37bc01885..76a61db5fd 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -54,6 +54,7 @@
#include "llstatusbar.h"
#include "lltextbox.h"
#include "lltexturectrl.h"
+#include "lltrans.h"
#include "llviewchildren.h"
#include "llviewercontrol.h"
#include "lluictrlfactory.h"
@@ -1172,13 +1173,13 @@ void LLFloaterBuyLandUI::refreshUI()
if (!mParcelValid)
{
- message += getString("no_parcel_selected");
+ message += LLTrans::getString("sentences_separator") + getString("no_parcel_selected");
}
else if (mParcelBillableArea == mParcelActualArea)
{
LLStringUtil::format_map_t string_args;
string_args["[AMOUNT]"] = llformat("%d ", mParcelActualArea);
- message += getString("parcel_meters", string_args);
+ message += LLTrans::getString("sentences_separator") + getString("parcel_meters", string_args);
}
else
{
@@ -1187,13 +1188,13 @@ void LLFloaterBuyLandUI::refreshUI()
{
LLStringUtil::format_map_t string_args;
string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea);
- message += getString("premium_land", string_args);
+ message += LLTrans::getString("sentences_separator") + getString("premium_land", string_args);
}
else
{
LLStringUtil::format_map_t string_args;
string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea);
- message += getString("discounted_land", string_args);
+ message += LLTrans::getString("sentences_separator") + getString("discounted_land", string_args);
}
}
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp
index 9f54b86607..dca130c672 100644
--- a/indra/newview/llinventoryitemslist.cpp
+++ b/indra/newview/llinventoryitemslist.cpp
@@ -2,6 +2,10 @@
* @file llinventoryitemslist.cpp
* @brief A list of inventory items represented by LLFlatListView.
*
+ * Class LLInventoryItemsList implements a flat list of inventory items.
+ * Class LLPanelInventoryListItem displays inventory item as an element
+ * of LLInventoryItemsList.
+ *
* $LicenseInfo:firstyear=2010&license=viewergpl$
*
* Copyright (c) 2010, Linden Research, Inc.
@@ -39,33 +43,31 @@
#include "lliconctrl.h"
#include "llinventoryfunctions.h"
+#include "llinventorymodel.h"
#include "lltextutil.h"
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
-LLPanelInventoryItem::LLPanelInventoryItem(LLAssetType::EType asset_type,
- LLInventoryType::EType inventory_type,
- U32 wearable_type,
- const std::string &item_name,
- const std::string &hl)
-: LLPanel()
- ,mItemName(item_name)
- ,mHighlightedText(hl)
- ,mIcon(NULL)
- ,mTitle(NULL)
+// static
+LLPanelInventoryListItem* LLPanelInventoryListItem::createItemPanel(const LLViewerInventoryItem* item)
{
- mItemIcon = get_item_icon(asset_type, inventory_type, wearable_type, FALSE);
-
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml");
+ if (item)
+ {
+ return new LLPanelInventoryListItem(item);
+ }
+ else
+ {
+ return NULL;
+ }
}
-LLPanelInventoryItem::~LLPanelInventoryItem()
+LLPanelInventoryListItem::~LLPanelInventoryListItem()
{}
//virtual
-BOOL LLPanelInventoryItem::postBuild()
+BOOL LLPanelInventoryListItem::postBuild()
{
mIcon = getChild<LLIconCtrl>("item_icon");
mTitle = getChild<LLTextBox>("item_name");
@@ -76,14 +78,14 @@ BOOL LLPanelInventoryItem::postBuild()
}
//virtual
-void LLPanelInventoryItem::setValue(const LLSD& value)
+void LLPanelInventoryListItem::setValue(const LLSD& value)
{
if (!value.isMap()) return;
if (!value.has("selected")) return;
childSetVisible("selected_icon", value["selected"]);
}
-void LLPanelInventoryItem::updateItem()
+void LLPanelInventoryListItem::updateItem()
{
if (mItemIcon.notNull())
mIcon->setImage(mItemIcon);
@@ -95,28 +97,47 @@ void LLPanelInventoryItem::updateItem()
mHighlightedText);
}
-void LLPanelInventoryItem::onMouseEnter(S32 x, S32 y, MASK mask)
+void LLPanelInventoryListItem::onMouseEnter(S32 x, S32 y, MASK mask)
{
childSetVisible("hovered_icon", true);
LLPanel::onMouseEnter(x, y, mask);
}
-void LLPanelInventoryItem::onMouseLeave(S32 x, S32 y, MASK mask)
+void LLPanelInventoryListItem::onMouseLeave(S32 x, S32 y, MASK mask)
{
childSetVisible("hovered_icon", false);
LLPanel::onMouseLeave(x, y, mask);
}
+LLPanelInventoryListItem::LLPanelInventoryListItem(const LLViewerInventoryItem* item)
+: LLPanel()
+ ,mIcon(NULL)
+ ,mTitle(NULL)
+{
+ mItemName = item->getName();
+ mItemIcon = get_item_icon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE);
+
+ LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml");
+}
+
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
-LLInventoryItemsList::LLInventoryItemsList(const LLFlatListView::Params& p)
+LLInventoryItemsList::Params::Params()
+{}
+
+LLInventoryItemsList::LLInventoryItemsList(const LLInventoryItemsList::Params& p)
: LLFlatListView(p)
, mNeedsRefresh(false)
-{}
+{
+ // TODO: mCommitOnSelectionChange is set to "false" in LLFlatListView
+ // but reset to true in all derived classes. This settings might need to
+ // be added to LLFlatListView::Params() and/or set to "true" by default.
+ setCommitOnSelectionChange(true);
+}
// virtual
LLInventoryItemsList::~LLInventoryItemsList()
@@ -196,10 +217,15 @@ void LLInventoryItemsList::computeDifference(
void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item)
{
- llassert(item);
+ if (!item)
+ {
+ llwarns << "No inventory item. Couldn't create flat list item." << llendl;
+ llassert(!"No inventory item. Couldn't create flat list item.");
+ }
- LLPanelInventoryItem *list_item = new LLPanelInventoryItem(item->getType(),
- item->getInventoryType(), item->getFlags(), item->getName(), LLStringUtil::null);
+ LLPanelInventoryListItem *list_item = LLPanelInventoryListItem::createItemPanel(item);
+ if (!list_item)
+ return;
if (!addItem(list_item, item->getUUID()))
{
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index 0ca4146867..b496f4b9e9 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -2,6 +2,10 @@
* @file llinventoryitemslist.h
* @brief A list of inventory items represented by LLFlatListView.
*
+ * Class LLInventoryItemsList implements a flat list of inventory items.
+ * Class LLPanelInventoryListItem displays inventory item as an element
+ * of LLInventoryItemsList.
+ *
* $LicenseInfo:firstyear=2010&license=viewergpl$
*
* Copyright (c) 2010, Linden Research, Inc.
@@ -32,28 +36,23 @@
#ifndef LL_LLINVENTORYITEMSLIST_H
#define LL_LLINVENTORYITEMSLIST_H
-#include "llpanel.h"
-
-#include "llassettype.h"
+#include "lldarray.h"
-#include "llinventorytype.h"
+#include "llpanel.h"
// newview
#include "llflatlistview.h"
-#include "llinventorymodel.h"
class LLIconCtrl;
class LLTextBox;
+class LLViewerInventoryItem;
-class LLPanelInventoryItem : public LLPanel
+class LLPanelInventoryListItem : public LLPanel
{
public:
- LLPanelInventoryItem(LLAssetType::EType asset_type,
- LLInventoryType::EType inventory_type,
- U32 wearable_type,
- const std::string &item_name,
- const std::string &hl);
- virtual ~LLPanelInventoryItem();
+ static LLPanelInventoryListItem* createItemPanel(const LLViewerInventoryItem* item);
+
+ virtual ~LLPanelInventoryListItem();
/*virtual*/ BOOL postBuild();
/*virtual*/ void setValue(const LLSD& value);
@@ -63,6 +62,9 @@ public:
void onMouseEnter(S32 x, S32 y, MASK mask);
void onMouseLeave(S32 x, S32 y, MASK mask);
+protected:
+ LLPanelInventoryListItem(const LLViewerInventoryItem* item);
+
private:
LLIconCtrl* mIcon;
LLTextBox* mTitle;
@@ -72,13 +74,17 @@ private:
std::string mHighlightedText;
};
-
class LLInventoryItemsList : public LLFlatListView
{
public:
+ struct Params : public LLInitParam::Block<Params, LLFlatListView::Params>
+ {
+ Params();
+ };
+
virtual ~LLInventoryItemsList();
- void refreshList(const LLInventoryModel::item_array_t item_array);
+ void refreshList(const LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array);
/**
* Let list know items need to be refreshed in next draw()
@@ -91,7 +97,7 @@ public:
protected:
friend class LLUICtrlFactory;
- LLInventoryItemsList(const LLFlatListView::Params& p);
+ LLInventoryItemsList(const LLInventoryItemsList::Params& p);
uuid_vec_t& getIDs() { return mIDs; }
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 03006243f9..214b5d317a 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -658,11 +658,13 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
for (category_map_t::iterator iter = mCategoryMap.begin();
iter != mCategoryMap.end();
- iter++)
+ ++iter)
{
- // Inventory category version is used to find out if some changes
- // to a category have been made.
- S32 version = gInventory.getCategory((*iter).first)->getVersion();
+ LLViewerInventoryCategory* category = gInventory.getCategory((*iter).first);
+ if (!category)
+ continue;
+
+ S32 version = category->getVersion();
if (version != (*iter).second.mVersion)
{
// Update category version in map.
@@ -674,11 +676,27 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
void LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t cb)
{
- S32 version = gInventory.getCategory(cat_id)->getVersion();
+ S32 version;
+ LLViewerInventoryCategory* category = gInventory.getCategory(cat_id);
+ if (category)
+ {
+ // Inventory category version is used to find out if some changes
+ // to a category have been made.
+ version = category->getVersion();
+ }
+ else
+ {
+ // If category could not be retrieved it might mean that
+ // inventory is unusable at the moment so the category is
+ // stored with VERSION_UNKNOWN and it may be updated later.
+ version = LLViewerInventoryCategory::VERSION_UNKNOWN;
+ }
+
+ version = category->getVersion();
mCategoryMap.insert(category_map_value_t(cat_id, LLCategoryData(cb, version)));
}
void LLInventoryCategoriesObserver::removeCategory(const LLUUID& cat_id)
{
- mCategoryMap.erase(mCategoryMap.find(cat_id));
+ mCategoryMap.erase(cat_id);
}
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index cce4f94028..1c627d452f 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -33,6 +33,9 @@
#include "lloutfitslist.h"
+// llcommon
+#include "llcommonutils.h"
+
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
#include "llinventoryfunctions.h"
@@ -45,7 +48,12 @@ LLOutfitsList::LLOutfitsList()
: LLPanel()
, mAccordion(NULL)
, mListCommands(NULL)
-{}
+{
+ mCategoriesObserver = new LLInventoryCategoriesObserver();
+ gInventory.addObserver(mCategoriesObserver);
+
+ gInventory.addObserver(this);
+}
LLOutfitsList::~LLOutfitsList()
{
@@ -65,11 +73,6 @@ BOOL LLOutfitsList::postBuild()
{
mAccordion = getChild<LLAccordionCtrl>("outfits_accordion");
- mCategoriesObserver = new LLInventoryCategoriesObserver();
- gInventory.addObserver(mCategoriesObserver);
-
- gInventory.addObserver(this);
-
return TRUE;
}
@@ -79,15 +82,15 @@ void LLOutfitsList::changed(U32 mask)
if (!gInventory.isInventoryUsable())
return;
- // Start observing changes in "My Outfits" category.
const LLUUID outfits = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
- mCategoriesObserver->addCategory(outfits,
- boost::bind(&LLOutfitsList::refreshList, this, outfits));
-
LLViewerInventoryCategory* category = gInventory.getCategory(outfits);
if (!category)
return;
+ // Start observing changes in "My Outfits" category.
+ mCategoriesObserver->addCategory(outfits,
+ boost::bind(&LLOutfitsList::refreshList, this, outfits));
+
// Fetch "My Outfits" contents and refresh the list to display
// initially fetched items. If not all items are fetched now
// the observer will refresh the list as soon as the new items
@@ -121,7 +124,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
// Creating a vector of newly collected sub-categories UUIDs.
for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin();
iter != cat_array.end();
- iter++)
+ ++iter)
{
vnew.push_back((*iter)->getUUID());
}
@@ -131,35 +134,21 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
// Creating a vector of currently displayed sub-categories UUIDs.
for (outfits_map_t::const_iterator iter = mOutfitsMap.begin();
iter != mOutfitsMap.end();
- iter++)
+ ++iter)
{
vcur.push_back((*iter).first);
}
- // Sorting both vectors to compare.
- std::sort(vcur.begin(), vcur.end());
- std::sort(vnew.begin(), vnew.end());
-
uuid_vec_t vadded;
uuid_vec_t vremoved;
- uuid_vec_t::iterator it;
- size_t maxsize = llmax(vcur.size(), vnew.size());
- vadded.resize(maxsize);
- vremoved.resize(maxsize);
-
- // what to remove
- it = set_difference(vcur.begin(), vcur.end(), vnew.begin(), vnew.end(), vremoved.begin());
- vremoved.erase(it, vremoved.end());
-
- // what to add
- it = set_difference(vnew.begin(), vnew.end(), vcur.begin(), vcur.end(), vadded.begin());
- vadded.erase(it, vadded.end());
+ // Create added and removed items vectors.
+ LLCommonUtils::computeDifference(vnew, vcur, vadded, vremoved);
// Handle added tabs.
for (uuid_vec_t::const_iterator iter = vadded.begin();
iter != vadded.end();
- iter++)
+ ++iter)
{
const LLUUID cat_id = (*iter);
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
@@ -175,7 +164,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
LLAccordionCtrlTab* tab = LLUICtrlFactory::defaultBuilder<LLAccordionCtrlTab>(accordionXmlNode, NULL, NULL);
// *TODO: LLUICtrlFactory::defaultBuilder does not use "display_children" from xml. Should be investigated.
- tab->setDisplayChildren(false);
+ tab->setDisplayChildren(false);
mAccordion->addCollapsibleCtrl(tab);
// Map the new tab with outfit category UUID.
@@ -185,6 +174,9 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
LLWearableItemsList* list = tab->getChild<LLWearableItemsList>("wearable_items_list");
mCategoriesObserver->addCategory(cat_id, boost::bind(&LLWearableItemsList::updateList, list, cat_id));
+ // Setting drop down callback to monitor currently selected outfit.
+ tab->setDropDownStateChangedCallback(boost::bind(&LLOutfitsList::onTabExpandedCollapsed, this, list));
+
// Fetch the new outfit contents.
cat->fetch();
@@ -252,6 +244,14 @@ void LLOutfitsList::updateOutfitTab(const LLUUID& category_id)
}
}
+void LLOutfitsList::onTabExpandedCollapsed(LLWearableItemsList* list)
+{
+ if (!list)
+ return;
+
+ // TODO: Add outfit selection handling.
+}
+
void LLOutfitsList::setFilterSubString(const std::string& string)
{
mFilterSubString = string;
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index f1756ce873..de14c15415 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -41,6 +41,17 @@ class LLAccordionCtrl;
class LLAccordionCtrlTab;
class LLWearableItemsList;
+/**
+ * @class LLOutfitsList
+ *
+ * A list of agents's outfits from "My Outfits" inventory category
+ * which displays each outfit in an accordion tab with a flat list
+ * of items inside it.
+ * Uses LLInventoryCategoriesObserver to monitor changes to "My Outfits"
+ * inventory category and refresh the outfits listed in it.
+ * This class is derived from LLInventoryObserver to know when inventory
+ * becomes usable and it is safe to request data from inventory model.
+ */
class LLOutfitsList : public LLPanel, public LLInventoryObserver
{
public:
@@ -56,6 +67,8 @@ public:
// Update tab displaying outfit identified by category_id.
void updateOutfitTab(const LLUUID& category_id);
+ void onTabExpandedCollapsed(LLWearableItemsList* list);
+
void setFilterSubString(const std::string& string);
private:
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index c0891ae749..9912f351c2 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -518,6 +518,11 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
mNoticesList->setEnabled(TRUE);
+ //save sort state and set unsorted state to prevent unnecessary
+ //sorting while adding notices
+ bool save_sort = mNoticesList->isSorted();
+ mNoticesList->setNeedsSort(false);
+
for (;i<count;++i)
{
msg->getUUID("Data","NoticeID",id,i);
@@ -528,6 +533,13 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
mNoticesList->setEnabled(FALSE);
return;
}
+
+ //with some network delays we can receive notice list more then once...
+ //so add only unique notices
+ S32 pos = mNoticesList->getItemIndex(id);
+
+ if(pos!=-1)//if items with this ID already in the list - skip it
+ continue;
msg->getString("Data","Subject",subj,i);
msg->getString("Data","FromName",name,i);
@@ -563,6 +575,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
mNoticesList->addElement(row, ADD_BOTTOM);
}
+ mNoticesList->setNeedsSort(save_sort);
mNoticesList->updateSort();
}
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index ff309cbbc3..3d110dcc78 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -62,7 +62,10 @@ bool LLFindOutfitItems::operator()(LLInventoryCategory* cat,
static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_items_list");
-LLWearableItemsList::LLWearableItemsList(const LLFlatListView::Params& p)
+LLWearableItemsList::Params::Params()
+{}
+
+LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p)
: LLInventoryItemsList(p)
{}
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index e3b011912b..e7ccba8e6c 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -34,23 +34,32 @@
#include "llpanel.h"
-#include "llassettype.h"
-
-#include "llinventorytype.h"
-
// newview
#include "llinventoryitemslist.h"
+/**
+ * @class LLWearableItemsList
+ *
+ * A flat list of wearable inventory items.
+ * Collects all items that can be a part of an outfit from
+ * an inventory category specified by UUID and displays them
+ * as a flat list.
+ */
class LLWearableItemsList : public LLInventoryItemsList
{
public:
+ struct Params : public LLInitParam::Block<Params, LLInventoryItemsList::Params>
+ {
+ Params();
+ };
+
virtual ~LLWearableItemsList();
void updateList(const LLUUID& category_id);
protected:
friend class LLUICtrlFactory;
- LLWearableItemsList(const LLFlatListView::Params& p);
+ LLWearableItemsList(const LLWearableItemsList::Params& p);
};
#endif //LL_LLWEARABLEITEMSLIST_H
diff --git a/indra/newview/skins/default/xui/de/floater_about_land.xml b/indra/newview/skins/default/xui/de/floater_about_land.xml
index 5322febe27..38e72dbadf 100644
--- a/indra/newview/skins/default/xui/de/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/de/floater_about_land.xml
@@ -264,7 +264,7 @@ werden.
<text left="204" name="selected_objects_text" width="48">
[COUNT]
</text>
- <text left="4" name="Autoreturn" width="410">
+ <text name="Autoreturn">
Objekte anderer Einwohner automatisch zurückgeben (Minuten, 0 für aus):
</text>
<line_editor name="clean other time" right="-10" width="56"/>
diff --git a/indra/newview/skins/default/xui/de/floater_buy_object.xml b/indra/newview/skins/default/xui/de/floater_buy_object.xml
index b23163b4a3..c697014b04 100644
--- a/indra/newview/skins/default/xui/de/floater_buy_object.xml
+++ b/indra/newview/skins/default/xui/de/floater_buy_object.xml
@@ -6,7 +6,7 @@
<text name="buy_text">
[AMOUNT] L$ von [NAME] kaufen?
</text>
- <button label="Abbrechen" label_selected="Abbrechen" name="cancel_btn" width="73"/>
+ <button label="Abbrechen" label_selected="Abbrechen" name="cancel_btn"/>
<button label="Kaufen" label_selected="Kaufen" name="buy_btn"/>
<text name="title_buy_text">
Kaufen
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 59f1889808..40c6b14a4a 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -1061,7 +1061,8 @@ Leyla Linden </text>
left="10"
name="Autoreturn"
top_pad="0"
- width="310">
+ width="412"
+ wrap="true">
Auto return other Residents&apos; objects (minutes, 0 for off):
</text>
<line_editor
@@ -1073,9 +1074,9 @@ Leyla Linden </text>
layout="topleft"
max_length="6"
name="clean other time"
- right="-72"
- width="56"
- top_delta="-6"/>
+ left_pad="0"
+ width="46"
+ top_delta="-2"/>
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/floater_buy_object.xml b/indra/newview/skins/default/xui/en/floater_buy_object.xml
index f0e5e30010..3d8f5d678b 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_object.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_object.xml
@@ -5,7 +5,7 @@
height="290"
layout="topleft"
min_height="150"
- min_width="200"
+ min_width="225"
name="contents"
help_topic="contents"
save_rect="true"
@@ -52,7 +52,7 @@
<text
type="string"
length="1"
- follows="all"
+ follows="left|top|right"
font="SansSerif"
height="16"
layout="topleft"
@@ -90,7 +90,8 @@
name="buy_text"
text_color="white"
top_pad="5"
- width="276">
+ use_ellipses="true"
+ width="260">
Buy for L$[AMOUNT] from [NAME]?
</text>
<button
diff --git a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
index d00b1bfb7b..b3150bb98b 100644
--- a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
+++ b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder-->
-<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtume-->
+<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtime-->
<accordion_tab
display_children="false"
follows="all"
- height="40"
+ height="45"
layout="topleft"
name="Mockup Tab"
title="Mockup Tab"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
index 500e65b916..2c6ceeef2e 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
@@ -374,5 +374,5 @@
min_val="10"
name="web_proxy_port"
top_delta="0"
- width="140" />
+ width="145" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 6fdf468d5d..af87934c87 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3118,4 +3118,7 @@ Abuse Report</string>
<string name="DefaultMimeType">none/none</string>
<string name="texture_load_dimensions_error">Can't load images larger than [WIDTH]*[HEIGHT]</string>
+ <!-- language specific white-space characters, delimiters, spacers, item separation symbols -->
+ <string name="sentences_separator" value=" "></string>
+
</strings>
diff --git a/indra/newview/skins/default/xui/es/floater_about_land.xml b/indra/newview/skins/default/xui/es/floater_about_land.xml
index 6118a63872..f3a278945c 100644
--- a/indra/newview/skins/default/xui/es/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/es/floater_about_land.xml
@@ -263,7 +263,7 @@ Vaya al menú Mundo &gt; Acerca del terreno o seleccione otra parcela para ver s
<text left="204" name="selected_objects_text" width="48">
[COUNT]
</text>
- <text left="4" name="Autoreturn" width="412">
+ <text name="Autoreturn">
Devolución automát. de objetos de otros (en min., 0 la desactiva):
</text>
<line_editor name="clean other time" right="-20"/>
diff --git a/indra/newview/skins/default/xui/fr/floater_about_land.xml b/indra/newview/skins/default/xui/fr/floater_about_land.xml
index 5d630cdf48..2e52a90373 100644
--- a/indra/newview/skins/default/xui/fr/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml
@@ -267,7 +267,7 @@ ou divisé.
<text left_delta="214" name="selected_objects_text" width="48">
[COUNT]
</text>
- <text left="4" name="Autoreturn" width="440">
+ <text name="Autoreturn">
Renvoi automatique des objets d&apos;autres résidents (minutes, 0 pour désactiver) :
</text>
<line_editor name="clean other time" right="-6" width="36"/>
diff --git a/indra/newview/skins/default/xui/it/floater_about_land.xml b/indra/newview/skins/default/xui/it/floater_about_land.xml
index bc23c2e8ff..742cdf44a5 100644
--- a/indra/newview/skins/default/xui/it/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/it/floater_about_land.xml
@@ -266,7 +266,7 @@ o suddivisa.
<text left="214" name="selected_objects_text" width="48">
[COUNT]
</text>
- <text left="4" name="Autoreturn" width="412">
+ <text name="Autoreturn">
Restituzione automatica degli oggetti di altri residenti (minuti, 0 per disattivarla):
</text>
<line_editor name="clean other time" right="-20"/>
diff --git a/indra/newview/skins/default/xui/ja/floater_about_land.xml b/indra/newview/skins/default/xui/ja/floater_about_land.xml
index c9c01bc2a4..d23ab3565b 100644
--- a/indra/newview/skins/default/xui/ja/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml
@@ -264,7 +264,7 @@
<text left="200" name="selected_objects_text">
[COUNT]
</text>
- <text name="Autoreturn" width="500">
+ <text name="Autoreturn">
他人のオブジェクトを自動返却(分単位、0 で自動返却なし):
</text>
<line_editor left_delta="5" name="clean other time" right="-80"/>
diff --git a/indra/newview/skins/default/xui/pt/floater_about_land.xml b/indra/newview/skins/default/xui/pt/floater_about_land.xml
index 252969609a..cebf03755b 100644
--- a/indra/newview/skins/default/xui/pt/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml
@@ -265,7 +265,7 @@ ou sub-divididos.
<text left="214" name="selected_objects_text" width="48">
[COUNT]
</text>
- <text left="4" name="Autoreturn" width="412">
+ <text name="Autoreturn">
Devolver objetos de outros residentes (p/ desligar tecle 0)
</text>
<line_editor name="clean other time" right="-10"/>