summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-07-19 09:10:41 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-07-19 09:10:41 +0100
commit3bb5d368a21e2645222f0f5fa57b0a0abb236084 (patch)
tree9252aa83846139a3932dadb2260a4acdfeff0086
parent94cae52bb791b8ceef4d55eed8c8726e63572b61 (diff)
parent0fa0ffb5748bd9b8d61954649eafe3e28517548c (diff)
merge from PE's viewer-release
-rw-r--r--indra/newview/llpaneloutfitedit.cpp53
-rw-r--r--indra/newview/llpaneloutfitedit.h4
-rw-r--r--indra/newview/llviewermessage.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml5
4 files changed, 42 insertions, 22 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 937b794686..571261ff5b 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -629,24 +629,35 @@ void LLPanelOutfitEdit::onShopButtonClicked()
if (isAgentAvatarValid())
{
// try to get wearable type from 'Add More' panel first (EXT-7639)
- LLWearableType::EType type = getAddMorePanelSelectionType();
+ selection_info_t selection_info = getAddMorePanelSelectionType();
- if (type == LLWearableType::WT_NONE)
+ LLWearableType::EType type = selection_info.first;
+
+ if (selection_info.second > 1)
{
- type = getCOFWearablesSelectionType();
+ // the second argument is not important in this case: generic market place will be opened
+ url = url_resolver.resolveURL(LLWearableType::WT_NONE, SEX_FEMALE);
}
+ else
+ {
+ if (type == LLWearableType::WT_NONE)
+ {
+ type = getCOFWearablesSelectionType();
+ }
- ESex sex = gAgentAvatarp->getSex();
+ ESex sex = gAgentAvatarp->getSex();
- // WT_INVALID comes for attachments
- if (type != LLWearableType::WT_INVALID && type != LLWearableType::WT_NONE)
- {
- url = url_resolver.resolveURL(type, sex);
- }
+ // WT_INVALID comes for attachments
+ if (type != LLWearableType::WT_INVALID && type != LLWearableType::WT_NONE)
+ {
+ url = url_resolver.resolveURL(type, sex);
+ }
- if (url.empty())
- {
- url = url_resolver.resolveURL(mCOFWearables->getExpandedAccordionAssetType(), sex);
+ if (url.empty())
+ {
+ url = url_resolver.resolveURL(
+ mCOFWearables->getExpandedAccordionAssetType(), sex);
+ }
}
}
else
@@ -685,9 +696,9 @@ LLWearableType::EType LLPanelOutfitEdit::getCOFWearablesSelectionType() const
return type;
}
-LLWearableType::EType LLPanelOutfitEdit::getAddMorePanelSelectionType() const
+LLPanelOutfitEdit::selection_info_t LLPanelOutfitEdit::getAddMorePanelSelectionType() const
{
- LLWearableType::EType type = LLWearableType::WT_NONE;
+ selection_info_t result = std::make_pair(LLWearableType::WT_NONE, 0);
if (mAddWearablesPanel != NULL && mAddWearablesPanel->getVisible())
{
@@ -695,9 +706,11 @@ LLWearableType::EType LLPanelOutfitEdit::getAddMorePanelSelectionType() const
{
std::set<LLUUID> selected_uuids = mInventoryItemsPanel->getRootFolder()->getSelectionList();
- if (selected_uuids.size() == 1)
+ result.second = selected_uuids.size();
+
+ if (result.second == 1)
{
- type = getWearableTypeByItemUUID(*(selected_uuids.begin()));
+ result.first = getWearableTypeByItemUUID(*(selected_uuids.begin()));
}
}
else if (mWearableItemsList != NULL && mWearableItemsList->getVisible())
@@ -705,14 +718,16 @@ LLWearableType::EType LLPanelOutfitEdit::getAddMorePanelSelectionType() const
std::vector<LLUUID> selected_uuids;
mWearableItemsList->getSelectedUUIDs(selected_uuids);
- if (selected_uuids.size() == 1)
+ result.second = selected_uuids.size();
+
+ if (result.second == 1)
{
- type = getWearableTypeByItemUUID(selected_uuids.front());
+ result.first = getWearableTypeByItemUUID(selected_uuids.front());
}
}
}
- return type;
+ return result;
}
LLWearableType::EType LLPanelOutfitEdit::getWearableTypeByItemUUID(const LLUUID& item_uuid) const
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 770e2a229b..fe10215f27 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -198,8 +198,10 @@ private:
void getCurrentItemUUID(LLUUID& selected_id);
void onCOFChanged();
+ typedef std::pair<LLWearableType::EType, size_t> selection_info_t;
+
LLWearableType::EType getCOFWearablesSelectionType() const;
- LLWearableType::EType getAddMorePanelSelectionType() const;
+ selection_info_t getAddMorePanelSelectionType() const;
LLWearableType::EType getWearableTypeByItemUUID(const LLUUID& item_uuid) const;
LLTextBox* mCurrentOutfitName;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index fe6988c526..04eb8164f8 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5106,7 +5106,7 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data)
void process_alert_core(const std::string& message, BOOL modal)
{
- // HACK -- handle callbacks for specific alerts
+ // HACK -- handle callbacks for specific alerts. It also is localized in notifications.xml
if ( message == "You died and have been teleported to your home location")
{
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT);
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 04bdb4302c..cd6939ede6 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6402,11 +6402,14 @@ If you continue to have problems, please visit the [SUPPORT_SITE].
- Your system memory does not meet the minimum requirements.
</global>
-<!-- this is alert string from server. the name needs to match entire the server string, and needs to be changed
+<!-- these are alert strings from server. the name needs to match entire the server string, and needs to be changed
whenever the server string changes -->
<global name="You can only set your 'Home Location' on your land or at a mainland Infohub.">
If you own a piece of land, you can make it your home location.
Otherwise, you can look at the Map and find places marked &quot;Infohub&quot;.
</global>
+ <global name="You died and have been teleported to your home location">
+You died and have been teleported to your home location.
+ </global>
</notifications>