diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index df36dfc407..7c897bc670 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -1202,5 +1202,16 @@
Value
0
+ FSRememberSnapshotPathSessions
+
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 914b2bd18d..17c315dcf7 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -2677,6 +2677,12 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
{
LLAppearanceMgr::instance().removeItemsFromAvatar(ids);
}
+ // FIRE-22851: Show texture "Save as" file picker subsequently instead all at once
+ else if (action == "save_as") // "save_as" is only available for textures as of 01/08/2018
+ {
+ LLPreviewTexture::saveMultiple(ids);
+ }
+ //
else
{
std::set::iterator set_iter;
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 08cba5c71c..07c1bcdb9b 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -383,21 +383,32 @@ BOOL LLPreviewTexture::canSaveAs() const
// virtual
void LLPreviewTexture::saveAs()
{
- // Allow to use user-defined default save format for textures
+ // FIRE-22851: Show texture "Save as" file picker subsequently instead all at once
// saveAs(LLPreviewTexture::FORMAT_TGA);
+ saveAs(uuid_vec_t());
+ //
+}
+
+// FIRE-22851: Show texture "Save as" file picker subsequently instead all at once
+void LLPreviewTexture::saveAs(uuid_vec_t remaining_ids)
+{
+ // Allow to use user-defined default save format for textures
if (!gSavedSettings.getBOOL("FSTextureDefaultSaveAsFormat"))
{
- saveAs(LLPreviewTexture::FORMAT_TGA);
+ saveAs(LLPreviewTexture::FORMAT_TGA, remaining_ids);
}
else
{
- saveAs(LLPreviewTexture::FORMAT_PNG);
+ saveAs(LLPreviewTexture::FORMAT_PNG, remaining_ids);
}
//
-
}
+//
-void LLPreviewTexture::saveAs(EFileformatType format)
+// FIRE-22851: Show texture "Save as" file picker subsequently instead all at once
+//void LLPreviewTexture::saveAs(EFileformatType format)
+void LLPreviewTexture::saveAs(EFileformatType format, uuid_vec_t remaining_ids)
+//
{
if (mLoadingFullImage)
return;
@@ -422,13 +433,13 @@ void LLPreviewTexture::saveAs(EFileformatType format)
//std::string filename = getItem() ? LLDir::getScrubbedFileName(getItem()->getName()) : LLStringUtil::null;
//(new LLFilePickerReplyThread(boost::bind(&LLPreviewTexture::saveTextureToFile, this, _1), LLFilePicker::FFSAVE_TGAPNG, filename))->getFile();
std::string filename = getItem() ? checkFileExtension(LLDir::getScrubbedFileName(getItem()->getName()), format) : LLStringUtil::null;
- (new LLFilePickerReplyThread(boost::bind(&LLPreviewTexture::saveTextureToFile, this, _1, format, callback), saveFilter, filename))->getFile();
+ (new LLFilePickerReplyThread(boost::bind(&LLPreviewTexture::saveTextureToFile, this, _1, format, callback, remaining_ids), saveFilter, filename))->getFile();
//
}
// Undo MAINT-2897 and use our own texture format selection
//void LLPreviewTexture::saveTextureToFile(const std::vector& filenames)
-void LLPreviewTexture::saveTextureToFile(const std::vector& filenames, EFileformatType format, loaded_callback_func callback)
+void LLPreviewTexture::saveTextureToFile(const std::vector& filenames, EFileformatType format, loaded_callback_func callback, uuid_vec_t remaining_ids)
//
{
const LLInventoryItem* item = getItem();
@@ -452,6 +463,9 @@ void LLPreviewTexture::saveTextureToFile(const std::vector& filenam
mImage->setLoadedCallback(callback,
//
0, TRUE, FALSE, new LLUUID(mItemUUID), &mCallbackTextureList);
+
+ // FIRE-22851: Show texture "Save as" file picker subsequently instead all at once
+ saveMultiple(remaining_ids);
}
// virtual
@@ -1137,3 +1151,24 @@ void LLPreviewTexture::onButtonRefresh()
destroy_texture(mImageID);
}
//
+
+// FIRE-22851: Show texture "Save as" file picker subsequently instead all at once
+//static
+void LLPreviewTexture::saveMultiple(uuid_vec_t ids)
+{
+ if (ids.empty())
+ {
+ return;
+ }
+
+ LLUUID next_id = ids.front();
+ ids.erase(ids.begin());
+
+ LLPreviewTexture* preview_texture = LLFloaterReg::getTypedInstance("preview_texture", next_id);
+ if (preview_texture)
+ {
+ preview_texture->openToSave();
+ preview_texture->saveAs(ids);
+ }
+}
+//
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index 2c8341f322..5b612bec89 100644
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -55,7 +55,11 @@ public:
virtual BOOL canSaveAs() const;
virtual void saveAs();
- void saveAs(EFileformatType format);
+ // FIRE-22851: Show texture "Save as" file picker subsequently instead all at once
+ //void saveAs(EFileformatType format);
+ void saveAs(uuid_vec_t remaining_ids);
+ void saveAs(EFileformatType format, uuid_vec_t remaining_ids = uuid_vec_t());
+ // Undo MAINT-2897 and use our own texture format selection
//void saveTextureToFile(const std::vector& filenames);
- void saveTextureToFile(const std::vector& filenames, EFileformatType format, loaded_callback_func callback);
+ void saveTextureToFile(const std::vector& filenames, EFileformatType format, loaded_callback_func callback, uuid_vec_t remaining_ids = uuid_vec_t());
//
static void onSaveAsBtn(LLUICtrl* ctrl, void* data);
@@ -103,6 +107,9 @@ public:
// FIRE-20150: Add refresh button to texture preview
void onButtonRefresh();
+ // FIRE-22851: Show texture "Save as" file picker subsequently instead all at once
+ static void saveMultiple(uuid_vec_t ids);
+
protected:
void init();
void populateRatioList();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index aa883a5a97..1d67a06939 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1466,6 +1466,14 @@ bool idle_startup()
gSavedPerAccountSettings.setString("InstantMessageLogPath", gDirUtilp->getChatLogsDir());
}
//
+
+ // FIRE-22853 Make snapshots to disk not remember path and filename if the user doesnt want them to.
+ if (!gSavedPerAccountSettings.getBOOL("FSRememberSnapshotPathSessions"))
+ {
+ gSavedPerAccountSettings.setString("SnapshotBaseDir", gSavedPerAccountSettings.getControl("SnapshotBaseDir")->getDefault().asString());
+ gSavedPerAccountSettings.setString("SnapshotBaseName", gSavedPerAccountSettings.getControl("SnapshotBaseName")->getDefault().asString());
+ }
+ //
// Seperate user directories per grid on OS build
#ifdef OPENSIM
gDirUtilp->setPerAccountChatLogsDir(userid, gridlabel);
diff --git a/indra/newview/skins/default/xui/de/panel_snapshot_local.xml b/indra/newview/skins/default/xui/de/panel_snapshot_local.xml
index ce025f5f61..3f3f86171c 100644
--- a/indra/newview/skins/default/xui/de/panel_snapshot_local.xml
+++ b/indra/newview/skins/default/xui/de/panel_snapshot_local.xml
@@ -24,6 +24,9 @@
+
+ Ort und Dateiname zwischen Sitzungen speichern
+
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
index 8853d40556..741e2caea2 100644
--- a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
@@ -165,6 +165,26 @@
name="image_quality_slider"
top_pad="6"
width="203" />
+
+
+ Save location and filename between sessions
+