broulik created this revision. broulik added reviewers: Frameworks, dfaure, michaelh, mlaurent. Restricted Application added a project: Frameworks. broulik requested review of this revision.
REVISION SUMMARY This was mostly prompted by https://phabricator.kde.org/D9698 since Kompare can only compare two files and it makes no sense to offer this option for less or more than that. It is done as a QStringList so you could specify multiple criteria, e.g. only show for 2 or 4 files. If the need should arise, this could be made more sophisticated by adding support for e.g. ranges and less than/more than operators, but let's keep it simple for now. CHANGELOG: KonqPopupMenu/Plugin can now use the X-KDE-RequiredNumberOfUrls key to require a certain number of files to be selected before being shown TEST PLAN Added X-KDE-RequiredNumberOfUrls=2 to the desktop file, action showed up only when I selected two files. Also tested `2,4` where it would show up if 2 or 4 files are selected Older KIO versions would just ignore that key and always show the action, which is fine. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D9734 AFFECTED FILES src/widgets/kfileitemactions.cpp To: broulik, #frameworks, dfaure, michaelh, mlaurent