From dd8f73178cab02a03320b27a36c77ff5cb77e7ad Mon Sep 17 00:00:00 2001 From: Al12rs Date: Wed, 14 Feb 2018 20:08:31 +0100 Subject: Small changes to make the modlist context menu more organized. --- src/mainwindow.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e578bf5c..abad054b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3246,15 +3246,22 @@ QMenu *MainWindow::modListContextMenu() menu->addSeparator(); - menu->addAction(tr("Open Instance folder"), this, SLOT(openInstanceFolder())); + QMenu *openSubMenu = new QMenu(this); - menu->addAction(tr("Open Profile folder"), this, SLOT(openProfileFolder())); - menu->addAction(tr("Open Downloads folder"), this, SLOT(openDownloadsFolder())); + openSubMenu->addAction(tr("Open Instance folder"), this, SLOT(openInstanceFolder())); - menu->addAction(tr("Open Game folder"), this, SLOT(openGameFolder())); + openSubMenu->addAction(tr("Open Profile folder"), this, SLOT(openProfileFolder())); - menu->addAction(tr("Open MyGames folder"), this, SLOT(openMyGamesFolder())); + openSubMenu->addAction(tr("Open Downloads folder"), this, SLOT(openDownloadsFolder())); + + openSubMenu->addAction(tr("Open Game folder"), this, SLOT(openGameFolder())); + + openSubMenu->addAction(tr("Open MyGames folder"), this, SLOT(openMyGamesFolder())); + + openSubMenu->setTitle(tr("Open Folder...")); + + menu->addMenu(openSubMenu); return menu; } @@ -3321,6 +3328,9 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos) 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->addSeparator(); + if (info->getNexusID() > 0) { switch (info->endorsedState()) { case ModInfo::ENDORSED_TRUE: { @@ -3341,6 +3351,8 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos) } } + menu->addSeparator(); + std::vector flags = info->getFlags(); if (std::find(flags.begin(), flags.end(), ModInfo::FLAG_INVALID) != flags.end()) { menu->addAction(tr("Ignore missing data"), this, SLOT(ignoreMissingData_clicked())); -- cgit v1.3.1