diff options
| author | Tannin <devnull@localhost> | 2014-12-20 14:42:00 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-12-20 14:42:00 +0100 |
| commit | e33406b4b501999ecd02a996f9a5ec3a26c05d9f (patch) | |
| tree | 2e0fac58baa0e22302d5fbcef0b335c33fa41087 /src/mainwindow.cpp | |
| parent | a5906f1044d08a870285758d3c93d6252a16a14a (diff) | |
endorsing is now only offered for mods with a valid nexus id
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0bdf4160..dbd656c5 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3964,22 +3964,24 @@ 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())); - switch (info->endorsedState()) { - case ModInfo::ENDORSED_TRUE: { - menu->addAction(tr("Un-Endorse"), this, SLOT(unendorse_clicked())); - } break; - case ModInfo::ENDORSED_FALSE: { - menu->addAction(tr("Endorse"), this, SLOT(endorse_clicked())); - menu->addAction(tr("Won't endorse"), this, SLOT(dontendorse_clicked())); - } break; - case ModInfo::ENDORSED_NEVER: { - menu->addAction(tr("Endorse"), this, SLOT(endorse_clicked())); - } break; - default: { - QAction *action = new QAction(tr("Endorsement state unknown"), menu); - action->setEnabled(false); - menu->addAction(action); - } break; + if (info->getNexusID() > 0) { + switch (info->endorsedState()) { + case ModInfo::ENDORSED_TRUE: { + menu->addAction(tr("Un-Endorse"), this, SLOT(unendorse_clicked())); + } break; + case ModInfo::ENDORSED_FALSE: { + menu->addAction(tr("Endorse"), this, SLOT(endorse_clicked())); + menu->addAction(tr("Won't endorse"), this, SLOT(dontendorse_clicked())); + } break; + case ModInfo::ENDORSED_NEVER: { + menu->addAction(tr("Endorse"), this, SLOT(endorse_clicked())); + } break; + default: { + QAction *action = new QAction(tr("Endorsement state unknown"), menu); + action->setEnabled(false); + menu->addAction(action); + } break; + } } std::vector<ModInfo::EFlag> flags = info->getFlags(); if (std::find(flags.begin(), flags.end(), ModInfo::FLAG_INVALID) != flags.end()) { |
