Summary: | Menu item for downloading missing signatures should be disabled if all signatures are present | ||
---|---|---|---|
Product: | [Applications] kgpg | Reporter: | Oliver Klee <dev+kde> |
Component: | general | Assignee: | bj |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 1.2 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Oliver Klee
2005-04-30 13:31:59 UTC
SVN commit 705127 by dakon: Deactivate "import missing signatures" when we already know to have all Be careful: we don't "know" if the key has never been expanded before. Only key expansion loads all the signatures and will take several seconds on a big keyring. Therefore unexpanded keys will lead the item always to be visible (behaviour like before). BUG:104814 M +20 -0 keysmanager.cpp --- trunk/KDE/kdeutils/kgpg/keysmanager.cpp #705126:705127 @@ -1366,7 +1366,27 @@ else { QList<KeyListViewItem*> exportList = keysList2->selectedItems(); + bool unksig = false; + // find out if an item has unknown signatures. Only check if the item has been + // expanded before as expansion is very expensive and can take several seconds + // that will freeze the UI meanwhile. + for (int i = 0; i < exportList.count(); i++) { + KeyListViewItem *k = exportList.at(i); + QStringList l; + + if (k->firstChild() == NULL) { + unksig = true; + break; + } + getMissingSigs(&l, k); + if (!l.isEmpty()) { + unksig = true; + break; + } + } + importAllSignKeys->setEnabled(unksig); + if (((sel->itemType() & KeyListViewItem::Pair) == KeyListViewItem::Pair) && (exportList.count() == 1)) m_popupsec->exec(pos); else |