diff options
author | Cho <cho@lindenlab.com> | 2013-06-25 19:49:13 +0100 |
---|---|---|
committer | Cho <cho@lindenlab.com> | 2013-06-25 19:49:13 +0100 |
commit | 4a8579462c464bd73d79256435d08ebc4112ccf7 (patch) | |
tree | 259ce2db472434eb40fc804bbf9fad9608091681 /indra/newview/llfloatersocial.cpp | |
parent | 4441edecdf27b9324b61d9e415c257e50e4909a6 (diff) |
made status update post button disabled for ACME-571
Diffstat (limited to 'indra/newview/llfloatersocial.cpp')
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index f2110e09c1..92a291e51c 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -57,21 +57,48 @@ std::string get_map_url() return map_url; } -LLSocialStatusPanel::LLSocialStatusPanel() +LLSocialStatusPanel::LLSocialStatusPanel() : + mMessageTextEditor(NULL), + mPostStatusButton(NULL) { mCommitCallbackRegistrar.add("SocialSharing.SendStatus", boost::bind(&LLSocialStatusPanel::onSend, this)); } +BOOL LLSocialStatusPanel::postBuild() +{ + mMessageTextEditor = getChild<LLUICtrl>("status_message"); + mPostStatusButton = getChild<LLUICtrl>("post_status_btn"); + + return LLPanel::postBuild(); +} + +void LLSocialStatusPanel::draw() +{ + if (mMessageTextEditor && mPostStatusButton) + { + std::string message = mMessageTextEditor->getValue().asString(); + mPostStatusButton->setEnabled(!message.empty()); + } + + LLPanel::draw(); +} + void LLSocialStatusPanel::onSend() { - std::string message = getChild<LLUICtrl>("message")->getValue().asString(); - LLFacebookConnect::instance().updateStatus(message); + if (mMessageTextEditor) + { + std::string message = mMessageTextEditor->getValue().asString(); + if (!message.empty()) + { + LLFacebookConnect::instance().updateStatus(message); - LLFloater* floater = getParentByType<LLFloater>(); - if (floater) - { - floater->closeFloater(); - } + LLFloater* floater = getParentByType<LLFloater>(); + if (floater) + { + floater->closeFloater(); + } + } + } } LLSocialPhotoPanel::LLSocialPhotoPanel() : @@ -84,8 +111,6 @@ mThumbnailPlaceholder(NULL) mCommitCallbackRegistrar.add("PostToFacebook.Send", boost::bind(&LLSocialPhotoPanel::onSend, this)); } - - LLSocialPhotoPanel::~LLSocialPhotoPanel() { if(mPreviewHandle.get()) |