diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llfloatersocial.h | 7 | ||||
-rw-r--r-- | 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 b14098eb77..8e481f9e57 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -38,6 +38,7 @@ #include "llviewerregion.h" #include "llviewercontrol.h" +static LLRegisterPanelClassWrapper<LLSocialStatusPanel> t_panel_status("llsocialstatuspanel"); static LLRegisterPanelClassWrapper<LLSocialPhotoPanel> t_panel_photo("llsocialphotopanel"); static LLRegisterPanelClassWrapper<LLSocialCheckinPanel> t_panel_checkin("llsocialcheckinpanel"); @@ -54,6 +55,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<LLUICtrl>("message")->getValue().asString(); + LLFacebookConnect::instance().updateStatus(message); + + LLFloater* floater = getParentByType<LLFloater>(); + 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 2f3ff3ccdc..b43b1a0888 100644 --- a/indra/newview/llfloatersocial.h +++ b/indra/newview/llfloatersocial.h @@ -30,6 +30,13 @@ #include "llfloater.h" #include "llviewertexture.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"> <panel + class="llsocialstatuspanel" background_opaque="true" background_visible="true" bg_alpha_color="DkGray" @@ -48,7 +49,7 @@ left="9" length="1" max_length="700" - name="caption" + name="message" type="string" word_wrap="true"> </text_editor> @@ -60,7 +61,7 @@ top_pad="18" width="100"> <button.commit_callback - function="PostToFacebook.Send" /> + function="SocialSharing.SendStatus" /> </button> <button follows="left|top" |