From 1b85cda62682d084ea7bc335713131334955d497 Mon Sep 17 00:00:00 2001 From: Al12rs Date: Sun, 4 Mar 2018 11:59:18 +0100 Subject: Added open logs folder to open folder toolbar dropdown. --- src/mainwindow.cpp | 25 +++++++++++++++++++++---- src/mainwindow.h | 1 + 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index fe93b546..71df8acf 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3035,6 +3035,12 @@ void MainWindow::openInstanceFolder() ::ShellExecuteW(nullptr, L"explore", ToWString(m_OrganizerCore.settings().getBaseDirectory()).c_str(), nullptr, nullptr, SW_SHOWNORMAL); } +void MainWindow::openLogsFolder() +{ + QString logsPath = qApp->property("dataPath").toString() + "/" + QString::fromStdWString(AppConfig::logPath()); + ::ShellExecuteW(nullptr, L"explore", ToWString(logsPath).c_str(), nullptr, nullptr, SW_SHOWNORMAL); +} + void MainWindow::openInstallFolder() { ::ShellExecuteW(nullptr, L"explore", ToWString(qApp->applicationDirPath()).c_str(), nullptr, nullptr, SW_SHOWNORMAL); @@ -3231,6 +3237,11 @@ QMenu *MainWindow::openFolderMenu() QMenu *FolderMenu = new QMenu(this); + FolderMenu->addAction(tr("Open Game folder"), this, SLOT(openGameFolder())); + + FolderMenu->addAction(tr("Open MyGames folder"), this, SLOT(openMyGamesFolder())); + + FolderMenu->addSeparator(); FolderMenu->addAction(tr("Open Instance folder"), this, SLOT(openInstanceFolder())); @@ -3238,13 +3249,19 @@ QMenu *MainWindow::openFolderMenu() FolderMenu->addAction(tr("Open Downloads folder"), this, SLOT(openDownloadsFolder())); - FolderMenu->addAction(tr("Open MO Install folder"), this, SLOT(openInstallFolder())); - FolderMenu->addSeparator(); - FolderMenu->addAction(tr("Open Game folder"), this, SLOT(openGameFolder())); + FolderMenu->addAction(tr("Open MO2 Install folder"), this, SLOT(openInstallFolder())); - FolderMenu->addAction(tr("Open MyGames folder"), this, SLOT(openMyGamesFolder())); + FolderMenu->addAction(tr("Open MO2 Logs folder"), this, SLOT(openLogsFolder())); + + + + + + + + return FolderMenu; diff --git a/src/mainwindow.h b/src/mainwindow.h index 2c2e2723..f84931ca 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -487,6 +487,7 @@ private slots: void disableVisibleMods(); void exportModListCSV(); void openInstanceFolder(); + void openLogsFolder(); void openInstallFolder(); void openDownloadsFolder(); void openProfileFolder(); -- cgit v1.3.1 From a873f7cfe2581716fd908062831d5d5c8f56392f Mon Sep 17 00:00:00 2001 From: Al12rs Date: Sun, 4 Mar 2018 12:52:28 +0100 Subject: Removed "Repace category" menu option from the modlist as it was redundant and cluttering the menu. --- src/mainwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 71df8acf..eb612b6b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3326,10 +3326,13 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos) connect(addRemoveCategoriesMenu, SIGNAL(aboutToHide()), this, SLOT(addRemoveCategories_MenuHandler())); addMenuAsPushButton(menu, addRemoveCategoriesMenu); + //Removed as it was redundant, just making the categories look more complicated. + /* QMenu *replaceCategoriesMenu = new QMenu(tr("Replace Categories")); populateMenuCategories(replaceCategoriesMenu, 0); connect(replaceCategoriesMenu, SIGNAL(aboutToHide()), this, SLOT(replaceCategories_MenuHandler())); addMenuAsPushButton(menu, replaceCategoriesMenu); + */ QMenu *primaryCategoryMenu = new QMenu(tr("Primary Category")); connect(primaryCategoryMenu, SIGNAL(aboutToShow()), this, SLOT(addPrimaryCategoryCandidates())); -- cgit v1.3.1 From 7cf0c1a29b463885e37a49691daffb98afdf58db Mon Sep 17 00:00:00 2001 From: Al12rs Date: Sun, 4 Mar 2018 19:12:52 +0100 Subject: Changed tooltip of Open Folder menu. --- src/mainwindow.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 31522c03..451e3c87 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -253,7 +253,7 @@ p, li { white-space: pre-wrap; } - Quickly open in Explorer relevant Folders... + Show Open Folders menu... -- cgit v1.3.1 From 513c0629323c066a7b1d5df5ce81f3b9beac85bd Mon Sep 17 00:00:00 2001 From: Al12rs Date: Mon, 5 Mar 2018 15:16:55 +0100 Subject: Inverted position of reinstall and remove mod, as per user request. --- src/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index eb612b6b..ddd7ef92 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3352,8 +3352,8 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos) menu->addSeparator(); menu->addAction(tr("Rename Mod..."), this, SLOT(renameMod_clicked())); - menu->addAction(tr("Remove Mod..."), this, SLOT(removeMod_clicked())); menu->addAction(tr("Reinstall Mod"), this, SLOT(reinstallMod_clicked())); + menu->addAction(tr("Remove Mod..."), this, SLOT(removeMod_clicked())); menu->addSeparator(); -- cgit v1.3.1 From 52501e73c9c205c08b1a8a288c88b5c3362a1381 Mon Sep 17 00:00:00 2001 From: Al12rs Date: Sun, 4 Mar 2018 21:05:31 +0100 Subject: Updated Open Folder icon as it was not very distinguishable. --- src/resources/open-Folder-Icon.png | Bin 17646 -> 16927 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'src') diff --git a/src/resources/open-Folder-Icon.png b/src/resources/open-Folder-Icon.png index 345671f7..c363be0f 100644 Binary files a/src/resources/open-Folder-Icon.png and b/src/resources/open-Folder-Icon.png differ -- cgit v1.3.1 From 7c87e9a64556c588a66482ea9acace52c76af7cd Mon Sep 17 00:00:00 2001 From: Al12rs Date: Sun, 4 Mar 2018 19:12:06 +0100 Subject: Edited "Add/Remove category" menu entry text to "Change Category". --- src/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ddd7ef92..f5be22f0 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3321,7 +3321,7 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos) } else if (std::find(flags.begin(), flags.end(), ModInfo::FLAG_FOREIGN) != flags.end()) { // nop, nothing to do with this mod } else { - QMenu *addRemoveCategoriesMenu = new QMenu(tr("Add/Remove Categories")); + QMenu *addRemoveCategoriesMenu = new QMenu(tr("Change Categories")); populateMenuCategories(addRemoveCategoriesMenu, 0); connect(addRemoveCategoriesMenu, SIGNAL(aboutToHide()), this, SLOT(addRemoveCategories_MenuHandler())); addMenuAsPushButton(menu, addRemoveCategoriesMenu); -- cgit v1.3.1 From 673a5034f0eb9fb12befdbb52ea8dd5d72ac302e Mon Sep 17 00:00:00 2001 From: Al12rs Date: Wed, 7 Mar 2018 13:49:25 +0100 Subject: Added check for mod rename to ensure the new name is not already used by another mod. --- src/modlist.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/modlist.cpp b/src/modlist.cpp index 4002a424..7b2ad1f9 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -424,6 +424,11 @@ bool ModList::renameMod(int index, const QString &newName) return false; } + if (ModList::allMods().contains(newName,Qt::CaseInsensitive)) { + MessageDialog::showMessage(tr("Name is already in use by another mod"), nullptr); + return false; + } + ModInfo::Ptr modInfo = ModInfo::getByIndex(index); QString oldName = modInfo->name(); if (newName != oldName) { -- cgit v1.3.1