Fix FIRE-9613 & FIRE-9621

Cinders 2013-04-02 14:33:03 -06:00
parent fae2b5b05e
commit 3a02cfbe37
7 changed files with 69 additions and 26 deletions

View File

@ -1363,27 +1363,35 @@ void LLGridManager::updateIsInProductionGrid()
}
// </AW opensim>
// For any Second Life grid
bool LLGridManager::isInSecondLife()
{
return (EGridPlatform == GP_SLMAIN || GP_SLBETA);
}
// For Agni
bool LLGridManager::isInSLMain()
{
return (EGridPlatform == GP_SLMAIN);
}
// For Aditi
bool LLGridManager::isInSLBeta()
{
return (EGridPlatform == GP_SLBETA);
}
// For OpenSim
bool LLGridManager::isInOpenSim()
{
return (EGridPlatform == GP_OPENSIM || EGridPlatform == GP_AURORA);
}
// <FS:CR> Aurora Sim
// For Aurora Sim
bool LLGridManager::isInAuroraSim()
{
return (EGridPlatform == GP_AURORA);
}
// </FS:CR> Aurora Sim
void LLGridManager::saveGridList()
{

View File

@ -246,6 +246,7 @@ public:
grid_list_changed_signal_t mGridListChangedSignal;
// <FS:AW grid management>
// <AW opensim>
bool isInSecondLife();
bool isInSLMain();
bool isInSLBeta();
bool isInOpenSim();

View File

@ -61,6 +61,8 @@
#include "llviewercontrol.h"
#include "lltrans.h"
#include "llimagedimensionsinfo.h"
#include "llviewerregion.h" // <FS:CR> getCentralBakeVersion()
#include "llcheckboxctrl.h"
const S32 PREVIEW_BORDER_WIDTH = 2;
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
@ -119,12 +121,15 @@ BOOL LLFloaterImagePreview::postBuild()
if (mRawImagep->getWidth() * mRawImagep->getHeight () <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)
getChildView("lossless_check")->setEnabled(TRUE);
gSavedSettings.setBOOL("TemporaryUpload", FALSE);
if (LLGlobalEconomy::Singleton::getInstance()->getPriceUpload() == 0)
// <FS:CR> Temporary texture uploads
if (LLGlobalEconomy::Singleton::getInstance()->getPriceUpload() == 0
|| gAgent.getRegion()->getCentralBakeVersion() > 0)
{
childHide("temp_check");
gSavedSettings.setBOOL("TemporaryUpload", FALSE);
getChild<LLCheckBoxCtrl>("temp_check")->setVisible(FALSE);
}
// </FS:CR>
}
else
{

View File

@ -83,6 +83,13 @@
#include "llwebprofile.h"
#include "llwindow.h"
// <FS:CR> FIRE-9621 - Hide Profile panel on Snapshots on non-sl grids
#ifdef OPENSIM
#include "llviewernetwork.h" // isOpenSim()
#endif // OPENSIM
#include "llviewerregion.h" // <FS:CR> getCentralBakeVersion() for temporary texture uploads
// </FS:CR>
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
@ -1381,7 +1388,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
// <FS:Zi> Save all settings
// enableAspectRatioCheckbox(floater, !floater->impl.mAspectRatioCheckOff);
// setAspectRatioCheckboxValue(floater, gSavedSettings.getBOOL("KeepAspectForSnapshot"));
// setTempUploadCheckboxValue(floater, gSavedSettings.getBOOL("TemporaryUpload")); //FS:LO Fire-6268 [Regression] Temp upload for snapshots missing after FUI merge.
// </FS:Zi>
floater->getChildView("layer_types")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL);
@ -1661,15 +1667,6 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL
}
}
// <FS:Zi> Save all settings
//FS:LO Fire-6268 [Regression] Temp upload for snapshots missing after FUI merge.
// static
// void LLFloaterSnapshot::Impl::applyTempUploadCheck(LLFloaterSnapshot* view, BOOL checked)
// {
// gSavedSettings.setBOOL("TemporaryUpload", checked);
// }
// </FS:Zi>
// static
void LLFloaterSnapshot::Impl::onCommitFreezeFrame(LLUICtrl* ctrl, void* data)
{
@ -2112,7 +2109,13 @@ LLFloaterSnapshot::~LLFloaterSnapshot()
BOOL LLFloaterSnapshot::postBuild()
{
// Kick start Web Sharing, to fetch its config data if it needs to.
if (gSavedSettings.getBOOL("SnapshotSharingEnabled"))
if (gSavedSettings.getBOOL("SnapshotSharingEnabled")//)
// <FS:CR> FIRE-9621 Hide Profile panel on Snapshots on non-sl grids
#ifdef OPENSIM
&& (LLGridManager::getInstance()->isInSecondLife())
#endif // OPENSIM
)
// </FS:CR>
{
LLWebSharing::instance().init();
}
@ -2160,8 +2163,6 @@ BOOL LLFloaterSnapshot::postBuild()
parent_view->addChild(previewp);
parent_view->addChild(gSnapshotFloaterView);
// gSavedSettings.setBOOL("TemporaryUpload", FALSE); //FS:LO Fire-6268 [Regression] Temp upload for snapshots missing after FUI merge. // <FS:Zi> Save all settings
//move snapshot floater to special purpose snapshotfloaterview
gFloaterView->removeChild(this);
gSnapshotFloaterView->addChild(this);
@ -2281,6 +2282,23 @@ void LLFloaterSnapshot::onOpen(const LLSD& key)
tabcontainer->selectFirstTab();
}
// </FS:HG> FIRE-5811 Save Last Snapshot Tab
// <FS:CR> FIRE-9621
#ifdef OPENSIM
if (LLGridManager::getInstance()->isInOpenSim())
{
if (tabcontainer)
{
llinfos << "Found tab container" << llendl;
LLPanel* panel_snapshot_profile = tabcontainer->getPanelByName("panel_snapshot_profile");
if (panel_snapshot_profile)
{
llinfos << "Found panel tab" << llendl;
tabcontainer->removeTabPanel(panel_snapshot_profile);
}
}
}
#endif // OPENSIM
// </FS:CR>
LLSnapshotLivePreview* preview = LLFloaterSnapshot::Impl::getPreviewView(this);
if(preview)
@ -2292,6 +2310,11 @@ void LLFloaterSnapshot::onOpen(const LLSD& key)
gSnapshotFloaterView->setEnabled(TRUE);
gSnapshotFloaterView->setVisible(TRUE);
gSnapshotFloaterView->adjustToFitScreen(this, FALSE);
// <FS:CR> FIRE-9613 - Hide temp uploads on SSB enabled regions
if (gAgent.getRegion()->getCentralBakeVersion() == 0)
getChild<LLCheckBoxCtrl>("inventory_temp_upload")->setVisible(TRUE);
// </FS:CR>
// <FS:HG> FIRE-5811 Save Last Snapshot Tab
// // Initialize default tab.

View File

@ -1383,12 +1383,13 @@ void upload_new_resource(
if( LLAssetType::AT_TEXTURE == asset_type )
{
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_TEXTURE_COUNT );
temp_upload = gSavedSettings.getBOOL("TemporaryUpload");
if (temp_upload)
// <FS:CR> Temporary Texture Uploads
if (gSavedSettings.getBOOL("TemporaryUpload"))
{
name = "[temp] " + name;
gSavedSettings.setBOOL("TemporaryUpload", FALSE);
}
gSavedSettings.setBOOL("TemporaryUpload", FALSE);
// </FS:CR>
}
else
if( LLAssetType::AT_ANIMATION == asset_type)

View File

@ -131,9 +131,14 @@ Try saving image as 24 bit Targa (.tga).
top_pad="162"
width="280" />
<check_box
control_name="TemporaryUpload" enabled="true"
follows="bottom|left" height="16" initial_value="false"
left_delta="155" name="temp_check" width="280" label="Temporary (Free)"
control_name="TemporaryUpload"
follows="bottom|left"
height="16"
initial_value="false"
left_delta="155"
name="temp_check"
width="280"
label="Temporary (Free)"
tooltip="Sets the asset to be temporary, meaning its free, but in return, only good for a short time before it ceases to exist." />
<button
follows="bottom|right"

View File

@ -132,7 +132,7 @@
layout="topleft"
left="10"
name="inventory_temp_upload"
visible="true" />
visible="false" />
<!-- //FS:LO Fire-6268 [Regression] Temp upload for snapshots missing after FUI merge. -->
<!-- <button
follows="right|bottom"