summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersocial.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-07-23 17:18:14 -0700
committerMerov Linden <merov@lindenlab.com>2013-07-23 17:18:14 -0700
commit4035f23681ae1834804196ec7b17010263e29b3b (patch)
tree8eff172ec53eb82ae1916c0ebcb0dffb4adcdfb3 /indra/newview/llfloatersocial.cpp
parent05c2e087153a9816de2c6218c2509cbdb935ccf0 (diff)
parent66d41f02ba0e55a2cb34752c8f77b71b9a0c0503 (diff)
Pull merge from lindenlab/viewer-fbc
Diffstat (limited to 'indra/newview/llfloatersocial.cpp')
-rw-r--r--indra/newview/llfloatersocial.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index 6fd3650c7b..3c8d4d6fb9 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -641,6 +641,22 @@ BOOL LLSocialAccountPanel::postBuild()
return LLPanel::postBuild();
}
+void LLSocialAccountPanel::draw()
+{
+ LLFacebookConnect::EConnectionState connection_state = LLFacebookConnect::instance().getConnectionState();
+
+ //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;
+ mConnectButton->setEnabled(!connecting);
+
+ LLPanel::draw();
+}
+
void LLSocialAccountPanel::onVisibilityChange(const LLSD& new_visibility)
{
bool visible = new_visibility.asBoolean();
@@ -748,7 +764,7 @@ void LLSocialAccountPanel::onConnect()
void LLSocialAccountPanel::onUseAnotherAccount()
{
-
+ LLFacebookConnect::instance().disconnectThenConnectToFacebook();
}
void LLSocialAccountPanel::onDisconnect()
@@ -862,6 +878,13 @@ void LLFloaterSocial::draw()
status_text = LLTrans::getString("SocialFacebookErrorPosting");
mStatusErrorText->setValue(status_text);
break;
+ case LLFacebookConnect::FB_DISCONNECTING:
+ // Disconnecting loading indicator
+ mStatusLoadingText->setVisible(true);
+ status_text = LLTrans::getString("SocialFacebookDisconnecting");
+ mStatusLoadingText->setValue(status_text);
+ mStatusLoadingIndicator->setVisible(true);
+ break;
}
}
LLFloater::draw();