Merge Firestorm LGPL
commit
d5e82e3db7
|
|
@ -1202,5 +1202,16 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSRememberSnapshotPathSessions</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>If enabled, remember the path and filename of snapshots between sessions. Default (true)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
|
|
|||
|
|
@ -2677,6 +2677,12 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
|
|||
{
|
||||
LLAppearanceMgr::instance().removeItemsFromAvatar(ids);
|
||||
}
|
||||
// <FS:Ansariel> 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);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
else
|
||||
{
|
||||
std::set<LLFolderViewItem*>::iterator set_iter;
|
||||
|
|
|
|||
|
|
@ -383,21 +383,32 @@ BOOL LLPreviewTexture::canSaveAs() const
|
|||
// virtual
|
||||
void LLPreviewTexture::saveAs()
|
||||
{
|
||||
// <FS:PP> Allow to use user-defined default save format for textures
|
||||
// <FS:Ansariel> FIRE-22851: Show texture "Save as" file picker subsequently instead all at once
|
||||
// saveAs(LLPreviewTexture::FORMAT_TGA);
|
||||
saveAs(uuid_vec_t());
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-22851: Show texture "Save as" file picker subsequently instead all at once
|
||||
void LLPreviewTexture::saveAs(uuid_vec_t remaining_ids)
|
||||
{
|
||||
// <FS:PP> 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);
|
||||
}
|
||||
// </FS:PP>
|
||||
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
void LLPreviewTexture::saveAs(EFileformatType format)
|
||||
// <FS:Ansariel> 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)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
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();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Undo MAINT-2897 and use our own texture format selection
|
||||
//void LLPreviewTexture::saveTextureToFile(const std::vector<std::string>& filenames)
|
||||
void LLPreviewTexture::saveTextureToFile(const std::vector<std::string>& filenames, EFileformatType format, loaded_callback_func callback)
|
||||
void LLPreviewTexture::saveTextureToFile(const std::vector<std::string>& filenames, EFileformatType format, loaded_callback_func callback, uuid_vec_t remaining_ids)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
const LLInventoryItem* item = getItem();
|
||||
|
|
@ -452,6 +463,9 @@ void LLPreviewTexture::saveTextureToFile(const std::vector<std::string>& filenam
|
|||
mImage->setLoadedCallback(callback,
|
||||
// </FS:Ansariel>
|
||||
0, TRUE, FALSE, new LLUUID(mItemUUID), &mCallbackTextureList);
|
||||
|
||||
// <FS:Ansariel> 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);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:Ansariel> 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<LLPreviewTexture>("preview_texture", next_id);
|
||||
if (preview_texture)
|
||||
{
|
||||
preview_texture->openToSave();
|
||||
preview_texture->saveAs(ids);
|
||||
}
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,11 @@ public:
|
|||
|
||||
virtual BOOL canSaveAs() const;
|
||||
virtual void saveAs();
|
||||
void saveAs(EFileformatType format);
|
||||
// <FS:Ansariel> 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());
|
||||
// </FS:Ansariel<
|
||||
|
||||
virtual void loadAsset();
|
||||
virtual EAssetStatus getAssetStatus();
|
||||
|
|
@ -83,7 +87,7 @@ public:
|
|||
|
||||
// <FS:Ansariel> Undo MAINT-2897 and use our own texture format selection
|
||||
//void saveTextureToFile(const std::vector<std::string>& filenames);
|
||||
void saveTextureToFile(const std::vector<std::string>& filenames, EFileformatType format, loaded_callback_func callback);
|
||||
void saveTextureToFile(const std::vector<std::string>& filenames, EFileformatType format, loaded_callback_func callback, uuid_vec_t remaining_ids = uuid_vec_t());
|
||||
// </FS:Ansariel>
|
||||
|
||||
static void onSaveAsBtn(LLUICtrl* ctrl, void* data);
|
||||
|
|
@ -103,6 +107,9 @@ public:
|
|||
// <FS:Ansariel> FIRE-20150: Add refresh button to texture preview
|
||||
void onButtonRefresh();
|
||||
|
||||
// <FS:Ansariel> 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();
|
||||
|
|
|
|||
|
|
@ -1466,6 +1466,14 @@ bool idle_startup()
|
|||
gSavedPerAccountSettings.setString("InstantMessageLogPath", gDirUtilp->getChatLogsDir());
|
||||
}
|
||||
// </FS:KC>
|
||||
|
||||
// <FS:LO> 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());
|
||||
}
|
||||
// </FS:LO>
|
||||
// <FS:CR> Seperate user directories per grid on OS build
|
||||
#ifdef OPENSIM
|
||||
gDirUtilp->setPerAccountChatLogsDir(userid, gridlabel);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@
|
|||
<combo_box.item label="BMP (verlustfrei)" name="BMP"/>
|
||||
</combo_box>
|
||||
<slider label="Qualität:" name="image_quality_slider"/>
|
||||
<text name="local_remember_location_sessions_text">
|
||||
Ort und Dateiname zwischen Sitzungen speichern
|
||||
</text>
|
||||
<button label="▶ Auswahl" name="cancel_btn"/>
|
||||
<flyout_button label="Speichern" name="save_btn" tool_tip="Bild als Datei speichern">
|
||||
<flyout_button.item label="Speichern" name="save_item"/>
|
||||
|
|
|
|||
|
|
@ -165,6 +165,26 @@
|
|||
name="image_quality_slider"
|
||||
top_pad="6"
|
||||
width="203" />
|
||||
<check_box
|
||||
top_pad="8"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
width="20"
|
||||
name="local_remember_location_sessions"
|
||||
control_name="FSRememberSnapshotPathSessions"/>
|
||||
<text
|
||||
layout="topleft"
|
||||
follows="top|left"
|
||||
height="140"
|
||||
length="1"
|
||||
name="local_remember_location_sessions_text"
|
||||
top_delta="-6"
|
||||
left_delta="20"
|
||||
width="200"
|
||||
wrap="true">
|
||||
Save location and filename between sessions
|
||||
</text>
|
||||
<button
|
||||
follows="right|bottom"
|
||||
height="23"
|
||||
|
|
|
|||
Loading…
Reference in New Issue