From ba8bced90b0a3e5126e3274ac4d8a9f611a9ded8 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Fri, 21 Jun 2013 12:45:20 -0700 Subject: ACME-588 Make 'Post' button post to facebook: Intial commit is just adding callback for clicking the post button --- indra/newview/llfloatersocial.cpp | 37 ++++++++++++++++++++++ indra/newview/llfloatersocial.h | 7 ++++ .../skins/default/xui/en/floater_social.xml | 3 +- 3 files changed, 46 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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 panel_class("llsocialphotopanel"); + +LLSocialPhotoPanel::LLSocialPhotoPanel() +{ + mCommitCallbackRegistrar.add("PostToFacebook.Send", boost::bind(&LLSocialPhotoPanel::onSend, this)); +} + +void LLSocialPhotoPanel::onSend() +{ + std::string caption = getChild("caption")->getValue().asString(); + bool add_location = getChild("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"/> + name="social_photo_tab"> Date: Sat, 22 Jun 2013 01:23:14 +0100 Subject: added text and buttons for update status tab for ACME-568 --- .../skins/default/xui/en/floater_social.xml | 46 +++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_social.xml b/indra/newview/skins/default/xui/en/floater_social.xml index 8141961273..378841b1a6 100644 --- a/indra/newview/skins/default/xui/en/floater_social.xml +++ b/indra/newview/skins/default/xui/en/floater_social.xml @@ -29,7 +29,51 @@ bg_opaque_color="DkGray" label="STATUS" help_topic="social_status_tab" - name="status_panel"/> + name="status_panel"> + + What's on your mind? + + + + + + Date: Sat, 22 Jun 2013 01:32:15 +0100 Subject: tweaked numbers to look more like mockup for ACME-568 --- indra/newview/skins/default/xui/en/floater_social.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_social.xml b/indra/newview/skins/default/xui/en/floater_social.xml index 378841b1a6..c49749840b 100644 --- a/indra/newview/skins/default/xui/en/floater_social.xml +++ b/indra/newview/skins/default/xui/en/floater_social.xml @@ -37,14 +37,14 @@ height="16" left="9" name="caption_label" - top_pad="12" + top_pad="18" type="string"> What's on your mind? -- cgit v1.2.3