From 68fa34965daa5bd65aea5cb1f4dc4554e7d9f70f Mon Sep 17 00:00:00 2001 From: Cho Date: Tue, 25 Jun 2013 00:26:10 +0100 Subject: made status update actually post to Facebook, for ACME-569 and ACME-573 --- indra/newview/llfloatersocial.cpp | 18 ++++++++++++++++++ indra/newview/llfloatersocial.h | 7 +++++++ indra/newview/skins/default/xui/en/floater_social.xml | 5 +++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 361d54f696..dd4f4f03d9 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -37,6 +37,7 @@ #include "llviewerregion.h" #include "llviewercontrol.h" +static LLRegisterPanelClassWrapper t_panel_status("llsocialstatuspanel"); static LLRegisterPanelClassWrapper t_panel_photo("llsocialphotopanel"); static LLRegisterPanelClassWrapper t_panel_checkin("llsocialcheckinpanel"); @@ -53,6 +54,23 @@ std::string get_map_url() return map_url; } +LLSocialStatusPanel::LLSocialStatusPanel() +{ + mCommitCallbackRegistrar.add("SocialSharing.SendStatus", boost::bind(&LLSocialStatusPanel::onSend, this)); +} + +void LLSocialStatusPanel::onSend() +{ + std::string message = getChild("message")->getValue().asString(); + LLFacebookConnect::instance().updateStatus(message); + + LLFloater* floater = getParentByType(); + if (floater) + { + floater->closeFloater(); + } +} + LLSocialPhotoPanel::LLSocialPhotoPanel() { mCommitCallbackRegistrar.add("PostToFacebook.Send", boost::bind(&LLSocialPhotoPanel::onSend, this)); diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloatersocial.h index aee7f2f060..561aefa111 100644 --- a/indra/newview/llfloatersocial.h +++ b/indra/newview/llfloatersocial.h @@ -29,6 +29,13 @@ #include "llfloater.h" +class LLSocialStatusPanel : public LLPanel +{ +public: + LLSocialStatusPanel(); + void onSend(); +}; + class LLSocialPhotoPanel : public LLPanel { public: diff --git a/indra/newview/skins/default/xui/en/floater_social.xml b/indra/newview/skins/default/xui/en/floater_social.xml index fc26ba5842..15e105f67d 100644 --- a/indra/newview/skins/default/xui/en/floater_social.xml +++ b/indra/newview/skins/default/xui/en/floater_social.xml @@ -23,6 +23,7 @@ height="430" halign="center"> @@ -60,7 +61,7 @@ top_pad="18" width="100"> + function="SocialSharing.SendStatus" />