summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-08-02 19:25:10 -0700
committerMerov Linden <merov@lindenlab.com>2013-08-02 19:25:10 -0700
commit35278461964653fc032995afdc366f096c937a14 (patch)
treeb96a0628699f5547c12eceabef2bad451d2e8a86 /indra
parent56b54aaf2954765f68c4fbe843495fdcdb918744 (diff)
ACME-796 : Do not flip the fbc state to failure while connecting through web browser. Handle the dismiss case as best as possible.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfacebookconnect.cpp2
-rw-r--r--indra/newview/llfloatersocial.cpp6
-rwxr-xr-xindra/newview/llfloaterwebcontent.cpp11
3 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp
index e4ac2a4960..98fd8b1d7b 100644
--- a/indra/newview/llfacebookconnect.cpp
+++ b/indra/newview/llfacebookconnect.cpp
@@ -122,7 +122,7 @@ public:
// Grab some graph data now that we are connected
LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_CONNECTED);
}
- else
+ else if (status != 302)
{
LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_CONNECTION_FAILED);
log_facebook_connect_error("Connect", status, reason, content.get("error_code"), content.get("error_description"));
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index eb9a7d2400..59db93f4b2 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -684,8 +684,12 @@ void LLSocialAccountPanel::onVisibilityChange(const LLSD& new_visibility)
else
{
showDisconnectedLayout();
- LLFacebookConnect::instance().checkConnectionToFacebook();
}
+ if ((LLFacebookConnect::instance().getConnectionState() == LLFacebookConnect::FB_NOT_CONNECTED) ||
+ (LLFacebookConnect::instance().getConnectionState() == LLFacebookConnect::FB_CONNECTION_FAILED))
+ {
+ LLFacebookConnect::instance().checkConnectionToFacebook();
+ }
}
else
{
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index e81055f7b1..9d703d2752 100755
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -29,6 +29,7 @@
#include "llcombobox.h"
#include "lliconctrl.h"
#include "llfloaterreg.h"
+#include "llfacebookconnect.h"
#include "lllayoutstack.h"
#include "llpluginclassmedia.h"
#include "llprogressbar.h"
@@ -293,6 +294,16 @@ void LLFloaterWebContent::onOpen(const LLSD& key)
//virtual
void LLFloaterWebContent::onClose(bool app_quitting)
{
+ // If we close the web browsing window showing the facebook login, we need to signal to this object that the connection will not happen
+ LLFloater* fbc_web = LLFloaterReg::getInstance("fbc_web");
+ if (fbc_web == this)
+ {
+ if (!LLFacebookConnect::instance().isConnected())
+ {
+ LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_CONNECTION_FAILED);
+ }
+ }
+
LLViewerMedia::proxyWindowClosed(mUUID);
destroy();
}