diff --git a/ChangeLog b/ChangeLog index 3a5bf60d4..1c1b97bf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -144,6 +144,7 @@ 90. Show track info in context-view as well as artist and album info. Track info is stacked behind lyrics. 91. Add option to re-load lyric from disk. +92. Add "Open In File Manager" to folders page for windows builds. 1.3.4 ----- diff --git a/gui/folderpage.cpp b/gui/folderpage.cpp index 9aa343d3e..4aea19e5e 100644 --- a/gui/folderpage.cpp +++ b/gui/folderpage.cpp @@ -38,7 +38,7 @@ FolderPage::FolderPage(QWidget *p) setupUi(this); addToPlayQueue->setDefaultAction(StdActions::self()->addToPlayQueueAction); replacePlayQueue->setDefaultAction(StdActions::self()->replacePlayQueueAction); - #if !defined Q_OS_WIN && !defined Q_OS_MAC + #if !defined Q_OS_MAC browseAction = ActionCollection::get()->createAction("openfilemanager", i18n("Open In File Manager"), "system-file-manager"); #endif @@ -56,7 +56,7 @@ FolderPage::FolderPage(QWidget *p) view->addAction(StdActions::self()->replaygainAction); #endif // TAGLIB_FOUND #endif - #if !defined Q_OS_WIN && !defined Q_OS_MAC + #if !defined Q_OS_MAC view->addAction(browseAction); #endif #ifdef ENABLE_DEVICES_SUPPORT @@ -74,7 +74,7 @@ FolderPage::FolderPage(QWidget *p) connect(view, SIGNAL(searchItems()), this, SLOT(searchItems())); connect(view, SIGNAL(itemsSelected(bool)), this, SLOT(controlActions())); connect(view, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(itemDoubleClicked(const QModelIndex &))); - #if !defined Q_OS_WIN && !defined Q_OS_MAC + #if !defined Q_OS_MAC connect(browseAction, SIGNAL(triggered(bool)), this, SLOT(openFileManager())); #endif connect(MPDConnection::self(), SIGNAL(updatingFileList()), this, SLOT(showSpinner())); @@ -164,7 +164,7 @@ void FolderPage::controlActions() #endif #endif // TAGLIB_FOUND - #if !defined Q_OS_WIN && !defined Q_OS_MAC + #if !defined Q_OS_MAC browseAction->setEnabled(false); if (1==selected.count() && MPDConnection::self()->getDetails().dirReadable) { DirViewItem *item = static_cast(proxy.mapToSource(selected.at(0)).internalPointer()); @@ -188,7 +188,7 @@ void FolderPage::itemDoubleClicked(const QModelIndex &) void FolderPage::openFileManager() { - #if !defined Q_OS_WIN && !defined Q_OS_MAC + #if !defined Q_OS_MAC const QModelIndexList selected = view->selectedIndexes(false); // Dont need sorted selection here... if (1!=selected.size()) { return; diff --git a/gui/folderpage.h b/gui/folderpage.h index b2282e9a4..bb01cdeea 100644 --- a/gui/folderpage.h +++ b/gui/folderpage.h @@ -84,7 +84,7 @@ private: private: bool loaded; - #if !defined Q_OS_WIN && !defined Q_OS_MAC + #if !defined Q_OS_MAC Action *browseAction; #endif DirViewProxyModel proxy; diff --git a/support/utils.cpp b/support/utils.cpp index af5427c3e..592b21a26 100644 --- a/support/utils.cpp +++ b/support/utils.cpp @@ -733,8 +733,8 @@ void Utils::openBrowser(const QUrl &url) { #if defined Q_OS_WIN QProcess::startDetached(QLatin1String("cmd"), QStringList() << QLatin1String("/c") << QLatin1String("start") << url.toString()); - //#elif definedQ_OS_MAC - // TODO!!! + #elif defined Q_OS_MAC + Q_UNUSED(url) // TODO!!! #else QProcess::startDetached(QLatin1String("xdg-open"), QStringList() << url.toString()); #endif @@ -744,8 +744,8 @@ void Utils::openFileManager(const QString &dir) { #if defined Q_OS_WIN - Q_UNUSED(dir) // TODO!!! - #elif definedQ_OS_MAC + QProcess::startDetached(QLatin1String("cmd"), QStringList() << QLatin1String("/c") << QLatin1String("start") << dir); + #elif defined Q_OS_MAC Q_UNUSED(dir) // TODO!!! #else QProcess::startDetached(QLatin1String("xdg-open"), QStringList() << dir);