summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-06-08 10:15:15 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-06-08 10:15:15 +0100
commit4bc6b01e0ef845f3f8d5e7f4c46280c6a753d135 (patch)
tree988e79dae01a02ca1877b95a480b2c78c562d220 /indra/newview
parentf440dd7a2aa976a3c91290af345d31fa3cb57bfe (diff)
parent1856436fb93c7dc45821c1791dbbced26151b2c0 (diff)
merge from PE's viewer-trunk
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventoryfunctions.h13
-rw-r--r--indra/newview/llinventoryobserver.cpp54
-rw-r--r--indra/newview/llinventoryobserver.h16
-rw-r--r--indra/newview/llpaneloutfitedit.cpp2
-rw-r--r--indra/newview/skins/default/xui/de/panel_bottomtray.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_edit.xml7
-rw-r--r--indra/newview/skins/default/xui/en/panel_people.xml1
9 files changed, 64 insertions, 34 deletions
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 33b52cfd5e..c82ebd1439 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -324,6 +324,19 @@ private:
LLWearableType::EType mWearableType;
};
+/** Filter out wearables-links */
+class LLFindActualWearablesOfType : public LLFindWearablesOfType
+{
+public:
+ LLFindActualWearablesOfType(LLWearableType::EType type) : LLFindWearablesOfType(type) {}
+ virtual ~LLFindActualWearablesOfType() {}
+ virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+ {
+ if (item && item->getIsLinkType()) return false;
+ return LLFindWearablesOfType::operator()(cat, item);
+ }
+};
+
// Find worn items.
class LLFindWorn : public LLInventoryCollectFunctor
{
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index d2b402fe14..bd35259670 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -62,13 +62,9 @@
#include "llsdutil.h"
#include <deque>
-// If the viewer gets a notification, your observer assumes
-// that that notification is for itself and then tries to process
-// the results. The notification could be for something else (e.g.
-// you're fetching an item and a notification gets triggered because
-// you renamed some other item). This counter is to specify how many
-// notification to wait for before giving up.
-static const U32 MAX_NUM_NOTIFICATIONS_TO_PROCESS = 127;
+const U32 LLInventoryFetchItemsObserver::MAX_NUM_ATTEMPTS_TO_PROCESS = 10;
+const F32 LLInventoryFetchItemsObserver::FETCH_TIMER_EXPIRY = 10.0f;
+
LLInventoryObserver::LLInventoryObserver()
{
@@ -149,7 +145,7 @@ void LLInventoryCompletionObserver::watchItem(const LLUUID& id)
LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_id) :
LLInventoryFetchObserver(item_id),
- mNumTries(MAX_NUM_NOTIFICATIONS_TO_PROCESS)
+ mNumTries(MAX_NUM_ATTEMPTS_TO_PROCESS)
{
mIDs.clear();
mIDs.push_back(item_id);
@@ -158,35 +154,47 @@ LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_
LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids) :
LLInventoryFetchObserver(item_ids),
- mNumTries(MAX_NUM_NOTIFICATIONS_TO_PROCESS)
+ mNumTries(MAX_NUM_ATTEMPTS_TO_PROCESS)
{
}
void LLInventoryFetchItemsObserver::changed(U32 mask)
{
- BOOL any_items_missing = FALSE;
-
// scan through the incomplete items and move or erase them as
// appropriate.
if (!mIncomplete.empty())
{
+ // if period of an attempt expired...
+ if (mFetchingPeriod.hasExpired())
+ {
+ // ...reset timer and reduce count of attempts
+ mFetchingPeriod.reset();
+ mFetchingPeriod.setTimerExpirySec(FETCH_TIMER_EXPIRY);
+
+ --mNumTries;
+
+ LL_INFOS("InventoryFetch") << "LLInventoryFetchItemsObserver: " << this << ", attempt(s) left: " << (S32)mNumTries << LL_ENDL;
+ }
+
+ // do we still have any attempts?
+ bool timeout_expired = mNumTries <= 0;
+
for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
{
const LLUUID& item_id = (*it);
LLViewerInventoryItem* item = gInventory.getItem(item_id);
if (!item)
{
- any_items_missing = TRUE;
- if (mNumTries > 0)
+ if (timeout_expired)
{
- // Keep trying.
- ++it;
+ // Just concede that this item hasn't arrived in reasonable time and continue on.
+ LL_WARNS("InventoryFetch") << "Fetcher timed out when fetching inventory item UUID: " << item_id << LL_ENDL;
+ it = mIncomplete.erase(it);
}
else
{
- // Just concede that this item hasn't arrived in reasonable time and continue on.
- llwarns << "Fetcher timed out when fetching inventory item assetID:" << item_id << llendl;
- it = mIncomplete.erase(it);
+ // Keep trying.
+ ++it;
}
continue;
}
@@ -198,14 +206,10 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)
}
++it;
}
- if (any_items_missing)
- {
- mNumTries--;
- }
if (mIncomplete.empty())
{
- mNumTries = MAX_NUM_NOTIFICATIONS_TO_PROCESS;
+ mNumTries = MAX_NUM_ATTEMPTS_TO_PROCESS;
done();
}
}
@@ -315,6 +319,10 @@ void LLInventoryFetchItemsObserver::startFetch()
item_entry["item_id"] = (*it);
items_llsd.append(item_entry);
}
+
+ mFetchingPeriod.resetWithExpiry(FETCH_TIMER_EXPIRY);
+ mNumTries = MAX_NUM_ATTEMPTS_TO_PROCESS;
+
fetch_items_from_llsd(items_llsd);
}
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 6d5a86a6fc..72c13f55c6 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -110,6 +110,22 @@ public:
/*virtual*/ void changed(U32 mask);
private:
S8 mNumTries; // Number of times changed() was called without success
+ LLFrameTimer mFetchingPeriod;
+
+ /**
+ * If the viewer gets a notification, your observer assumes
+ * that that notification is for itself and then tries to process
+ * the results. The notification could be for something else (e.g.
+ * you're fetching an item and a notification gets triggered because
+ * you renamed some other item). This counter is to specify how many
+ * periods of time to wait for before giving up.
+ */
+ static const U32 MAX_NUM_ATTEMPTS_TO_PROCESS;
+
+ /**
+ * Period of waiting a notification when requested items get added into inventory.
+ */
+ static const F32 FETCH_TIMER_EXPIRY;
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index ea7410502d..ce382541c6 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -280,7 +280,7 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance()));
mWearableListMaskCollector = new LLFindNonLinksByMask(ALL_ITEMS_MASK);
- mWearableListTypeCollector = new LLFindWearablesOfType(LLWearableType::WT_NONE);
+ mWearableListTypeCollector = new LLFindActualWearablesOfType(LLWearableType::WT_NONE);
mWearableItemsPanel = getChild<LLPanel>("filtered_wearables_panel");
mWearableItemsList = getChild<LLInventoryItemsList>("filtered_wearables_list");
diff --git a/indra/newview/skins/default/xui/de/panel_bottomtray.xml b/indra/newview/skins/default/xui/de/panel_bottomtray.xml
index d52b8dcf4d..83f67344ca 100644
--- a/indra/newview/skins/default/xui/de/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/de/panel_bottomtray.xml
@@ -9,7 +9,7 @@
<layout_stack name="toolbar_stack">
<layout_panel name="speak_panel">
<talk_button name="talk">
- <speak_button label="Sprechen" label_selected="Sprechen" name="speak_btn" halign="right" />
+ <speak_button label="Sprechen" label_selected="Sprechen" name="speak_btn" />
</talk_button>
</layout_panel>
<layout_panel name="gesture_panel">
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index f537c81860..c9b013099b 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -33,7 +33,6 @@
name="panel_im_control_panel"
layout="topleft"
follows="left"
- label="IM Control Panel"
min_width="115"
auto_resize="false"
user_resize="true" />
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index 82b2405ec9..4eff5bc48a 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -90,7 +90,7 @@
label="Speak"
label_selected="Speak"
name="speak_btn"
- pad_right="22"
+ pad_right="20"
tab_stop="true"
use_ellipses="true" />
</talk_button>
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index 40f60d50fb..feee532320 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -5,7 +5,6 @@
border="false"
height="600"
follows="all"
- label="Outfit Edit"
layout="topleft"
left="0"
min_height="350"
@@ -85,7 +84,6 @@
bevel_style="none"
follows="top|left|right"
height="40"
- label="bottom_panel"
layout="topleft"
left="6"
name="header_panel"
@@ -106,7 +104,6 @@
bevel_style="none"
follows="top|right"
height="38"
- label="bottom_panel"
layout="topleft"
left_pad="5"
name="outfit_name_and_status"
@@ -160,7 +157,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap
<layout_panel
layout="topleft"
height="187"
- label="IM Control Panel"
min_height="100"
name="outfit_wearables_panel"
width="313"
@@ -183,7 +179,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap
bg_alpha_color="DkGray2"
layout="topleft"
height="154"
- label="add_button_and_combobox"
name="add_button_and_combobox"
width="311"
user_resize="false"
@@ -343,7 +338,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap
bevel_style="none"
follows="bottom|left|right"
height="27"
- label="bottom_panel"
layout="topleft"
left="5"
name="no_add_wearables_button_bar"
@@ -378,7 +372,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap
bevel_style="none"
follows="left|right|bottom"
height="27"
- label="add_wearables_button_bar"
layout="topleft"
left="5"
name="add_wearables_button_bar"
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index b79ef1e287..da28773c74 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -173,6 +173,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
background_visible="true"
bg_alpha_color="DkGray2"
bg_opaque_color="DkGray2"
+ empty_accordion_text.value=""
follows="all"
height="356"
layout="topleft"