diff options
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index fe93b546..83a12437 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;
@@ -3304,15 +3321,18 @@ 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);
+ //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()));
@@ -3332,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();
@@ -4576,8 +4596,8 @@ void MainWindow::processLOOTOut(const std::string &lootOut, std::string &errorMe std::vector<std::string> lines;
boost::split(lines, lootOut, boost::is_any_of("\r\n"));
- std::tr1::regex exRequires("\"([^\"]*)\" requires \"([^\"]*)\", but it is missing\\.");
- std::tr1::regex exIncompatible("\"([^\"]*)\" is incompatible with \"([^\"]*)\", but both are present\\.");
+ std::regex exRequires("\"([^\"]*)\" requires \"([^\"]*)\", but it is missing\\.");
+ std::regex exIncompatible("\"([^\"]*)\" is incompatible with \"([^\"]*)\", but both are present\\.");
for (const std::string &line : lines) {
if (line.length() > 0) {
@@ -4589,12 +4609,12 @@ void MainWindow::processLOOTOut(const std::string &lootOut, std::string &errorMe qWarning("%s", line.c_str());
errorMessages.append(boost::algorithm::trim_copy(line.substr(erroridx + 8)) + "\n");
} else {
- std::tr1::smatch match;
- if (std::tr1::regex_match(line, match, exRequires)) {
+ std::smatch match;
+ if (std::regex_match(line, match, exRequires)) {
std::string modName(match[1].first, match[1].second);
std::string dependency(match[2].first, match[2].second);
m_OrganizerCore.pluginList()->addInformation(modName.c_str(), tr("depends on missing \"%1\"").arg(dependency.c_str()));
- } else if (std::tr1::regex_match(line, match, exIncompatible)) {
+ } else if (std::regex_match(line, match, exIncompatible)) {
std::string modName(match[1].first, match[1].second);
std::string dependency(match[2].first, match[2].second);
m_OrganizerCore.pluginList()->addInformation(modName.c_str(), tr("incompatible with \"%1\"").arg(dependency.c_str()));
|
