summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersocial.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-06-22 11:53:58 -0700
committerMerov Linden <merov@lindenlab.com>2013-06-22 11:53:58 -0700
commitb403f0f849150d781c700539eff6ed1039673f25 (patch)
tree5a73abdfd0bfbd8d0b9e132d68f58c2e7228befd /indra/newview/llfloatersocial.cpp
parent9debe1787f966efd6c25ffc43a3a77553aca107a (diff)
parentfc33dadc13c27aee58e4b3e488a9b9078af03d09 (diff)
Pull merge from lindenlab/viewer-fbc
Diffstat (limited to 'indra/newview/llfloatersocial.cpp')
-rw-r--r--indra/newview/llfloatersocial.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index 4a3efe4a2d..f6fc55927e 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -29,6 +29,38 @@
#include "llfloatersocial.h"
+#include "llagentui.h"
+#include "llfloaterreg.h"
+#include "llslurl.h"
+
+static LLRegisterPanelClassWrapper<LLSocialPhotoPanel> panel_class("llsocialphotopanel");
+
+LLSocialPhotoPanel::LLSocialPhotoPanel()
+{
+ mCommitCallbackRegistrar.add("PostToFacebook.Send", boost::bind(&LLSocialPhotoPanel::onSend, this));
+}
+
+void LLSocialPhotoPanel::onSend()
+{
+ std::string caption = getChild<LLUICtrl>("caption")->getValue().asString();
+ bool add_location = getChild<LLUICtrl>("add_location_cb")->getValue().asBoolean();
+
+ if (add_location)
+ {
+ LLSLURL slurl;
+ LLAgentUI::buildSLURL(slurl);
+ if (caption.empty())
+ caption = slurl.getSLURLString();
+ 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();
+}
+
+
+
LLFloaterSocial::LLFloaterSocial(const LLSD& key) : LLFloater(key)
{
mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterSocial::onCancel, this));
@@ -38,3 +70,8 @@ void LLFloaterSocial::onCancel()
{
closeFloater();
}
+
+BOOL LLFloaterSocial::postBuild()
+{
+ return LLFloater::postBuild();
+}