From 3a02cfbe3796dcf386be8e959f603a80dd8e03fe Mon Sep 17 00:00:00 2001 From: Cinders Date: Tue, 2 Apr 2013 14:33:03 -0600 Subject: [PATCH] Fix FIRE-9613 & FIRE-9621 --- indra/newview/fsgridhandler.cpp | 12 ++++- indra/newview/fsgridhandler.h | 1 + indra/newview/llfloaterimagepreview.cpp | 13 +++-- indra/newview/llfloatersnapshot.cpp | 49 ++++++++++++++----- indra/newview/llviewermenufile.cpp | 7 +-- .../default/xui/en/floater_image_preview.xml | 11 +++-- .../xui/en/panel_snapshot_inventory.xml | 2 +- 7 files changed, 69 insertions(+), 26 deletions(-) diff --git a/indra/newview/fsgridhandler.cpp b/indra/newview/fsgridhandler.cpp index 29d5c1b336..008ad59ca6 100644 --- a/indra/newview/fsgridhandler.cpp +++ b/indra/newview/fsgridhandler.cpp @@ -1363,27 +1363,35 @@ void LLGridManager::updateIsInProductionGrid() } // +// 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); } -// Aurora Sim +// For Aurora Sim bool LLGridManager::isInAuroraSim() { return (EGridPlatform == GP_AURORA); } -// Aurora Sim void LLGridManager::saveGridList() { diff --git a/indra/newview/fsgridhandler.h b/indra/newview/fsgridhandler.h index 0d6a990417..6fb5a88289 100644 --- a/indra/newview/fsgridhandler.h +++ b/indra/newview/fsgridhandler.h @@ -246,6 +246,7 @@ public: grid_list_changed_signal_t mGridListChangedSignal; // // + bool isInSecondLife(); bool isInSLMain(); bool isInSLBeta(); bool isInOpenSim(); diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 546f810458..1f181e0722 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -61,6 +61,8 @@ #include "llviewercontrol.h" #include "lltrans.h" #include "llimagedimensionsinfo.h" +#include "llviewerregion.h" // 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) + +// Temporary texture uploads + if (LLGlobalEconomy::Singleton::getInstance()->getPriceUpload() == 0 + || gAgent.getRegion()->getCentralBakeVersion() > 0) { - childHide("temp_check"); + gSavedSettings.setBOOL("TemporaryUpload", FALSE); + getChild("temp_check")->setVisible(FALSE); } +// } else { diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 3b787448b5..14547f5f4d 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -83,6 +83,13 @@ #include "llwebprofile.h" #include "llwindow.h" +// FIRE-9621 - Hide Profile panel on Snapshots on non-sl grids +#ifdef OPENSIM +#include "llviewernetwork.h" // isOpenSim() +#endif // OPENSIM +#include "llviewerregion.h" // getCentralBakeVersion() for temporary texture uploads +// + ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- @@ -1381,7 +1388,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) // 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. // floater->getChildView("layer_types")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL); @@ -1661,15 +1667,6 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL } } -// 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); -// } -// - // 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")//) +// FIRE-9621 Hide Profile panel on Snapshots on non-sl grids +#ifdef OPENSIM + && (LLGridManager::getInstance()->isInSecondLife()) +#endif // OPENSIM + ) +// { 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. // 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(); } // FIRE-5811 Save Last Snapshot Tab + // 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 + // 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); +// FIRE-9613 - Hide temp uploads on SSB enabled regions + if (gAgent.getRegion()->getCentralBakeVersion() == 0) + getChild("inventory_temp_upload")->setVisible(TRUE); +// + // FIRE-5811 Save Last Snapshot Tab // // Initialize default tab. diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 55ccc8ce95..c3cab346a7 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -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) +// Temporary Texture Uploads + if (gSavedSettings.getBOOL("TemporaryUpload")) { name = "[temp] " + name; + gSavedSettings.setBOOL("TemporaryUpload", FALSE); } - gSavedSettings.setBOOL("TemporaryUpload", FALSE); +// } else if( LLAssetType::AT_ANIMATION == asset_type) diff --git a/indra/newview/skins/default/xui/en/floater_image_preview.xml b/indra/newview/skins/default/xui/en/floater_image_preview.xml index 6448a1fc72..960aa7c676 100644 --- a/indra/newview/skins/default/xui/en/floater_image_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_image_preview.xml @@ -131,9 +131,14 @@ Try saving image as 24 bit Targa (.tga). top_pad="162" width="280" />