summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersnapshot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatersnapshot.cpp')
-rwxr-xr-xindra/newview/llfloatersnapshot.cpp31
1 files changed, 13 insertions, 18 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 294596dd97..960d3f35dd 100755
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -47,7 +47,6 @@
#include "lltoolfocus.h"
#include "lltoolmgr.h"
#include "llwebprofile.h"
-#include "llwebsharing.h"
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
@@ -364,10 +363,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
ESnapshotFormat shot_format = (ESnapshotFormat)gSavedSettings.getS32("SnapshotFormat");
LLViewerWindow::ESnapshotType layer_type = getLayerType(floater);
-#if 0
- floater->getChildView("share_to_web")->setVisible( gSavedSettings.getBOOL("SnapshotSharingEnabled"));
-#endif
-
floater->getChild<LLComboBox>("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat"));
enableAspectRatioCheckbox(floater, !floater->impl.mAspectRatioCheckOff);
setAspectRatioCheckboxValue(floater, gSavedSettings.getBOOL("KeepAspectForSnapshot"));
@@ -1054,12 +1049,6 @@ LLFloaterSnapshot::~LLFloaterSnapshot()
BOOL LLFloaterSnapshot::postBuild()
{
- // Kick start Web Sharing, to fetch its config data if it needs to.
- if (gSavedSettings.getBOOL("SnapshotSharingEnabled"))
- {
- LLWebSharing::instance().init();
- }
-
mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn");
childSetAction("new_snapshot_btn", Impl::onClickNewSnapshot, this);
mRefreshLabel = getChild<LLUICtrl>("refresh_lbl");
@@ -1331,7 +1320,7 @@ S32 LLFloaterSnapshot::notify(const LLSD& info)
//static
void LLFloaterSnapshot::update()
{
- LLFloaterSnapshot* inst = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ LLFloaterSnapshot* inst = findInstance();
LLFloaterFacebook* floater_facebook = LLFloaterReg::findTypedInstance<LLFloaterFacebook>("facebook");
LLFloaterFlickr* floater_flickr = LLFloaterReg::findTypedInstance<LLFloaterFlickr>("flickr");
LLFloaterTwitter* floater_twitter = LLFloaterReg::findTypedInstance<LLFloaterTwitter>("twitter");
@@ -1361,12 +1350,18 @@ LLFloaterSnapshot* LLFloaterSnapshot::getInstance()
}
// static
+LLFloaterSnapshot* LLFloaterSnapshot::findInstance()
+{
+ return LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+}
+
+// static
void LLFloaterSnapshot::saveTexture()
{
LL_DEBUGS() << "saveTexture" << LL_ENDL;
// FIXME: duplicated code
- LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ LLFloaterSnapshot* instance = findInstance();
if (!instance)
{
llassert(instance != NULL);
@@ -1387,7 +1382,7 @@ BOOL LLFloaterSnapshot::saveLocal()
{
LL_DEBUGS() << "saveLocal" << LL_ENDL;
// FIXME: duplicated code
- LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ LLFloaterSnapshot* instance = findInstance();
if (!instance)
{
llassert(instance != NULL);
@@ -1406,7 +1401,7 @@ BOOL LLFloaterSnapshot::saveLocal()
// static
void LLFloaterSnapshot::postSave()
{
- LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ LLFloaterSnapshot* instance = findInstance();
if (!instance)
{
llassert(instance != NULL);
@@ -1432,7 +1427,7 @@ LLPointer<LLImageFormatted> LLFloaterSnapshot::getImageData()
{
// FIXME: May not work for textures.
- LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ LLFloaterSnapshot* instance = findInstance();
if (!instance)
{
llassert(instance != NULL);
@@ -1459,7 +1454,7 @@ LLPointer<LLImageFormatted> LLFloaterSnapshot::getImageData()
// static
const LLVector3d& LLFloaterSnapshot::getPosTakenGlobal()
{
- LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ LLFloaterSnapshot* instance = findInstance();
if (!instance)
{
llassert(instance != NULL);
@@ -1479,7 +1474,7 @@ const LLVector3d& LLFloaterSnapshot::getPosTakenGlobal()
// static
void LLFloaterSnapshot::setAgentEmail(const std::string& email)
{
- LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ LLFloaterSnapshot* instance = findInstance();
if (instance)
{
LLSideTrayPanelContainer* panel_container = instance->getChild<LLSideTrayPanelContainer>("panel_container");