diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-07-23 13:31:41 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-07-23 13:31:41 -0700 |
commit | 66522bb6bdff50f5f6838c1410e2cc4ab45a0a62 (patch) | |
tree | 3e079f236899373e9db8cb54fef293fa9950ffbb /indra/newview/llfloatersocial.cpp | |
parent | fdb8c2fcdb956307328d6638ca7c81004498b116 (diff) |
ACME-677 Make the 'Connect...', 'Disconnect' and 'Use another account...' buttons disabled upon clicking
Diffstat (limited to 'indra/newview/llfloatersocial.cpp')
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 2eb112d328..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(); @@ -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(); |