diff options
author | Merov Linden <merov@lindenlab.com> | 2013-06-25 15:53:42 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-06-25 15:53:42 -0700 |
commit | 2c753857e1ea55509403a478193893099b3168e2 (patch) | |
tree | 845c1a3162b5287865b9dc20472ebd60fe725a80 | |
parent | ec09ce526b477869aa76dddaa8e11eecca57989d (diff) | |
parent | b497b121ed2d8964160ee79003debb9f5ab62a49 (diff) |
Merge pull from lindenlab/viewer-fbc
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index e164ea8155..2859b19b19 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -44,6 +44,7 @@ static LLRegisterPanelClassWrapper<LLSocialPhotoPanel> t_panel_photo("llsocialph static LLRegisterPanelClassWrapper<LLSocialCheckinPanel> t_panel_checkin("llsocialcheckinpanel"); const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte +const std::string DEFAULT_CHECKIN_ICON_URL = "http://logok.org/wp-content/uploads/2010/07/podcastlogo1.jpg"; std::string get_map_url() { @@ -376,9 +377,18 @@ void LLSocialPhotoPanel::onSend() else caption = caption + " " + slurl.getSLURLString(); } - //LLFacebookConnect::instance().sharePhoto(LLFloaterSnapshot::getImageData(), caption); - //LLWebProfile::uploadImage(LLFloaterSnapshot::getImageData(), caption, add_location, boost::bind(&LLPanelSnapshotFacebook::onImageUploaded, this, caption, _1)); - //LLFloaterSnapshot::postSave(); + + LLSnapshotLivePreview* previewp = getPreviewView(); + + LLFacebookConnect::instance().sharePhoto(previewp->getFormattedImage(), caption); + updateControls(); + + // Close the floater once "Post" has been pushed + LLFloater* floater = getParentByType<LLFloater>(); + if (floater) + { + floater->closeFloater(); + } } @@ -403,7 +413,7 @@ void LLSocialCheckinPanel::onSend() // Optionally add the region map view bool add_map_view = getChild<LLUICtrl>("add_place_view_cb")->getValue().asBoolean(); - std::string map_url = (add_map_view ? get_map_url() : ""); + std::string map_url = (add_map_view ? get_map_url() : DEFAULT_CHECKIN_ICON_URL); // Get the caption std::string caption = getChild<LLUICtrl>("place_caption")->getValue().asString(); |