diff options
| author | Al12rs <gabriel.cortesi@outlook.com> | 2018-12-20 19:12:11 +0100 |
|---|---|---|
| committer | Al12rs <gabriel.cortesi@outlook.com> | 2018-12-20 19:12:11 +0100 |
| commit | 9a33dc148054443cb0efd5916ff758fca5bc09e3 (patch) | |
| tree | 201fceb9857b9abb78ad322a17f2903ee12a00da | |
| parent | 1b0c43778872beb2a84bad39da89dfb93dbd4609 (diff) | |
*Added "Open INIs Folder" option.
*Changed "Open Instance Folder" to open the Appdata or MO2 install instead of the baseDirectory.
| -rw-r--r-- | src/mainwindow.cpp | 19 | ||||
| -rw-r--r-- | src/mainwindow.h | 1 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3e35ebec..954c88c6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3639,7 +3639,11 @@ void MainWindow::disableVisibleMods() void MainWindow::openInstanceFolder()
{
- ::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.settings().getBaseDirectory()).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
+ QString dataPath = qApp->property("dataPath").toString();
+ ::ShellExecuteW(nullptr, L"explore", ToWString(dataPath).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
+
+ //opens BaseDirectory instead
+ //::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.settings().getBaseDirectory()).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
}
void MainWindow::openLogsFolder()
@@ -3665,6 +3669,17 @@ void MainWindow::openProfileFolder() ::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.currentProfile()->absolutePath()).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
}
+void MainWindow::openIniFolder()
+{
+ if (m_OrganizerCore.currentProfile()->localSettingsEnabled())
+ {
+ ::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.currentProfile()->absolutePath()).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
+ }
+ else {
+ ::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.managedGame()->documentsDirectory().absolutePath()).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
+ }
+}
+
void MainWindow::openDownloadsFolder()
{
::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.settings().getDownloadDirectory()).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
@@ -3864,6 +3879,8 @@ QMenu *MainWindow::openFolderMenu() FolderMenu->addAction(tr("Open MyGames folder"), this, SLOT(openMyGamesFolder()));
+ FolderMenu->addAction(tr("Open INIs folder"), this, SLOT(openIniFolder()));
+
FolderMenu->addSeparator();
FolderMenu->addAction(tr("Open Instance folder"), this, SLOT(openInstanceFolder()));
diff --git a/src/mainwindow.h b/src/mainwindow.h index cd7e6f43..e799a64a 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -529,6 +529,7 @@ private slots: void openDownloadsFolder();
void openModsFolder();
void openProfileFolder();
+ void openIniFolder();
void openGameFolder();
void openMyGamesFolder();
void startExeAction();
|
