diff options
author | Marius Kintel <marius@kintel.net> | 2013-05-21 22:02:16 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-05-21 22:02:16 (GMT) |
commit | 13e4bcd50e324d5228ce920d1fc84aa3ba8d6e5e (patch) | |
tree | c837071ee025839a11596633b7e511a607994048 /src/mainwin.cc | |
parent | e2772c70b862e3669c3a279f2540d746438ec38d (diff) |
Added meny entry for disclosing the library path. Part of #125
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r-- | src/mainwin.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc index da3501d..9b490c7 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -53,6 +53,7 @@ #ifdef Q_OS_MAC #include "CocoaUtils.h" #endif +#include "PlatformUtils.h" #include <QMenu> #include <QTime> @@ -227,6 +228,7 @@ MainWindow::MainWindow(const QString &filename) connect(this->fileActionSaveAs, SIGNAL(triggered()), this, SLOT(actionSaveAs())); connect(this->fileActionReload, SIGNAL(triggered()), this, SLOT(actionReload())); connect(this->fileActionQuit, SIGNAL(triggered()), this, SLOT(quit())); + connect(this->fileShowLibraryFolder, SIGNAL(triggered()), this, SLOT(actionShowLibraryFolder())); #ifndef __APPLE__ QList<QKeySequence> shortcuts = this->fileActionSave->shortcuts(); shortcuts.push_back(QKeySequence(Qt::Key_F2)); @@ -951,6 +953,11 @@ void MainWindow::actionSaveAs() } } +void MainWindow::actionShowLibraryFolder() +{ + QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(PlatformUtils::libraryPath()))); +} + void MainWindow::actionReload() { if (checkEditorModified()) refreshDocument(); |