summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersocial.cpp
diff options
context:
space:
mode:
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();
+}