From 10d92237adca8bffc82c887dbd37b988602b2d59 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 15 Sep 2011 16:39:46 -0700 Subject: * Re-enabling outbox --- indra/newview/llviewermedia.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 13dbc5e386..e7f05dcaa3 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1368,7 +1368,7 @@ void LLViewerMedia::removeCookie(const std::string &name, const std::string &dom // This is defined in two files but I don't want to create a dependence between this and llsidepanelinventory // just to be able to temporarily disable the outbox. -#define ENABLE_INVENTORY_DISPLAY_OUTBOX 0 // keep in sync with ENABLE_MERCHANT_OUTBOX_PANEL, ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU +#define ENABLE_INVENTORY_DISPLAY_OUTBOX 1 // keep in sync with ENABLE_MERCHANT_OUTBOX_PANEL, ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU class LLInventoryUserStatusResponder : public LLHTTPClient::Responder { -- cgit v1.2.3 From 5af39ea28be1a76ec0c3042a0bf34e7d64835c18 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 16 Sep 2011 11:46:37 -0700 Subject: EXP-1169 FIX -- No synch error icon given on Outbox on Agni where API does not exist * Moved marketplace URL related functions into a new file llmarketplacefunctions.cpp/h. This will the future home of more marketplace-related functions. * Disabled sync button when the marketplace API is unavailable. --- indra/newview/llviewermedia.cpp | 81 ++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 45 deletions(-) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index e7f05dcaa3..b60881b5f1 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -26,51 +26,49 @@ #include "llviewerprecompiledheaders.h" +#include "llviewermedia.h" + #include "llagent.h" #include "llagentcamera.h" -#include "llviewermedia.h" -#include "llviewermediafocus.h" -#include "llmimetypes.h" +#include "llappviewer.h" +#include "llaudioengine.h" // for gAudiop +#include "llcallbacklist.h" +#include "lldir.h" +#include "lldiriterator.h" +#include "llevent.h" // LLSimpleListener +#include "llfilepicker.h" +#include "llfloatermediabrowser.h" // for handling window close requests and geometry change requests in media browser windows. +#include "llfloaterwebcontent.h" // for handling window close requests and geometry change requests in media browser windows. +#include "llfocusmgr.h" +#include "llkeyboard.h" +#include "lllogininstance.h" +#include "llmarketplacefunctions.h" #include "llmediaentry.h" +#include "llmimetypes.h" +#include "llmutelist.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" +#include "llpanelprofile.h" +#include "llparcel.h" +#include "llpluginclassmedia.h" +#include "llplugincookiestore.h" +#include "llurldispatcher.h" +#include "lluuid.h" #include "llversioninfo.h" #include "llviewercontrol.h" -#include "llviewertexture.h" +#include "llviewermediafocus.h" #include "llviewerparcelmedia.h" #include "llviewerparcelmgr.h" +#include "llviewerregion.h" +#include "llviewertexture.h" #include "llviewertexturelist.h" -#include "llvovolume.h" -#include "llpluginclassmedia.h" -#include "llplugincookiestore.h" #include "llviewerwindow.h" -#include "llfocusmgr.h" -#include "llcallbacklist.h" -#include "llparcel.h" -#include "llaudioengine.h" // for gAudiop -#include "llurldispatcher.h" #include "llvoavatar.h" #include "llvoavatarself.h" -#include "llviewerregion.h" +#include "llvovolume.h" #include "llwebsharing.h" // For LLWebSharing::setOpenIDCookie(), *TODO: find a better way to do this! -#include "llfilepicker.h" -#include "llnotifications.h" -#include "lldir.h" -#include "lldiriterator.h" -#include "llevent.h" // LLSimpleListener -#include "llnotificationsutil.h" -#include "lluuid.h" -#include "llkeyboard.h" -#include "llmutelist.h" -#include "llpanelprofile.h" -#include "llappviewer.h" -#include "lllogininstance.h" -//#include "llfirstuse.h" -#include "llviewernetwork.h" #include "llwindow.h" - -#include "llfloatermediabrowser.h" // for handling window close requests and geometry change requests in media browser windows. -#include "llfloaterwebcontent.h" // for handling window close requests and geometry change requests in media browser windows. - #include // for SkinFolder listener #include @@ -1394,14 +1392,20 @@ public: #if ENABLE_INVENTORY_DISPLAY_OUTBOX gSavedSettings.setBOOL("InventoryDisplayOutbox", true); #endif + + setMarketplaceSyncEnabled(true); } else if (status == 401) { // API is available for use but OpenID authorization failed gSavedSettings.setBOOL("InventoryDisplayInbox", true); + + setMarketplaceSyncEnabled(false); } else { + setMarketplaceSyncEnabled(false); + // API in unavailable llinfos << "Marketplace API is unavailable -- Inbox may be disabled, status = " << status << ", reason = " << reason << llendl; } @@ -1411,20 +1415,7 @@ 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"; + std::string url = getMarketplaceURL_UserStatus(); llinfos << "http get: " << url << llendl; LLHTTPClient::get(url, new LLInventoryUserStatusResponder(), LLViewerMedia::getHeaders()); -- cgit v1.2.3