summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJoshua Vandaƫle <joshua@vandaele.software>2026-01-15 20:29:31 +0100
committerJoshua Vandaƫle <joshua@vandaele.software>2026-01-15 20:40:48 +0100
commit0e348ee159bca57376188d7323ef069886ca1197 (patch)
tree37c89edc57c63a52c636e27aba3d3fb7d2a88650 /Source/Core
parent4c7cb2622f6e05e13aa94f058c110923733df2c3 (diff)
MenuBar: Add entries to open the config and cache folders
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinQt/MainWindow.cpp18
-rw-r--r--Source/Core/DolphinQt/MainWindow.h2
-rw-r--r--Source/Core/DolphinQt/MenuBar.cpp12
-rw-r--r--Source/Core/DolphinQt/MenuBar.h4
4 files changed, 36 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp
index 7304905442..4b9308f189 100644
--- a/Source/Core/DolphinQt/MainWindow.cpp
+++ b/Source/Core/DolphinQt/MainWindow.cpp
@@ -530,6 +530,8 @@ void MainWindow::ConnectMenuBar()
connect(m_menu_bar, &MenuBar::EjectDisc, this, &MainWindow::EjectDisc);
connect(m_menu_bar, &MenuBar::ChangeDisc, this, &MainWindow::ChangeDisc);
connect(m_menu_bar, &MenuBar::OpenUserFolder, this, &MainWindow::OpenUserFolder);
+ connect(m_menu_bar, &MenuBar::OpenConfigFolder, this, &MainWindow::OpenConfigFolder);
+ connect(m_menu_bar, &MenuBar::OpenCacheFolder, this, &MainWindow::OpenCacheFolder);
// Emulation
connect(m_menu_bar, &MenuBar::Pause, this, &MainWindow::Pause);
@@ -827,6 +829,22 @@ void MainWindow::OpenUserFolder()
QDesktopServices::openUrl(url);
}
+void MainWindow::OpenConfigFolder()
+{
+ std::string path = File::GetUserPath(D_CONFIG_IDX);
+
+ QUrl url = QUrl::fromLocalFile(QString::fromStdString(path));
+ QDesktopServices::openUrl(url);
+}
+
+void MainWindow::OpenCacheFolder()
+{
+ std::string path = File::GetUserPath(D_CACHE_IDX);
+
+ QUrl url = QUrl::fromLocalFile(QString::fromStdString(path));
+ QDesktopServices::openUrl(url);
+}
+
void MainWindow::Open()
{
QStringList files = PromptFileNames();
diff --git a/Source/Core/DolphinQt/MainWindow.h b/Source/Core/DolphinQt/MainWindow.h
index a089935f61..bb7307c98c 100644
--- a/Source/Core/DolphinQt/MainWindow.h
+++ b/Source/Core/DolphinQt/MainWindow.h
@@ -216,6 +216,8 @@ private:
void EjectDisc();
void OpenUserFolder();
+ void OpenConfigFolder();
+ void OpenCacheFolder();
QStringList PromptFileNames();
diff --git a/Source/Core/DolphinQt/MenuBar.cpp b/Source/Core/DolphinQt/MenuBar.cpp
index dfb3eb9ff0..7126ff9654 100644
--- a/Source/Core/DolphinQt/MenuBar.cpp
+++ b/Source/Core/DolphinQt/MenuBar.cpp
@@ -260,6 +260,18 @@ void MenuBar::AddFileMenu()
m_open_user_folder =
file_menu->addAction(tr("Open &User Folder"), this, &MenuBar::OpenUserFolder);
+ const std::string user_path = File::GetUserPath(D_USER_IDX);
+ if (user_path + CONFIG_DIR DIR_SEP != File::GetUserPath(D_CONFIG_IDX))
+ {
+ m_open_config_folder =
+ file_menu->addAction(tr("Open &Config Folder"), this, &MenuBar::OpenConfigFolder);
+ }
+ if (user_path + CACHE_DIR DIR_SEP != File::GetUserPath(D_CACHE_IDX))
+ {
+ m_open_cache_folder =
+ file_menu->addAction(tr("Open C&ache Folder"), this, &MenuBar::OpenCacheFolder);
+ }
+
file_menu->addSeparator();
m_exit_action = file_menu->addAction(tr("E&xit"), this, &MenuBar::Exit);
diff --git a/Source/Core/DolphinQt/MenuBar.h b/Source/Core/DolphinQt/MenuBar.h
index 1f2abd3a3b..9f51179e2a 100644
--- a/Source/Core/DolphinQt/MenuBar.h
+++ b/Source/Core/DolphinQt/MenuBar.h
@@ -62,6 +62,8 @@ signals:
void ChangeDisc();
void EjectDisc();
void OpenUserFolder();
+ void OpenConfigFolder();
+ void OpenCacheFolder();
// Emulation
void Play();
@@ -211,6 +213,8 @@ private:
QAction* m_eject_disc;
QMenu* m_backup_menu;
QAction* m_open_user_folder;
+ QAction* m_open_config_folder;
+ QAction* m_open_cache_folder;
// Tools
QAction* m_wad_install_action;