summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersocial.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-06-21 12:45:20 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2013-06-21 12:45:20 -0700
commitba8bced90b0a3e5126e3274ac4d8a9f611a9ded8 (patch)
treed6407ad579d510e8f5f1159dd4628361eb986e1e /indra/newview/llfloatersocial.cpp
parent824a5c65f57ae0fa2cce99ade156341fcf8daf5a (diff)
ACME-588 Make 'Post' button post to facebook: Intial commit is just adding callback for clicking the post button
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 fe9cfa592b..0f3a82878b 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -29,7 +29,44 @@
#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)
{
}
+
+BOOL LLFloaterSocial::postBuild()
+{
+ return LLFloater::postBuild();
+}