summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-04-17 11:44:04 -0700
committerMerov Linden <merov@lindenlab.com>2014-04-17 11:44:04 -0700
commitccdffd9794229b59b7d022760540ce5f8d8ea133 (patch)
treec8ed6132760a134731acfe157c86ee64ba61c20d /indra/newview
parentaada85e5b0bcdee88aaa5f0f5ef65913c05c0222 (diff)
DD-70 : Use List/Delist for listing folders and Activate/Deactivate for version folders. Also create test SLM ID when creating listing.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llinventorybridge.cpp58
-rwxr-xr-xindra/newview/llmarketplacefunctions.cpp7
-rwxr-xr-xindra/newview/llmarketplacefunctions.h5
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_inventory.xml32
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_marketplace_listings.xml18
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml2
6 files changed, 76 insertions, 46 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 128f0e1b91..749fcd7a71 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -854,29 +854,29 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags,
if (depth == 1)
{
// Options available at the Listing Folder level
+ items.push_back(std::string("Marketplace Create Listing"));
items.push_back(std::string("Marketplace Associate Listing"));
- items.push_back(std::string("Marketplace Attach Listing"));
items.push_back(std::string("Marketplace Disassociate Listing"));
- items.push_back(std::string("Marketplace Activate"));
- items.push_back(std::string("Marketplace Deactivate"));
+ items.push_back(std::string("Marketplace List"));
+ items.push_back(std::string("Marketplace Unlist"));
if (LLMarketplaceData::instance().isListed(mUUID))
{
+ disabled_items.push_back(std::string("Marketplace Create Listing"));
disabled_items.push_back(std::string("Marketplace Associate Listing"));
- disabled_items.push_back(std::string("Marketplace Attach Listing"));
if (LLMarketplaceData::instance().getActivationState(mUUID))
{
- disabled_items.push_back(std::string("Marketplace Activate"));
+ disabled_items.push_back(std::string("Marketplace List"));
}
else
{
- disabled_items.push_back(std::string("Marketplace Deactivate"));
+ disabled_items.push_back(std::string("Marketplace Unlist"));
}
}
else
{
disabled_items.push_back(std::string("Marketplace Disassociate Listing"));
- disabled_items.push_back(std::string("Marketplace Activate"));
- disabled_items.push_back(std::string("Marketplace Deactivate"));
+ disabled_items.push_back(std::string("Marketplace List"));
+ disabled_items.push_back(std::string("Marketplace Unlist"));
}
}
if (depth == 2)
@@ -898,11 +898,11 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags,
}
}
// Options available at all levels on items and categories
- items.push_back(std::string("Marketplace Show Listing"));
+ items.push_back(std::string("Marketplace Edit Listing"));
LLUUID listing_folder_id = nested_parent_id(mUUID,depth);
if (!LLMarketplaceData::instance().isListed(listing_folder_id))
{
- disabled_items.push_back(std::string("Marketplace Show Listing"));
+ disabled_items.push_back(std::string("Marketplace Edit Listing"));
}
// Separator
items.push_back(std::string("Marketplace Listings Separator"));
@@ -1546,7 +1546,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
{
doActionOnCurSelectedLandmark(boost::bind(&LLItemBridge::doShowOnMap, this, _1));
}
- else if ("marketplace_show_listing" == action)
+ else if ("marketplace_edit_listing" == action)
{
std::string url = LLMarketplaceData::instance().getListingURL(mUUID);
LLUrlAction::openURL(url);
@@ -3146,39 +3146,41 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
restoreItem();
return;
}
+ else if ("marketplace_list" == action)
+ {
+ if (depth_nesting_in_marketplace(mUUID) == 1)
+ {
+ LLMarketplaceData::instance().setActivation(mUUID,true);
+ }
+ return;
+ }
else if ("marketplace_activate" == action)
{
- S32 depth = depth_nesting_in_marketplace(mUUID);
- if (depth == 2)
+ if (depth_nesting_in_marketplace(mUUID) == 2)
{
- // At the version folder level, "activate" means "set this as the version folder"
LLInventoryCategory* category = gInventory.getCategory(mUUID);
LLMarketplaceData::instance().setVersionFolderID(category->getParentUUID(), mUUID);
}
- else if (depth == 1)
+ return;
+ }
+ else if ("marketplace_unlist" == action)
+ {
+ if (depth_nesting_in_marketplace(mUUID) == 1)
{
- // At the listing folder level, "activate" means "put it for sale on the marketplace"
- LLMarketplaceData::instance().setActivation(mUUID,true);
+ LLMarketplaceData::instance().setActivation(mUUID,false);
}
return;
}
else if ("marketplace_deactivate" == action)
{
- S32 depth = depth_nesting_in_marketplace(mUUID);
- if (depth == 2)
+ if (depth_nesting_in_marketplace(mUUID) == 2)
{
- // At the version folder level, "deactivate" means "zap the version folder"
LLInventoryCategory* category = gInventory.getCategory(mUUID);
LLMarketplaceData::instance().setVersionFolderID(category->getParentUUID(), LLUUID::null);
}
- else if (depth == 1)
- {
- // At the listing folder level, "deactivate" means "take this out of the marketplace"
- LLMarketplaceData::instance().setActivation(mUUID,false);
- }
return;
}
- else if ("marketplace_associate_listing" == action)
+ else if ("marketplace_create_listing" == action)
{
LLMarketplaceData::instance().addListing(mUUID);
return;
@@ -3188,13 +3190,13 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
LLMarketplaceData::instance().deleteListing(mUUID);
return;
}
- else if ("marketplace_attach_listing" == action)
+ else if ("marketplace_associate_listing" == action)
{
// *TODO : Get a list of listing IDs and let the user choose one, delist the old one and relist the new one
LLMarketplaceData::instance().addListing(mUUID);
return;
}
- else if ("marketplace_show_listing" == action)
+ else if ("marketplace_edit_listing" == action)
{
std::string url = LLMarketplaceData::instance().getListingURL(mUUID);
LLUrlAction::openURL(url);
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 4a3abe5f22..4a6914ee9c 100755
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -562,6 +562,7 @@ LLMarketplaceTuple::LLMarketplaceTuple(const LLUUID& folder_id, std::string list
// Data map
LLMarketplaceData::LLMarketplaceData()
{
+ mTestCurrentMarketplaceID = 1234567;
}
// Creation / Deletion
@@ -573,6 +574,12 @@ bool LLMarketplaceData::addListing(const LLUUID& folder_id)
return false;
}
mMarketplaceItems[folder_id] = LLMarketplaceTuple(folder_id);
+
+ // *TODO : Create the listing on SLM and get the ID (blocking?)
+ // For the moment, we use that wonky test ID generator...
+ std::string listing_id = llformat ("%d", LLMarketplaceData::instance().getTestMarketplaceID());
+
+ setListingID(folder_id,listing_id);
update_marketplace_category(folder_id);
return true;
}
diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h
index 68f5dafbbd..2b90dd678f 100755
--- a/indra/newview/llmarketplacefunctions.h
+++ b/indra/newview/llmarketplacefunctions.h
@@ -167,8 +167,13 @@ public:
bool setVersionFolderID(const LLUUID& folder_id, const LLUUID& version_id);
bool setActivation(const LLUUID& folder_id, bool activate);
+ // Merov : Test method while waiting for SLM API
+ S32 getTestMarketplaceID() { return mTestCurrentMarketplaceID++; }
+
private:
marketplace_items_list_t mMarketplaceItems;
+ // Merov : This is for test only, waiting for SLM API
+ S32 mTestCurrentMarketplaceID;
};
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 78418909e8..b621d53a6c 100755
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -5,20 +5,20 @@
name="Popup"
visible="false">
<menu_item_call
- label="Associate Listing"
+ label="Create Listing"
layout="topleft"
- name="Marketplace Associate Listing">
+ name="Marketplace Create Listing">
<menu_item_call.on_click
function="Inventory.DoToSelected"
- parameter="marketplace_associate_listing" />
+ parameter="marketplace_create_listing" />
</menu_item_call>
<menu_item_call
- label="Attach Listing"
+ label="Associate Listing"
layout="topleft"
- name="Marketplace Attach Listing">
+ name="Marketplace Associate Listing">
<menu_item_call.on_click
function="Inventory.DoToSelected"
- parameter="marketplace_attach_listing" />
+ parameter="marketplace_associate_listing" />
</menu_item_call>
<menu_item_call
label="Disassociate Listing"
@@ -31,10 +31,26 @@
<menu_item_call
label="Edit Listing"
layout="topleft"
- name="Marketplace Show Listing">
+ name="Marketplace Edit Listing">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="marketplace_edit_listing" />
+ </menu_item_call>
+ <menu_item_call
+ label="List"
+ layout="topleft"
+ name="Marketplace List">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="marketplace_list" />
+ </menu_item_call>
+ <menu_item_call
+ label="Unlist"
+ layout="topleft"
+ name="Marketplace Unlist">
<menu_item_call.on_click
function="Inventory.DoToSelected"
- parameter="marketplace_show_listing" />
+ parameter="marketplace_unlist" />
</menu_item_call>
<menu_item_call
label="Activate"
diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml
index 3b48c2e48c..acbb428422 100755
--- a/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml
+++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml
@@ -5,7 +5,7 @@
follows="all"
layout="topleft"
width="308"
- height="375">
+ height="440">
<panel
name="tool_panel"
follows="left|top|right"
@@ -59,7 +59,7 @@
layout="topleft"
default_tab_group="1"
width="308"
- height="340">
+ height="400">
<tab_container
name="marketplace_filter_tabs"
follows="all"
@@ -68,7 +68,7 @@
left="0"
top_pad="0"
width="308"
- height="340"
+ height="400"
halign="center"
tab_height="30"
tab_group="1"
@@ -81,7 +81,7 @@
layout="topleft"
follows="all"
width="308"
- height="310"
+ height="370"
top="16"
left="0"
start_folder.name="Marketplace listings"
@@ -98,13 +98,13 @@
show_item_link_overlays="true">
</inventory_panel>
<inventory_panel
- label="ACTIVE"
+ label="LISTED"
name="Active Items"
help_topic="marketplace_tab"
layout="topleft"
follows="all"
width="308"
- height="310"
+ height="370"
left_delta="0"
start_folder.name="Marketplace listings"
show_empty_message="false"
@@ -118,13 +118,13 @@
show_item_link_overlays="true">
</inventory_panel>
<inventory_panel
- label="INACTIVE"
+ label="UNLISTED"
name="Inactive Items"
help_topic="marketplace_tab"
layout="topleft"
follows="all"
width="308"
- height="310"
+ height="370"
left_delta="0"
start_folder.name="Marketplace listings"
show_empty_message="false"
@@ -144,7 +144,7 @@
layout="topleft"
follows="all"
width="308"
- height="310"
+ height="370"
left_delta="0"
start_folder.name="Marketplace listings"
show_empty_message="false"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 21d6669eea..ab7df75216 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2272,7 +2272,7 @@ The [[MARKETPLACE_CREATE_STORE_URL] Marketplace store] is returning errors.
<string name="Marketplace Error Internal Import">Error: There was a problem with this item. Try again later.</string>
<string name="MarketplaceNoID">no Mkt ID</string>
- <string name="MarketplaceLive">live</string>
+ <string name="MarketplaceLive">listed</string>
<string name="MarketplaceActive">active</string>
<string name="MarketplaceMax">max</string>
<string name="MarketplaceStock">stock</string>