diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-10-26 13:59:22 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-10-26 13:59:22 -0700 |
commit | f01aa16298bf22d9882e8b690f672e20098547a6 (patch) | |
tree | 52a1265902ffbc5268d1b666dbd939bceb189757 /indra/newview/llviewermedia.cpp | |
parent | 5c4812015624ca31664a5ceb4c8998156286bd80 (diff) | |
parent | bc32f4e590a182c7c7627ee05de055ed5f8cb300 (diff) |
Merge from dd repo
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r-- | indra/newview/llviewermedia.cpp | 83 |
1 files changed, 37 insertions, 46 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 41b4dc01e8..b7696d4ca2 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 <boost/bind.hpp> // for SkinFolder listener #include <boost/signals2.hpp> @@ -1368,7 +1366,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 { @@ -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()); |