summaryrefslogtreecommitdiff
path: root/indra/newview/llfacebookconnect.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-07-17 17:51:10 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2013-07-17 17:51:10 -0700
commit883fca9d5a7c5db10f100b05b5312818233e342c (patch)
treea4691be4375c5a60c4495f5c9182a25f93b92589 /indra/newview/llfacebookconnect.cpp
parent095c53fa060b3d336b408e8b87f30518c8db36cd (diff)
parent3d6a98d845c871377a52fc924ce06329db34a776 (diff)
merge
Diffstat (limited to 'indra/newview/llfacebookconnect.cpp')
-rw-r--r--indra/newview/llfacebookconnect.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp
index 0d11658d07..ac92fc6ed5 100644
--- a/indra/newview/llfacebookconnect.cpp
+++ b/indra/newview/llfacebookconnect.cpp
@@ -40,6 +40,9 @@
#include "lltrans.h"
#include "llevents.h"
+#include "llfloaterwebcontent.h"
+#include "llfloaterreg.h"
+
boost::scoped_ptr<LLEventPump> LLFacebookConnect::sStateWatcher(new LLEventStream("FacebookConnectState"));
boost::scoped_ptr<LLEventPump> LLFacebookConnect::sContentWatcher(new LLEventStream("FacebookConnectContent"));
@@ -49,7 +52,7 @@ void log_facebook_connect_error(const std::string& request, U32 status, const st
// Note: 302 (redirect) is *not* an error that warrants logging
if (status != 302)
{
- LL_WARNS("FacebookConnect") << request << " request failed with a " << status << " " << reason << ". Reason: " << code << "(" << description << ")" << LL_ENDL;
+ LL_WARNS("FacebookConnect") << request << " request failed with a " << status << " " << reason << ". Reason: " << code << " (" << description << ")" << LL_ENDL;
}
}
@@ -73,10 +76,18 @@ public:
{
if (tokens[0].asString() == "connect")
{
+ // connect to facebook
if (query_map.has("code"))
{
LLFacebookConnect::instance().connectToFacebook(query_map["code"], query_map.get("state"));
}
+
+ // this command probably came from the fbc_web browser, so close it
+ LLFloater* fbc_web = LLFloaterReg::getInstance("fbc_web");
+ if (fbc_web)
+ {
+ fbc_web->closeFloater();
+ }
return true;
}
}
@@ -274,7 +285,12 @@ LLFacebookConnect::LLFacebookConnect()
void LLFacebookConnect::openFacebookWeb(std::string url)
{
- LLUrlAction::openURLExternal(url);
+ // Open the URL in an internal browser window without navigation UI
+ LLFloaterWebContent::Params p;
+ p.url(url).show_chrome(false);
+ LLFloaterReg::showInstance("fbc_web", p);
+
+ //LLUrlAction::openURLExternal(url);
}
std::string LLFacebookConnect::getFacebookConnectURL(const std::string& route)