Bug 418518 - X-KDE-RequiredNumberOfUrls: extend the possibilities
Summary: X-KDE-RequiredNumberOfUrls: extend the possibilities
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.67.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
Depends on:
Reported: 2020-03-05 21:54 UTC by Juan Simón
Modified: 2020-10-04 20:44 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.76


Note You need to log in before you can comment on or make changes to this bug.
Description Juan Simón 2020-03-05 21:54:36 UTC
The `X-KDE-RequiredNumberOfUrls` option allows me to set an exact number of occurrences but not a minimum and a maximum or just a minimum.
For example, I want to create an option to move n files to a new sub-folder, but I only want this option to appear if the minimum number of files selected is 2.
Another example, I want to create an option to compress several image files and create a comic book. I want at least 4 images selected for this option to appear.
These 2 examples I have given are real cases that I have recently encountered when switching to KDE.
Comment 1 andydecleyre 2020-09-30 18:44:02 UTC
I'll add another use case here.

The difftool Meld can compare 2 or 3 files, so a service menu reflecting that must currently be implemented as two separate services: meld-2 and meld-3

As far as I understand, anyway.
Comment 2 Alexander Lohnau 2020-10-04 09:00:11 UTC
In https://phabricator.kde.org/D9734 it is said:
> Also tested 2,4 where it would show up if 2 or 4 files are selected

Isn't this exactly your second usecase?
Comment 3 Bug Janitor Service 2020-10-04 14:50:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/149
Comment 4 David Faure 2020-10-04 20:44:40 UTC
Git commit 62055ce1a44d1455011478e0302ab91868bd43db by David Faure, on behalf of Alexander Lohnau.
Committed on 04/10/2020 at 20:43.
Pushed by dfaure into branch 'master'.

Add property for min/max count of Urls
FIXED-IN: 5.76

M  +12   -0    src/widgets/kfileitemactions.cpp