Improvements!

Fix CMakeLists being out of order.
Add setting SnapshotFeedAddLocation to keep track of user's preference whether or not to include location in uploads to profile feed.
Clean up LLFloaterFeed to take only what it needs, also gave it a boost~
Remove saveFeed() from LLFloaterSnapshot, removing the dependency on LLWebProfile.
Compile fixes for LLFloaterSnapshot.
Prettied up the upload to feed floater.

TODO: Does Location even work? I can't get it to appear, never seems to get used right in v-d either.
This commit is contained in:
Lirusaito
2012-12-28 00:14:54 -05:00
parent be8f16a8e6
commit 2be305d39e
6 changed files with 74 additions and 164 deletions

View File

@@ -83,7 +83,6 @@
#include "llnotificationsutil.h"
#include "llvfile.h"
#include "llvfs.h"
#include "llwebprofile.h"
#include "hippogridmanager.h"
@@ -177,7 +176,6 @@ public:
void showFreezeFrameSnapshot(bool show);
void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f);
LLFloaterFeed* getCaptionAndSaveFeed();
void saveFeed(std::string const& caption, bool add_location);
LLFloaterPostcard* savePostcard();
void saveTexture();
void saveTextureDone(bool success, LLPointer<LLImageFormatted> const& formatted_image);
@@ -969,6 +967,9 @@ void LLSnapshotLivePreview::generateFormattedAndFullscreenPreview(bool delayed)
case SNAPSHOT_LOCAL:
format = mSnapshotFormat;
break;
default:
format = mSnapshotFormat;
break;
}
if (mFormattedImage &&
@@ -1211,20 +1212,13 @@ LLFloaterFeed* LLSnapshotLivePreview::getCaptionAndSaveFeed()
return NULL;
}
LLFloaterFeed* floater = LLFloaterFeed::showFromSnapshot(png, mFullScreenPreviewTexture, image_scale, mPosTakenGlobal);
LLFloaterFeed* floater = LLFloaterFeed::showFromSnapshot(png, mFullScreenPreviewTexture, image_scale);
//updateSnapshot(FALSE, FALSE);
return floater;
}
void LLSnapshotLivePreview::saveFeed(std::string const& caption, bool add_location)
{
DoutEntering(dc::notice, "LLSnapshotLivePreview::saveFeed()");
LLWebProfile::setImageUploadResultCallback(boost::bind(&LLFloaterSnapshot::saveFeedDone, _1, mFormattedImage));
LLWebProfile::uploadImage(mFormattedImage, caption, add_location);
}
LLFloaterPostcard* LLSnapshotLivePreview::savePostcard()
{
if(mFullScreenPreviewTexture.isNull())
@@ -2694,6 +2688,9 @@ char const* LLSnapshotLivePreview::aspectComboName() const
case SNAPSHOT_LOCAL:
result = "local_aspect_combo";
break;
default:
result= "";
break;
}
return result;
}