From 619aa8e65c2eb81c62accbc87fcf2c85534180ae Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 17 Mar 2014 18:08:21 -0700 Subject: ACME-1376 : Suppress location checkbox in Facebook Photo panel --- indra/newview/llfloaterfacebook.cpp | 40 +--------------------- indra/newview/llfloaterfacebook.h | 3 -- .../skins/default/xui/en/panel_facebook_photo.xml | 10 +----- 3 files changed, 2 insertions(+), 51 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterfacebook.cpp b/indra/newview/llfloaterfacebook.cpp index 6abb0aa0cc..b421fa0e55 100644 --- a/indra/newview/llfloaterfacebook.cpp +++ b/indra/newview/llfloaterfacebook.cpp @@ -192,11 +192,9 @@ mBtnPreview(NULL), mWorkingLabel(NULL), mThumbnailPlaceholder(NULL), mCaptionTextBox(NULL), -mLocationCheckbox(NULL), mPostButton(NULL), mBigPreviewFloater(NULL), -mQuality(MAX_QUALITY), -mIncludeLocation(TRUE) +mQuality(MAX_QUALITY) { mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLFacebookPhotoPanel::onSend, this)); mCommitCallbackRegistrar.add("SocialSharing.RefreshPhoto", boost::bind(&LLFacebookPhotoPanel::onClickNewSnapshot, this)); @@ -226,8 +224,6 @@ BOOL LLFacebookPhotoPanel::postBuild() mWorkingLabel = getChild("working_lbl"); mThumbnailPlaceholder = getChild("thumbnail_placeholder"); mCaptionTextBox = getChild("photo_caption"); - mLocationCheckbox = getChild("add_location_cb"); - mLocationCheckbox->setCommitCallback(boost::bind(&LLFacebookPhotoPanel::updateLocationCheckbox, this)); mPostButton = getChild("post_photo_btn"); mCancelButton = getChild("cancel_photo_btn"); mBigPreviewFloater = dynamic_cast(LLFloaterReg::getInstance("big_preview")); @@ -283,16 +279,6 @@ void LLFacebookPhotoPanel::draw() mFilterComboBox->setEnabled(no_ongoing_connection); mRefreshBtn->setEnabled(no_ongoing_connection); mBtnPreview->setEnabled(no_ongoing_connection); - mLocationCheckbox->setEnabled(no_ongoing_connection && !mCaptionTextBox->getValue().asString().empty()); - - if (mCaptionTextBox->getValue().asString().empty()) - { - mLocationCheckbox->setValue(FALSE); - } - else - { - mLocationCheckbox->setValue(mIncludeLocation); - } // Reassign the preview floater if we have the focus and the preview exists if (hasFocus() && isPreviewVisible()) @@ -462,25 +448,6 @@ void LLFacebookPhotoPanel::sendPhoto() // Get the caption std::string caption = mCaptionTextBox->getValue().asString(); - // Add the location if required - bool add_location = mLocationCheckbox->getValue().asBoolean(); - if (add_location) - { - // Get the SLURL for the location - LLSLURL slurl; - LLAgentUI::buildSLURL(slurl); - std::string slurl_string = slurl.getSLURLString(); - - // Add query parameters so Google Analytics can track incoming clicks! - slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS; - - // Add it to the caption (pretty crude, but we don't have a better option with photos) - if (caption.empty()) - caption = slurl_string; - else - caption = caption + " " + slurl_string; - } - // Get the image LLSnapshotLivePreview* previewp = getPreviewView(); @@ -582,11 +549,6 @@ void LLFacebookPhotoPanel::updateResolution(BOOL do_update) } } -void LLFacebookPhotoPanel::updateLocationCheckbox() -{ - mIncludeLocation = mLocationCheckbox->getValue().asBoolean(); -} - void LLFacebookPhotoPanel::checkAspectRatio(S32 index) { LLSnapshotLivePreview *previewp = getPreviewView() ; diff --git a/indra/newview/llfloaterfacebook.h b/indra/newview/llfloaterfacebook.h index 5f2d53eaca..fd5d3d0635 100644 --- a/indra/newview/llfloaterfacebook.h +++ b/indra/newview/llfloaterfacebook.h @@ -78,7 +78,6 @@ public: void updateControls(); void updateResolution(BOOL do_update); - void updateLocationCheckbox(); void checkAspectRatio(S32 index); LLUICtrl* getRefreshBtn(); @@ -95,7 +94,6 @@ private: LLUICtrl * mWorkingLabel; LLUICtrl * mThumbnailPlaceholder; LLUICtrl * mCaptionTextBox; - LLUICtrl * mLocationCheckbox; LLUICtrl * mPostButton; LLUICtrl * mCancelButton; LLButton * mBtnPreview; @@ -103,7 +101,6 @@ private: LLFloaterBigPreview * mBigPreviewFloater; S32 mQuality; // Compression quality - bool mIncludeLocation; }; class LLFacebookCheckinPanel : public LLPanel diff --git a/indra/newview/skins/default/xui/en/panel_facebook_photo.xml b/indra/newview/skins/default/xui/en/panel_facebook_photo.xml index 81f7a7de22..b5b6dee004 100644 --- a/indra/newview/skins/default/xui/en/panel_facebook_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_facebook_photo.xml @@ -123,7 +123,7 @@ Comment (optional): -