diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-06-27 11:26:42 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-06-27 11:26:42 -0700 |
commit | 1adc987ed1a90af1fdb4e14bf1ce1674a69389b9 (patch) | |
tree | b80a7cf903b4594b78e74bc59937b6a40cf33f82 | |
parent | 29477353f9ac936a5269302b76179ae0b1feec3a (diff) | |
parent | 7fc98de12c0a69bae6d847697da6d8a0e03f80be (diff) |
merge
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llfloatersocial.h | 4 |
2 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index ea69a60887..7ef8f9f9e3 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -84,7 +84,7 @@ void LLSocialStatusPanel::draw() if (mMessageTextEditor && mPostStatusButton) { std::string message = mMessageTextEditor->getValue().asString(); - mPostStatusButton->setEnabled(!message.empty()); + mPostStatusButton->setEnabled(!message.empty() && LLFacebookConnect::instance().isConnected()); } LLPanel::draw(); @@ -128,6 +128,7 @@ LLSocialPhotoPanel::~LLSocialPhotoPanel() BOOL LLSocialPhotoPanel::postBuild() { + mPostButton = getChild<LLUICtrl>("post_btn"); mResolutionComboBox = getChild<LLUICtrl>("resolution_combobox"); mResolutionComboBox->setCommitCallback(boost::bind(&LLSocialPhotoPanel::onResolutionComboCommit, this)); mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn"); @@ -261,11 +262,8 @@ LLSnapshotLivePreview* LLSocialPhotoPanel::getPreviewView() return previewp; } - void LLSocialPhotoPanel::updateControls() { - - LLSnapshotLivePreview* previewp = getPreviewView(); BOOL got_bytes = previewp && previewp->getDataSize() > 0; BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); @@ -368,6 +366,8 @@ void LLSocialPhotoPanel::draw() mThumbnailPlaceholder->draw(); gGL.popUIMatrix(); } + + mPostButton->setEnabled(LLFacebookConnect::instance().isConnected()); } void LLSocialPhotoPanel::onSend() @@ -409,6 +409,7 @@ LLSocialCheckinPanel::LLSocialCheckinPanel() : BOOL LLSocialCheckinPanel::postBuild() { // Keep pointers to widgets so we don't traverse the UI hierarchy too often + mPostButton = getChild<LLUICtrl>("post_place_btn"); mMapLoadingIndicator = getChild<LLUICtrl>("map_loading_indicator"); mMapPlaceholder = getChild<LLIconCtrl>("map_placeholder"); mMapCheckBox = getChild<LLCheckBoxCtrl>("add_place_view_cb"); @@ -450,6 +451,7 @@ void LLSocialCheckinPanel::draw() mMapCheckBox->setEnabled(true); mMapCheckBox->set(mMapCheckBoxValue); } + mPostButton->setEnabled(LLFacebookConnect::instance().isConnected()); LLPanel::draw(); } @@ -500,6 +502,9 @@ void LLFloaterSocial::onCancel() BOOL LLFloaterSocial::postBuild() { + // Initiate a connection to Facebook (getConnectionToFacebook() handles the already connected state) + LLFacebookConnect::instance().getConnectionToFacebook(); + // Keep tab of the Photo Panel mSocialPhotoPanel = static_cast<LLSocialPhotoPanel*>(getChild<LLUICtrl>("social_photo_tab")); return LLFloater::postBuild(); } diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloatersocial.h index d4073212ff..6411843b9c 100644 --- a/indra/newview/llfloatersocial.h +++ b/indra/newview/llfloatersocial.h @@ -77,6 +77,9 @@ class LLSocialPhotoPanel : public LLPanel LLUICtrl* mThumbnailPlaceholder; bool mNeedRefresh; + +private: + LLUICtrl* mPostButton; }; class LLSocialCheckinPanel : public LLPanel @@ -89,6 +92,7 @@ public: private: std::string mMapUrl; LLPointer<LLViewerFetchedTexture> mMapTexture; + LLUICtrl* mPostButton; LLUICtrl* mMapLoadingIndicator; LLIconCtrl* mMapPlaceholder; LLCheckBoxCtrl* mMapCheckBox; |