Added "Open Folder" button to the take screenshot notification.

This commit is contained in:
Martín Lucas Golini
2026-08-11 17:51:31 -03:00
parent 6d00bba62d
commit 6ba7de31d5
7 changed files with 46 additions and 12 deletions
+8 -1
View File
@@ -2912,9 +2912,16 @@ void App::takeScreenshot() {
}
if ( mWindow->takeScreenshot( filepath, format ) ) {
std::vector<NotificationCenter::InteractiveAction> actions;
actions.reserve( 2 );
actions.emplace_back( NotificationCenter::InteractiveAction{
i18n( "open", "Open" ), [this, filepath] { openFileFromPath( filepath ); } } );
actions.emplace_back( NotificationCenter::InteractiveAction{
i18n( "open_screenshot_folder", "Open Folder" ),
[savePath] { Engine::instance()->openURI( savePath ); } } );
mNotificationCenter->addInteractiveNotification(
i18n( "screenshot_saved", "Screenshot saved:" ) + "\n" + filepath,
i18n( "open", "Open" ), [this, filepath] { openFileFromPath( filepath ); } );
std::move( actions ) );
} else {
errorMsgBox( i18n( "couldnt_save_screenshot", "Couldn't save the screenshot." ) );
}