summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloatersocial.cpp18
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();