From 9872c1e462d100221ca38aeb1f8ab35eda7fc8c2 Mon Sep 17 00:00:00 2001 From: Silarn Date: Thu, 3 May 2018 16:17:40 -0500 Subject: Allow for primary game sources and marking mods as converted/working --- src/mainwindow.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index a95b7b70..d3ea2b08 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2599,6 +2599,14 @@ void MainWindow::ignoreMissingData_clicked() emit modListDataChanged(m_OrganizerCore.modList()->index(m_ContextRow, 0), m_OrganizerCore.modList()->index(m_ContextRow, m_OrganizerCore.modList()->columnCount() - 1)); } +void MainWindow::markConverted_clicked() +{ + ModInfo::Ptr info = ModInfo::getByIndex(m_ContextRow); + info->markConverted(true); + connect(this, SIGNAL(modListDataChanged(QModelIndex, QModelIndex)), m_OrganizerCore.modList(), SIGNAL(dataChanged(QModelIndex, QModelIndex))); + emit modListDataChanged(m_OrganizerCore.modList()->index(m_ContextRow, 0), m_OrganizerCore.modList()->index(m_ContextRow, m_OrganizerCore.modList()->columnCount() - 1)); +} + void MainWindow::visitOnNexus_clicked() { @@ -3463,6 +3471,10 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos) menu->addAction(tr("Ignore missing data"), this, SLOT(ignoreMissingData_clicked())); } + if (std::find(flags.begin(), flags.end(), ModInfo::FLAG_ALTERNATE_GAME) != flags.end()) { + menu->addAction(tr("Mark as converted/working"), this, SLOT(markConverted_clicked())); + } + if (info->getNexusID() > 0) { menu->addAction(tr("Visit on Nexus"), this, SLOT(visitOnNexus_clicked())); } else if ((info->getURL() != "")) { -- cgit v1.3.1