summaryrefslogtreecommitdiff
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
parent824a5c65f57ae0fa2cce99ade156341fcf8daf5a (diff)
ACME-588 Make 'Post' button post to facebook: Intial commit is just adding callback for clicking the post button
-rw-r--r--indra/newview/llfloatersocial.cpp37
-rw-r--r--indra/newview/llfloatersocial.h7
-rw-r--r--indra/newview/skins/default/xui/en/floater_social.xml3
3 files changed, 46 insertions, 1 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();
+}
diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloatersocial.h
index b120fe5804..e946ce7559 100644
--- a/indra/newview/llfloatersocial.h
+++ b/indra/newview/llfloatersocial.h
@@ -29,11 +29,18 @@
#include "llfloater.h"
+class LLSocialPhotoPanel : public LLPanel
+{
+ public:
+ LLSocialPhotoPanel();
+ void onSend();
+};
class LLFloaterSocial : public LLFloater
{
public:
LLFloaterSocial(const LLSD& key);
+ BOOL postBuild();
};
#endif // LL_LLFLOATERSOCIAL_H
diff --git a/indra/newview/skins/default/xui/en/floater_social.xml b/indra/newview/skins/default/xui/en/floater_social.xml
index d446e0c0f6..8141961273 100644
--- a/indra/newview/skins/default/xui/en/floater_social.xml
+++ b/indra/newview/skins/default/xui/en/floater_social.xml
@@ -31,6 +31,7 @@
help_topic="social_status_tab"
name="status_panel"/>
<panel
+ class="llsocialphotopanel"
follows="all"
height="430"
background_visible="true"
@@ -38,7 +39,7 @@
bg_opaque_color="DkGray"
label="PHOTO"
help_topic="social_photo_tab"
- name="photo_panel">
+ name="social_photo_tab">
<layout_stack
border_size="0"
height="422"