File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 2424#include < QApplication>
2525#include < QBuffer>
2626#include < QDebug>
27+ #include < QDesktopServices>
2728#include < QDesktopWidget>
2829#include < QFile>
2930#include < QMessageBox>
3031#include < QThread>
3132#include < QTimer>
33+ #include < QUrl>
3234#include < QVersionNumber>
3335
3436#if defined(Q_OS_MACOS)
@@ -256,6 +258,14 @@ void Flameshot::history()
256258#endif
257259}
258260
261+ void Flameshot::openSavePath ()
262+ {
263+ QString savePath = ConfigHandler ().savePath ();
264+ if (!savePath.isEmpty ()) {
265+ QDesktopServices::openUrl (QUrl::fromLocalFile (savePath));
266+ }
267+ }
268+
259269QVersionNumber Flameshot::getVersion ()
260270{
261271 return QVersionNumber::fromString (
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ public slots:
4242 void info ();
4343 void history ();
4444
45+ void openSavePath ();
46+
4547 QVersionNumber getVersion ();
4648
4749public:
Original file line number Diff line number Diff line change @@ -156,10 +156,17 @@ void TrayIcon::initMenu()
156156 Flameshot::instance (),
157157 &Flameshot::history);
158158
159+ auto * openSavePathAction = new QAction (tr (" &Open Save Path" ), this );
160+ connect (openSavePathAction,
161+ &QAction::triggered,
162+ Flameshot::instance (),
163+ &Flameshot::openSavePath);
164+
159165 m_menu->addAction (captureAction);
160166 m_menu->addAction (launcherAction);
161167 m_menu->addSeparator ();
162168 m_menu->addAction (recentAction);
169+ m_menu->addAction (openSavePathAction);
163170 m_menu->addSeparator ();
164171 m_menu->addAction (configAction);
165172 m_menu->addSeparator ();
You can’t perform that action at this time.
0 commit comments