mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
MenuBar: Add action which opens the user folder
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
#include <QApplication>
|
||||
#include <QCloseEvent>
|
||||
#include <QDateTime>
|
||||
#include <QDesktopServices>
|
||||
#include <QDir>
|
||||
#include <QDragEnterEvent>
|
||||
#include <QDropEvent>
|
||||
@ -480,6 +481,7 @@ void MainWindow::ConnectMenuBar()
|
||||
connect(m_menu_bar, &MenuBar::ChangeDisc, this, &MainWindow::ChangeDisc);
|
||||
connect(m_menu_bar, &MenuBar::BootDVDBackup, this,
|
||||
[this](const QString& drive) { StartGame(drive, ScanForSecondDisc::No); });
|
||||
connect(m_menu_bar, &MenuBar::OpenUserFolder, this, &MainWindow::OpenUserFolder);
|
||||
|
||||
// Emulation
|
||||
connect(m_menu_bar, &MenuBar::Pause, this, &MainWindow::Pause);
|
||||
@ -752,6 +754,14 @@ void MainWindow::EjectDisc()
|
||||
Core::RunAsCPUThread([] { DVDInterface::EjectDisc(DVDInterface::EjectCause::User); });
|
||||
}
|
||||
|
||||
void MainWindow::OpenUserFolder()
|
||||
{
|
||||
std::string path = File::GetUserPath(D_USER_IDX);
|
||||
|
||||
QUrl url = QUrl::fromLocalFile(QString::fromStdString(path));
|
||||
QDesktopServices::openUrl(url);
|
||||
}
|
||||
|
||||
void MainWindow::Open()
|
||||
{
|
||||
QStringList files = PromptFileNames();
|
||||
|
Reference in New Issue
Block a user