From 45bf1debaa805b64ce30e3c0670a2e9f24d43e08 Mon Sep 17 00:00:00 2001 From: "leslie@leslie-HPz600.lindenlab.com" Date: Tue, 2 Aug 2011 13:12:39 -0700 Subject: * Fixed up outbox UI alignment to match inbox * Added outbox item count to outbox button title * Updated sync loading indicator to keep moving until http request complete * Updated outbox panel display to use user_status http get response * Removed inbox/outbox folder name hack from LLInventoryPanel --- indra/newview/llviewermedia.cpp | 46 +++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 18 deletions(-) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index d5a8772461..fc71e19a7d 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1378,13 +1378,18 @@ public: { if (isGoodStatus(status)) { + std::string merchantStatus = content[gAgent.getID().getString()].asString(); + llinfos << "Marketplace merchant status: " << merchantStatus << llendl; + // Complete success gSavedSettings.setBOOL("InventoryDisplayInbox", true); + gSavedSettings.setBOOL("InventoryDisplayOutbox", (merchantStatus == "merchant")); } else if (status == 401) { // API is available for use but OpenID authorization failed gSavedSettings.setBOOL("InventoryDisplayInbox", true); + //gSavedSettings.setBOOL("InventoryDisplayOutbox", true); } else { @@ -1395,6 +1400,28 @@ public: }; +void doOnetimeEarlyHTTPRequests() +{ + std::string url = "https://marketplace.secondlife.com/"; + + if (!LLGridManager::getInstance()->isInProductionGrid()) + { + std::string gridLabel = LLGridManager::getInstance()->getGridLabel(); + url = llformat("https://marketplace.%s.lindenlab.com/", utf8str_tolower(gridLabel).c_str()); + + // TEMP for Jim's pdp + //url = "http://pdp24.lindenlab.com:3000/"; + } + + url += "api/1/users/"; + url += gAgent.getID().getString(); + url += "/user_status"; + + llinfos << "http get: " << url << llendl; + LLHTTPClient::get(url, new LLInventoryUserStatusResponder(), LLViewerMedia::getHeaders()); +} + + LLSD LLViewerMedia::getHeaders() { LLSD headers = LLSD::emptyMap(); @@ -1452,24 +1479,7 @@ void LLViewerMedia::setOpenIDCookie() new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()), headers); - std::string url = "https://marketplace.secondlife.com/"; - - if (!LLGridManager::getInstance()->isInProductionGrid()) - { - std::string gridLabel = LLGridManager::getInstance()->getGridLabel(); - url = llformat("https://marketplace.%s.lindenlab.com/", utf8str_tolower(gridLabel).c_str()); - } - - url += "api/1/users/"; - url += gAgent.getID().getString(); - url += "/user_status"; - - headers = LLSD::emptyMap(); - headers["Accept"] = "*/*"; - headers["Cookie"] = sOpenIDCookie; - headers["User-Agent"] = getCurrentUserAgent(); - - LLHTTPClient::get(url, new LLInventoryUserStatusResponder(), headers); + doOnetimeEarlyHTTPRequests(); } } -- cgit v1.2.3