[FIRE-35391] Make timestamps in snapshot filenames optional

master
Beq 2025-04-24 02:19:07 +01:00
parent 4adf817950
commit 9259979cc6
3 changed files with 42 additions and 4 deletions

View File

@ -26288,5 +26288,16 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>0</integer>
</map>
<key>FSSnapshotLocalNamesWithTimestamps</key>
<map>
<key>Comment</key>
<string>include a timestamp in the filename when saving snapshots locally</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
</map>
</llsd>

View File

@ -5936,8 +5936,15 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
filepath = sSnapshotDir;
filepath += gDirUtilp->getDirDelimiter();
filepath += sSnapshotBaseName;
filepath += now.toLocalDateString("_%Y-%m-%d_%H%M%S");
filepath += llformat("%.2d", i);
// <FS:Beq> FIRE-35391 - Restore ability for snapshots saving with simple index number
// filepath += now.toLocalDateString("_%Y-%m-%d_%H%M%S");
// filepath += llformat("%.2d", i);
if (gSavedSettings.getBOOL("FSSnapshotLocalNamesWithTimestamps"))
{
filepath += now.toLocalDateString("_%Y-%m-%d_%H%M%S");
}
filepath += llformat("_%.3d", i);
// </FS:Beq>
filepath += extension;
llstat stat_info;

View File

@ -176,14 +176,34 @@
<text
layout="topleft"
follows="top|left"
height="140"
height="14"
length="1"
name="local_remember_location_sessions_text"
top_delta="-6"
left_delta="20"
width="200"
wrap="true">
Save location and filename between sessions
Persist location and filename
</text>
<check_box
top_pad="8"
follows="left|top"
layout="topleft"
left="10"
width="20"
name="local_use_timestamp"
control_name="FSSnapshotLocalNamesWithTimestamps"/>
<text
layout="topleft"
follows="top|left"
height="14"
length="1"
name="local_use_timestamp_text"
top_delta="-6"
left_delta="20"
width="200"
wrap="true">
include date/time in filename
</text>
<button
follows="right|bottom"