summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-06-22 11:53:58 -0700
committerMerov Linden <merov@lindenlab.com>2013-06-22 11:53:58 -0700
commitb403f0f849150d781c700539eff6ed1039673f25 (patch)
tree5a73abdfd0bfbd8d0b9e132d68f58c2e7228befd /indra/newview
parent9debe1787f966efd6c25ffc43a3a77553aca107a (diff)
parentfc33dadc13c27aee58e4b3e488a9b9078af03d09 (diff)
Pull merge from lindenlab/viewer-fbc
Diffstat (limited to 'indra/newview')
-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.xml49
3 files changed, 91 insertions, 2 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index 4a3efe4a2d..f6fc55927e 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -29,6 +29,38 @@
#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)
{
mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterSocial::onCancel, this));
@@ -38,3 +70,8 @@ void LLFloaterSocial::onCancel()
{
closeFloater();
}
+
+BOOL LLFloaterSocial::postBuild()
+{
+ return LLFloater::postBuild();
+}
diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloatersocial.h
index f65c0dcf5d..a8c83fb364 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();
void onCancel();
};
diff --git a/indra/newview/skins/default/xui/en/floater_social.xml b/indra/newview/skins/default/xui/en/floater_social.xml
index 2909da295d..d57bc157cd 100644
--- a/indra/newview/skins/default/xui/en/floater_social.xml
+++ b/indra/newview/skins/default/xui/en/floater_social.xml
@@ -29,8 +29,53 @@
bg_opaque_color="DkGray"
label="STATUS"
help_topic="social_status_tab"
- name="status_panel"/>
+ name="status_panel">
+ <text
+ length="1"
+ follows="top|left|right"
+ font="SansSerif"
+ height="16"
+ left="9"
+ name="caption_label"
+ top_pad="18"
+ type="string">
+ What's on your mind?
+ </text>
+ <text_editor
+ follows="left|top"
+ height="80"
+ width="280"
+ left="9"
+ length="1"
+ max_length="700"
+ name="caption"
+ type="string"
+ word_wrap="true">
+ </text_editor>
+ <button
+ follows="left|top"
+ height="23"
+ label="Post"
+ name="post_btn"
+ top_pad="18"
+ width="100">
+ <button.commit_callback
+ function="PostToFacebook.Send" />
+ </button>
+ <button
+ follows="left|top"
+ height="23"
+ label="Cancel"
+ name="cancel_btn"
+ left_pad="15"
+ top_delta="0"
+ width="100">
+ <button.commit_callback
+ function="PostToFacebook.Cancel" />
+ </button>
+ </panel>
<panel
+ class="llsocialphotopanel"
follows="all"
height="430"
background_visible="true"
@@ -38,7 +83,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"