diff --git a/src/core/flameshot.cpp b/src/core/flameshot.cpp index 54b0ada423..c7eadcadb6 100644 --- a/src/core/flameshot.cpp +++ b/src/core/flameshot.cpp @@ -24,11 +24,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include #if defined(Q_OS_MACOS) @@ -256,6 +258,14 @@ void Flameshot::history() #endif } +void Flameshot::openSavePath() +{ + QString savePath = ConfigHandler().savePath(); + if (!savePath.isEmpty()) { + QDesktopServices::openUrl(QUrl::fromLocalFile(savePath)); + } +} + QVersionNumber Flameshot::getVersion() { return QVersionNumber::fromString( diff --git a/src/core/flameshot.h b/src/core/flameshot.h index f625a801b6..96221a0dec 100644 --- a/src/core/flameshot.h +++ b/src/core/flameshot.h @@ -42,6 +42,8 @@ public slots: void info(); void history(); + void openSavePath(); + QVersionNumber getVersion(); public: diff --git a/src/widgets/trayicon.cpp b/src/widgets/trayicon.cpp index df58271c04..651c483e82 100644 --- a/src/widgets/trayicon.cpp +++ b/src/widgets/trayicon.cpp @@ -156,10 +156,17 @@ void TrayIcon::initMenu() Flameshot::instance(), &Flameshot::history); + auto* openSavePathAction = new QAction(tr("&Open Save Path"), this); + connect(openSavePathAction, + &QAction::triggered, + Flameshot::instance(), + &Flameshot::openSavePath); + m_menu->addAction(captureAction); m_menu->addAction(launcherAction); m_menu->addSeparator(); m_menu->addAction(recentAction); + m_menu->addAction(openSavePathAction); m_menu->addSeparator(); m_menu->addAction(configAction); m_menu->addSeparator();