summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfacebookconnect.cpp39
-rw-r--r--indra/newview/llfacebookconnect.h1
-rw-r--r--indra/newview/llfloatersocial.cpp16
-rw-r--r--indra/newview/llfloatersocial.h1
-rw-r--r--indra/newview/skins/default/xui/en/panel_social_account.xml12
5 files changed, 6 insertions, 63 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp
index 486195a483..8c75d0efc6 100644
--- a/indra/newview/llfacebookconnect.cpp
+++ b/indra/newview/llfacebookconnect.cpp
@@ -252,40 +252,6 @@ private:
///////////////////////////////////////////////////////////////////////////////
//
-class LLFacebookDisconnectThenConnectResponder : public LLHTTPClient::Responder
-{
- LOG_CLASS(LLFacebookDisconnectThenConnectResponder);
-public:
-
- LLFacebookDisconnectThenConnectResponder()
- {
- LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_DISCONNECTING);
- }
-
- virtual void completed(U32 status, const std::string& reason, const LLSD& content)
- {
- if (isGoodStatus(status))
- {
- LL_DEBUGS("FacebookConnect") << "Disconnect successful. content: " << content << LL_ENDL;
-
- // Clear all facebook stuff
- LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_NOT_CONNECTED);
- LLFacebookConnect::instance().clearContent();
-
- LLViewerMedia::clearAllCookies();
-
- //Now attempt to reconnect
- LLFacebookConnect::instance().checkConnectionToFacebook(true);
- }
- else
- {
- log_facebook_connect_error("Disconnect", status, reason, content.get("error_code"), content.get("error_description"));
- }
- }
-};
-
-///////////////////////////////////////////////////////////////////////////////
-//
class LLFacebookInfoResponder : public LLHTTPClient::Responder
{
LOG_CLASS(LLFacebookInfoResponder);
@@ -401,11 +367,6 @@ void LLFacebookConnect::checkConnectionToFacebook(bool auto_connect)
}
}
-void LLFacebookConnect::disconnectThenConnectToFacebook()
-{
- LLHTTPClient::del(getFacebookConnectURL("/connection"), new LLFacebookDisconnectThenConnectResponder());
-}
-
void LLFacebookConnect::loadFacebookInfo()
{
const bool follow_redirects = false;
diff --git a/indra/newview/llfacebookconnect.h b/indra/newview/llfacebookconnect.h
index f74b9f7d41..be3028e3a0 100644
--- a/indra/newview/llfacebookconnect.h
+++ b/indra/newview/llfacebookconnect.h
@@ -58,7 +58,6 @@ public:
void connectToFacebook(const std::string& auth_code = "", const std::string& auth_state = ""); // Initiate the complete FB connection. Please use checkConnectionToFacebook() in normal use.
void disconnectFromFacebook(); // Disconnect from the FBC service.
void checkConnectionToFacebook(bool auto_connect = false); // Check if an access token is available on the FBC service. If not, call connectToFacebook().
- void disconnectThenConnectToFacebook(); // Disconnects and then connects (for switching FB accounts)
void loadFacebookInfo();
void loadFacebookFriends();
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index 3c8d4d6fb9..129934ae16 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -44,6 +44,7 @@
#include "llsnapshotlivepreview.h"
#include "llviewerregion.h"
#include "llviewercontrol.h"
+#include "llviewermedia.h"
static LLRegisterPanelClassWrapper<LLSocialStatusPanel> t_panel_status("llsocialstatuspanel");
static LLRegisterPanelClassWrapper<LLSocialPhotoPanel> t_panel_photo("llsocialphotopanel");
@@ -619,11 +620,9 @@ mAccountCaptionLabel(NULL),
mAccountNameLabel(NULL),
mPanelButtons(NULL),
mConnectButton(NULL),
-mUseAnotherAccountButton(NULL),
mDisconnectButton(NULL)
{
mCommitCallbackRegistrar.add("SocialSharing.Connect", boost::bind(&LLSocialAccountPanel::onConnect, this));
- mCommitCallbackRegistrar.add("SocialSharing.UseAnotherAccount", boost::bind(&LLSocialAccountPanel::onUseAnotherAccount, this));
mCommitCallbackRegistrar.add("SocialSharing.Disconnect", boost::bind(&LLSocialAccountPanel::onDisconnect, this));
setVisibleCallback(boost::bind(&LLSocialAccountPanel::onVisibilityChange, this, _2));
@@ -635,7 +634,6 @@ BOOL LLSocialAccountPanel::postBuild()
mAccountNameLabel = getChild<LLTextBox>("account_name_label");
mPanelButtons = getChild<LLUICtrl>("panel_buttons");
mConnectButton = getChild<LLUICtrl>("connect_btn");
- mUseAnotherAccountButton = getChild<LLUICtrl>("use_another_account_btn");
mDisconnectButton = getChild<LLUICtrl>("disconnect_btn");
return LLPanel::postBuild();
@@ -648,7 +646,6 @@ void LLSocialAccountPanel::draw()
//Disable the 'disconnect' button and the 'use another account' button when disconnecting in progress
bool disconnecting = connection_state == LLFacebookConnect::FB_DISCONNECTING;
mDisconnectButton->setEnabled(!disconnecting);
- mUseAnotherAccountButton->setEnabled(!disconnecting);
//Disable the 'connect' button when a connection is in progress
bool connecting = connection_state == LLFacebookConnect::FB_CONNECTION_IN_PROGRESS;
@@ -669,10 +666,12 @@ void LLSocialAccountPanel::onVisibilityChange(const LLSD& new_visibility)
LLEventPumps::instance().obtain("FacebookConnectInfo").stopListening("LLSocialAccountPanel");
LLEventPumps::instance().obtain("FacebookConnectInfo").listen("LLSocialAccountPanel", boost::bind(&LLSocialAccountPanel::onFacebookConnectInfoChange, this));
+ //Connected
if(LLFacebookConnect::instance().isConnected())
{
showConnectedLayout();
}
+ //Check if connected (show disconnected layout in meantime)
else
{
showDisconnectedLayout();
@@ -712,6 +711,7 @@ bool LLSocialAccountPanel::onFacebookConnectInfoChange()
LLSD info = LLFacebookConnect::instance().getInfo();
std::string clickable_name;
+ //Strings of format [http://www.somewebsite.com Click Me] become clickable text
if(info.has("link") && info.has("name"))
{
clickable_name = "[" + info["link"].asString() + " " + info["name"].asString() + "]";
@@ -727,7 +727,6 @@ void LLSocialAccountPanel::showConnectButton()
if(!mConnectButton->getVisible())
{
mConnectButton->setVisible(TRUE);
- mUseAnotherAccountButton->setVisible(FALSE);
mDisconnectButton->setVisible(FALSE);
}
}
@@ -737,7 +736,6 @@ void LLSocialAccountPanel::hideConnectButton()
if(mConnectButton->getVisible())
{
mConnectButton->setVisible(FALSE);
- mUseAnotherAccountButton->setVisible(TRUE);
mDisconnectButton->setVisible(TRUE);
}
}
@@ -760,11 +758,9 @@ void LLSocialAccountPanel::showConnectedLayout()
void LLSocialAccountPanel::onConnect()
{
LLFacebookConnect::instance().checkConnectionToFacebook(true);
-}
-void LLSocialAccountPanel::onUseAnotherAccount()
-{
- LLFacebookConnect::instance().disconnectThenConnectToFacebook();
+ //Clears browser cookies so that the user must enter their FB creds when connecting/re-connecting
+ LLViewerMedia::clearAllCookies();
}
void LLSocialAccountPanel::onDisconnect()
diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloatersocial.h
index 13c29e7028..e7ad9ac12e 100644
--- a/indra/newview/llfloatersocial.h
+++ b/indra/newview/llfloatersocial.h
@@ -139,7 +139,6 @@ private:
LLTextBox * mAccountNameLabel;
LLUICtrl * mPanelButtons;
LLUICtrl * mConnectButton;
- LLUICtrl * mUseAnotherAccountButton;
LLUICtrl * mDisconnectButton;
};
diff --git a/indra/newview/skins/default/xui/en/panel_social_account.xml b/indra/newview/skins/default/xui/en/panel_social_account.xml
index 7bd3bb191e..5855eeed59 100644
--- a/indra/newview/skins/default/xui/en/panel_social_account.xml
+++ b/indra/newview/skins/default/xui/en/panel_social_account.xml
@@ -54,18 +54,6 @@
follows="left|top"
top_delta="0"
height="23"
- label="Use another account..."
- name="use_another_account_btn"
- width="210"
- visible="false">
- <commit_callback function="SocialSharing.UseAnotherAccount"/>
- </button>
-
- <button
- layout="topleft"
- follows="left|top"
- top_pad="11"
- height="23"
label="Disconnect"
name="disconnect_btn"
width="210"