From 66522bb6bdff50f5f6838c1410e2cc4ab45a0a62 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 23 Jul 2013 13:31:41 -0700 Subject: ACME-677 Make the 'Connect...', 'Disconnect' and 'Use another account...' buttons disabled upon clicking --- indra/newview/llfloatersocial.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'indra/newview/llfloatersocial.cpp') 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(); -- cgit v1.2.3