summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml6
-rw-r--r--indra/newview/llpaneloutfitedit.cpp85
-rw-r--r--indra/newview/llpaneloutfitedit.h4
3 files changed, 81 insertions, 14 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 1c32f33290..af296f918e 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4666,7 +4666,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string>
+ <string>http://marketplace.secondlife.com/</string>
</map>
<key>MarketplaceURL_objectFemale</key>
<map>
@@ -4721,7 +4721,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string>
+ <string>http://marketplace.secondlife.com</string>
</map>
<key>MarketplaceURL_bodypartMale</key>
<map>
@@ -4732,7 +4732,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string>
+ <string>http://marketplace.secondlife.com/</string>
</map>
<key>MarketplaceURL_glovesMale</key>
<map>
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 6935fe03c8..8b3c5b6e93 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -71,6 +71,7 @@
#include "llsdutil.h"
#include "llsidepanelappearance.h"
#include "lltoggleablemenu.h"
+#include "llvoavatarself.h"
#include "llwearablelist.h"
#include "llwearableitemslist.h"
#include "llwearabletype.h"
@@ -622,15 +623,52 @@ void LLPanelOutfitEdit::onShopButtonClicked()
{
static LLShopURLDispatcher url_resolver;
+ // will contain the resultant URL
std::string url;
+
+ if (isAgentAvatarValid())
+ {
+ // try to get wearable type from 'Add More' panel first (EXT-7639)
+ LLWearableType::EType type = getAddMorePanelSelectionType();
+
+ if (type == LLWearableType::WT_NONE)
+ {
+ type = getCOFWearablesSelectionType();
+ }
+
+ ESex sex = gAgentAvatarp->getSex();
+
+ // 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);
+ }
+ }
+ else
+ {
+ llwarns << "Agent avatar is invalid" << llendl;
+
+ // the second argument is not important in this case: generic market place will be opened
+ url = url_resolver.resolveURL(LLWearableType::WT_NONE, SEX_FEMALE);
+ }
+
+ LLWeb::loadURLExternal(url);
+}
+
+LLWearableType::EType LLPanelOutfitEdit::getCOFWearablesSelectionType() const
+{
std::vector<LLPanel*> selected_items;
- mCOFWearables->getSelectedItems(selected_items);
+ LLWearableType::EType type = LLWearableType::WT_NONE;
- ESex sex = gSavedSettings.getU32("AvatarSex") ? SEX_MALE : SEX_FEMALE;
+ mCOFWearables->getSelectedItems(selected_items);
if (selected_items.size() == 1)
{
- LLWearableType::EType type = LLWearableType::WT_NONE;
LLPanel* item = selected_items.front();
// LLPanelDummyClothingListItem is lower then LLPanelInventoryListItemBase in hierarchy tree
@@ -642,20 +680,45 @@ void LLPanelOutfitEdit::onShopButtonClicked()
{
type = real_item->getWearableType();
}
+ }
- // WT_INVALID comes for attachments
- if (type != LLWearableType::WT_INVALID)
+ return type;
+}
+
+LLWearableType::EType LLPanelOutfitEdit::getAddMorePanelSelectionType() const
+{
+ LLWearableType::EType type = LLWearableType::WT_NONE;
+
+ if (mAddWearablesPanel != NULL && mAddWearablesPanel->getVisible())
+ {
+ if (mInventoryItemsPanel != NULL && mInventoryItemsPanel->getVisible())
{
- url = url_resolver.resolveURL(type, sex);
+ std::set<LLUUID> selected_uuids = mInventoryItemsPanel->getRootFolder()->getSelectionList();
+
+ if (selected_uuids.size() == 1)
+ {
+ type = getWearableTypeByItemUUID(*(selected_uuids.begin()));
+ }
}
- }
+ else if (mWearableItemsList != NULL && mWearableItemsList->getVisible())
+ {
+ std::vector<LLUUID> selected_uuids;
+ mWearableItemsList->getSelectedUUIDs(selected_uuids);
- if (url.empty())
- {
- url = url_resolver.resolveURL(mCOFWearables->getExpandedAccordionAssetType(), sex);
+ if (selected_uuids.size() == 1)
+ {
+ type = getWearableTypeByItemUUID(selected_uuids.front());
+ }
+ }
}
- LLWeb::loadURLExternal(url);
+ return type;
+}
+
+LLWearableType::EType LLPanelOutfitEdit::getWearableTypeByItemUUID(const LLUUID& item_uuid) const
+{
+ LLViewerInventoryItem* item = gInventory.getLinkedItem(item_uuid);
+ return (item != NULL) ? item->getWearableType() : LLWearableType::WT_NONE;
}
void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void)
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 1eef211276..7cf51b285d 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -198,6 +198,10 @@ private:
void getCurrentItemUUID(LLUUID& selected_id);
void onCOFChanged();
+ LLWearableType::EType getCOFWearablesSelectionType() const;
+ LLWearableType::EType getAddMorePanelSelectionType() const;
+ LLWearableType::EType getWearableTypeByItemUUID(const LLUUID& item_uuid) const;
+
LLTextBox* mCurrentOutfitName;
LLTextBox* mStatus;
LLInventoryPanel* mInventoryItemsPanel;