https://bugs.kde.org/show_bug.cgi?id=427469

--- Comment #3 from David Faure <fa...@kde.org> ---
Very good bug report, thanks. Detailed, and down to command-line calls.

That makes me want to fix it :-)

It's tricky though. We read both mimeapps.list and desktop files, write out an
ordered list into the cache (ksycoca), then when it's time to find an app for a
mimetype, we read that list from the cache and filter out services that
shouldn't be shown in the current desktop (applyFilter() in
kapplicationtrader.cpp). At that point we don't really know if the app is in
the list because of mimeapps.list or because it was just a .desktop file being
there (but not specifically chosen by the user) when we created the cache.

And we can't filter out based on current desktop at the time of creating the
cache, because, well, technically the current desktop could change between the
time of creating the cache and the time of using it.

The easy way out would be to say: NotShowIn is *only* about whether the app
should be displayed in the K menu, it shouldn't prevent an application from
being selected (even without user intervention) when clicking on a file. But I
believe this would introduce unwanted behavior in some cases (let's say, like
FileRoller being started for directories in Plasma, by default).

OK, so it's tricky indeed. Well, at least tonight I wrote the unittest for this
(which also breaks if blindly removing the showInCurrentDesktop() check in
applyFilter, i.e. it checks that nobody took the "easy way out" from the
previous paragraph). TDD methodology: unittest written, next step is to come up
with a fix.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to