summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorCarbon Cowboy <254348425+carboncowboy@users.noreply.github.com>2026-01-31 21:59:51 -0800
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-02-03 12:16:53 +0200
commit82ff4344f65f91c3536212ecd06934d389b2063e (patch)
tree696bcc49b94d68e0a2c9bf0bcdb2dac7defffb08 /indra/newview/llviewerwindow.cpp
parent778bf6c1aa7ed608b5d857574944a7fbc19c3638 (diff)
Add clickable notification for saved screenshots
Display notification with filepath after screenshot is saved to disk. Clicking the notification opens the system file browser to reveal the saved file. Fixes #5329
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 725178c1b9..8695b96952 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -4918,6 +4918,19 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
if (image->save(filepath))
{
playSnapshotAnimAndSound();
+
+ // Show clickable notification with filepath
+ LLSD args;
+ args["FILEPATH"] = filepath;
+
+ LLSD payload;
+ payload["filepath"] = filepath;
+
+ LLNotificationsUtil::add("SnapshotSavedToComputer",
+ args,
+ payload.with("respond_on_mousedown", true),
+ boost::bind(&LLViewerWindow::onSnapshotNotificationClick, _1, _2));
+
success_cb();
}
else
@@ -4932,6 +4945,16 @@ void LLViewerWindow::resetSnapshotLoc()
}
// static
+void LLViewerWindow::onSnapshotNotificationClick(const LLSD& notification, const LLSD& response)
+{
+ std::string filepath = notification["payload"]["filepath"].asString();
+ if (!filepath.empty())
+ {
+ gDirUtilp->openDir(filepath);
+ }
+}
+
+// static
void LLViewerWindow::movieSize(S32 new_width, S32 new_height)
{
LLCoordWindow size;