ACME-728: When the 'Disconnect' button is clicked the fbc-service disconnect route should be called

meow-7.2.2
Gilbert Gonzales 2013-07-18 16:23:11 -07:00
parent b2e2282e98
commit 03563fcaa1
2 changed files with 20 additions and 12 deletions

View File

@ -652,15 +652,11 @@ void LLSocialAccountPanel::onVisibilityChange(const LLSD& new_visibility)
if(LLFacebookConnect::instance().isConnected())
{
hideConnectButton();
mAccountCaptionLabel->setText(getString("facebook_connected"));
mAccountNameLabel->setText(std::string("[secondlife:/// Philippe Bossut]"));
showConnectedLayout();
}
else
{
mAccountCaptionLabel->setText(getString("facebook_disconnected"));
mAccountNameLabel->setText(std::string(""));
showDisconnectedLayout();
LLFacebookConnect::instance().checkConnectionToFacebook();
}
}
@ -679,16 +675,12 @@ bool LLSocialAccountPanel::onFacebookConnectStateChange(const LLSD& data)
case LLFacebookConnect::FB_POSTING:
case LLFacebookConnect::FB_POSTED:
case LLFacebookConnect::FB_POST_FAILED:
mAccountCaptionLabel->setText(getString("facebook_connected"));
mAccountNameLabel->setText(std::string("[secondlife:/// Philippe Bossut]"));
hideConnectButton();
showConnectedLayout();
break;
case LLFacebookConnect::FB_NOT_CONNECTED:
case LLFacebookConnect::FB_CONNECTION_IN_PROGRESS:
case LLFacebookConnect::FB_CONNECTION_FAILED:
mAccountCaptionLabel->setText(getString("facebook_disconnected"));
mAccountNameLabel->setText(std::string(""));
showConnectButton();
showDisconnectedLayout();
break;
}
@ -725,6 +717,20 @@ void LLSocialAccountPanel::hideConnectButton()
}
}
void LLSocialAccountPanel::showDisconnectedLayout()
{
mAccountCaptionLabel->setText(getString("facebook_disconnected"));
mAccountNameLabel->setText(std::string(""));
showConnectButton();
}
void LLSocialAccountPanel::showConnectedLayout()
{
mAccountCaptionLabel->setText(getString("facebook_connected"));
mAccountNameLabel->setText(std::string("[secondlife:/// Philippe Bossut]"));
hideConnectButton();
}
void LLSocialAccountPanel::onConnect()
{
LLFacebookConnect::instance().checkConnectionToFacebook(true);

View File

@ -130,6 +130,8 @@ private:
void showConnectButton();
void hideConnectButton();
void showDisconnectedLayout();
void showConnectedLayout();
LLTextBox * mAccountCaptionLabel;
LLTextBox * mAccountNameLabel;