diff options
| author | Al12rs <gabriel.cortesi@outlook.com> | 2018-01-26 18:24:36 +0100 |
|---|---|---|
| committer | Al12rs <gabriel.cortesi@outlook.com> | 2018-01-26 18:24:36 +0100 |
| commit | 3a17614bed6d45df2852318910ce5e30d8dc1e4e (patch) | |
| tree | 945e2e2e9fe6ba435cb3e873aebacdb0aaad5f68 /src/mainwindow.cpp | |
| parent | ba0cd0e10d381123234a2aa8fe0bf2bce5c8a861 (diff) | |
Added "open downloads folder", "open profile folder", "open game fodler" and "open MyGames fodler" to the menu entries options of the mainwindow.
Changed the menu entry "open in explorer" of overwrite to show even if overwrite is empty.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index bcc8fd06..5f337da3 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2999,6 +2999,27 @@ void MainWindow::openInstanceFolder() ::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.settings().getBaseDirectory()).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
}
+void MainWindow::openProfileFolder()
+{
+ ::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.currentProfile()->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);
+}
+
+void MainWindow::openGameFolder()
+{
+ ::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.managedGame()->gameDirectory().absolutePath()).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
+}
+
+void MainWindow::openMyGamesFolder()
+{
+ ::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.managedGame()->documentsDirectory().absolutePath()).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
+}
+
+
void MainWindow::exportModListCSV()
{
SelectionDialog selection(tr("Choose what to export"));
@@ -3069,6 +3090,8 @@ QMenu *MainWindow::modListContextMenu() menu->addAction(tr("Create empty mod"), this, SLOT(createEmptyMod_clicked()));
+ menu->addSeparator();
+
menu->addAction(tr("Enable all visible"), this, SLOT(enableVisibleMods()));
menu->addAction(tr("Disable all visible"), this, SLOT(disableVisibleMods()));
@@ -3078,7 +3101,18 @@ QMenu *MainWindow::modListContextMenu() menu->addAction(tr("Export to csv..."), this, SLOT(exportModListCSV()));
+ menu->addSeparator();
+
menu->addAction(tr("Open Instance folder"), this, SLOT(openInstanceFolder()));
+
+ menu->addAction(tr("Open Profile folder"), this, SLOT(openProfileFolder()));
+
+ menu->addAction(tr("Open Downloads folder"), this, SLOT(openDownloadsFolder()));
+
+ menu->addAction(tr("Open Game folder"), this, SLOT(openGameFolder()));
+
+ menu->addAction(tr("Open MyGames folder"), this, SLOT(openMyGamesFolder()));
+
return menu;
}
@@ -3106,8 +3140,8 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos) menu->addAction(tr("Sync to Mods..."), &m_OrganizerCore, SLOT(syncOverwrite()));
menu->addAction(tr("Create Mod..."), this, SLOT(createModFromOverwrite()));
menu->addAction(tr("Clear Overwrite..."), this, SLOT(clearOverwrite()));
- menu->addAction(tr("Open in explorer"), this, SLOT(openExplorer_clicked()));
}
+ menu->addAction(tr("Open in explorer"), this, SLOT(openExplorer_clicked()));
} else if (std::find(flags.begin(), flags.end(), ModInfo::FLAG_BACKUP) != flags.end()) {
menu->addAction(tr("Restore Backup"), this, SLOT(restoreBackup_clicked()));
menu->addAction(tr("Remove Backup..."), this, SLOT(removeMod_clicked()));
|
