From 1643c4dacadf6df1cf7d000987a2c570eb4325ac Mon Sep 17 00:00:00 2001
From: Gilbert Gonzales <gilbert@lindenlab.com>
Date: Mon, 17 Jun 2013 18:30:36 -0700
Subject: [PATCH] CHUI 560: When Me->Post to Facebook... is selected the
 Facebook floater opens.

---
 indra/newview/CMakeLists.txt                  |  4 ++--
 ...{llsocialpanel.cpp => llfloatersocial.cpp} |  9 ++++++---
 .../{llsocialpanel.h => llfloatersocial.h}    | 19 ++++++++++++++-----
 indra/newview/llviewerfloaterreg.cpp          |  2 ++
 .../skins/default/xui/en/menu_viewer.xml      |  7 +++++++
 5 files changed, 31 insertions(+), 10 deletions(-)
 rename indra/newview/{llsocialpanel.cpp => llfloatersocial.cpp} (85%)
 rename indra/newview/{llsocialpanel.h => llfloatersocial.h} (77%)

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 4ab1f227bee..b780b55e1ee 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -270,6 +270,7 @@ set(viewer_SOURCE_FILES
     llfloatersettingsdebug.cpp
     llfloatersidepanelcontainer.cpp
     llfloatersnapshot.cpp
+    llfloatersocial.cpp
     llfloatersounddevices.cpp
     llfloaterspellchecksettings.cpp
     llfloatertelehub.cpp
@@ -509,7 +510,6 @@ set(viewer_SOURCE_FILES
     llsky.cpp
     llslurl.cpp
     llsociallist.cpp
-    llsocialpanel.cpp
     llspatialpartition.cpp
     llspeakers.cpp
     llspeakingindicatormanager.cpp
@@ -858,6 +858,7 @@ set(viewer_HEADER_FILES
     llfloatersettingsdebug.h
     llfloatersidepanelcontainer.h
     llfloatersnapshot.h
+    llfloatersocial.h
     llfloatersounddevices.h
     llfloaterspellchecksettings.h
     llfloatertelehub.h
@@ -1085,7 +1086,6 @@ set(viewer_HEADER_FILES
     llsky.h
     llslurl.h
     llsociallist.h
-    llsocialpanel.h
     llspatialpartition.h
     llspeakers.h
     llspeakingindicatormanager.h
diff --git a/indra/newview/llsocialpanel.cpp b/indra/newview/llfloatersocial.cpp
similarity index 85%
rename from indra/newview/llsocialpanel.cpp
rename to indra/newview/llfloatersocial.cpp
index 6373c1c5600..fe9cfa592be 100644
--- a/indra/newview/llsocialpanel.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -1,6 +1,6 @@
 /** 
-* @file llsocialpanel.cpp
-* @brief Implementation of llsocialpanel
+* @file llfloatersocial.cpp
+* @brief Implementation of llfloatersocial
 * @author Gilbert@lindenlab.com
 *
 * $LicenseInfo:firstyear=2013&license=viewerlgpl$
@@ -27,6 +27,9 @@
 
 #include "llviewerprecompiledheaders.h"
 
-#include "llsocialpanel.h"
+#include "llfloatersocial.h"
 
+LLFloaterSocial::LLFloaterSocial(const LLSD& key) : LLFloater(key)
+{
 
+}
diff --git a/indra/newview/llsocialpanel.h b/indra/newview/llfloatersocial.h
similarity index 77%
rename from indra/newview/llsocialpanel.h
rename to indra/newview/llfloatersocial.h
index 873d93951af..b120fe58040 100644
--- a/indra/newview/llsocialpanel.h
+++ b/indra/newview/llfloatersocial.h
@@ -1,6 +1,6 @@
 /** 
-* @file   llsocialpanel.h
-* @brief  Header file for llsocialpanel
+* @file   llfloatersocial.h
+* @brief  Header file for llfloatersocial
 * @author Gilbert@lindenlab.com
 *
 * $LicenseInfo:firstyear=2013&license=viewerlgpl$
@@ -24,8 +24,17 @@
 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 * $/LicenseInfo$
 */
-#ifndef LL_LLSOCIALPANEL_H
-#define LL_LLSOCIALPANEL_H
+#ifndef LL_LLFLOATERSOCIAL_H
+#define LL_LLFLOATERSOCIAL_H
 
-#endif // LL_LLSOCIALPANEL_H
+#include "llfloater.h"
+
+
+class LLFloaterSocial : public LLFloater
+{
+public:
+	LLFloaterSocial(const LLSD& key);
+};
+
+#endif // LL_LLFLOATERSOCIAL_H
 
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index c6b28b9e5e9..69bda2c11c1 100755
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -103,6 +103,7 @@
 #include "llfloatersettingsdebug.h"
 #include "llfloatersidepanelcontainer.h"
 #include "llfloatersnapshot.h"
+#include "llfloatersocial.h"
 #include "llfloatersounddevices.h"
 #include "llfloaterspellchecksettings.h"
 #include "llfloatertelehub.h"
@@ -303,6 +304,7 @@ void LLViewerFloaterReg::registerFloaters()
 	LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater);
 	LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>);
 	LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundDevices>);
+	LLFloaterReg::add("social", "floater_social.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSocial>);
 	LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
 	LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>);
 	LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index ebf21ffd1ce..dea47f350f1 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -35,6 +35,13 @@
         <menu_item_call.on_click
           function="Facebook.UpdateStatus" />
       </menu_item_call>
+      <menu_item_call
+        label="Post to Facebook..."
+        name="PostToFacebook">
+        <menu_item_call.on_click
+          function="Floater.Toggle"
+          parameter="social"/>
+      </menu_item_call>      
       <menu_item_separator/>
       <menu_item_call
        label="Appearance..."
-- 
GitLab