diff options
Diffstat (limited to 'indra/newview/llfloatersocial.cpp')
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index eb3ceaf96e..2ecadcfaf6 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -120,6 +120,7 @@ bool LLSocialStatusPanel::onFacebookConnectStateChange(const LLSD& data) case LLFacebookConnect::FB_POSTED: LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLSocialStatusPanel"); + clearAndClose(); break; } @@ -135,6 +136,17 @@ void LLSocialStatusPanel::sendStatus() } } +void LLSocialStatusPanel::clearAndClose() +{ + mMessageTextEditor->setValue(""); + + LLFloater* floater = getParentByType<LLFloater>(); + if (floater) + { + floater->closeFloater(); + } +} + /////////////////////////// //LLSocialPhotoPanel/////// /////////////////////////// @@ -333,6 +345,7 @@ bool LLSocialPhotoPanel::onFacebookConnectStateChange(const LLSD& data) case LLFacebookConnect::FB_POSTED: LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLSocialPhotoPanel"); + clearAndClose(); break; } @@ -365,6 +378,17 @@ void LLSocialPhotoPanel::sendPhoto() updateControls(); } +void LLSocialPhotoPanel::clearAndClose() +{ + mCaptionTextBox->setValue(""); + + LLFloater* floater = getParentByType<LLFloater>(); + if (floater) + { + floater->closeFloater(); + } +} + void LLSocialPhotoPanel::updateControls() { LLSnapshotLivePreview* previewp = getPreviewView(); @@ -564,6 +588,7 @@ bool LLSocialCheckinPanel::onFacebookConnectStateChange(const LLSD& data) case LLFacebookConnect::FB_POSTED: LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLSocialCheckinPanel"); + clearAndClose(); break; } @@ -595,6 +620,17 @@ void LLSocialCheckinPanel::sendCheckin() LLFacebookConnect::instance().postCheckin(slurl_string, region_name, description, map_url, caption); } +void LLSocialCheckinPanel::clearAndClose() +{ + getChild<LLUICtrl>("place_caption")->setValue(""); + + LLFloater* floater = getParentByType<LLFloater>(); + if (floater) + { + floater->closeFloater(); + } +} + //////////////////////// //LLFloaterSocial/////// //////////////////////// @@ -680,6 +716,8 @@ void LLFloaterSocial::draw() mStatusLoadingIndicator->setVisible(true); break; case LLFacebookConnect::FB_CONNECTED: + break; + case LLFacebookConnect::FB_POSTED: break; case LLFacebookConnect::FB_CONNECTION_FAILED: case LLFacebookConnect::FB_POST_FAILED: |