summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersocial.cpp
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2013-07-04 02:01:51 +0100
committerCho <cho@lindenlab.com>2013-07-04 02:01:51 +0100
commitfd4262541946770515ce8a486dd3a69245365def (patch)
tree8c93aab032c6c987e3708b8b4c354e7dd74fa272 /indra/newview/llfloatersocial.cpp
parentad8aeecb8331ca68eef9a12536c80a4658885ccb (diff)
Close floater and clear text upon FB_POSTED for ACME-668
Diffstat (limited to 'indra/newview/llfloatersocial.cpp')
-rw-r--r--indra/newview/llfloatersocial.cpp38
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: