diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 37 | ||||
-rw-r--r-- | indra/newview/llfloatersocial.h | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_social.xml | 3 |
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" |