Close floater and clear text upon FB_POSTED for ACME-668

meow-7.2.2
Cho 2013-07-04 02:01:51 +01:00
parent ad8aeecb83
commit fd42625419
2 changed files with 41 additions and 0 deletions

View File

@ -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:

View File

@ -45,6 +45,7 @@ public:
bool onFacebookConnectStateChange(const LLSD& data);
void sendStatus();
void clearAndClose();
private:
LLUICtrl* mMessageTextEditor;
@ -67,6 +68,7 @@ public:
bool onFacebookConnectStateChange(const LLSD& data);
void sendPhoto();
void clearAndClose();
void updateControls();
void updateResolution(BOOL do_update);
@ -101,6 +103,7 @@ public:
bool onFacebookConnectStateChange(const LLSD& data);
void sendCheckin();
void clearAndClose();
private:
std::string mMapUrl;