Bug 116622

Summary: patch: kopenwith dialog: complete history and files
Product: [Unmaintained] kfile Reporter: Felix Berger <bflat1>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED NOT A BUG    
Severity: wishlist CC: adawit, faure, nate, pfeiffer
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: the proposed patch

Description Felix Berger 2005-11-18 13:59:45 UTC
Version:            (using KDE KDE 3.4.3)
Installed from:    Compiled From Sources
OS:                Linux

Afaics the history completion is overshadowed by the url completion in kopenwith.cpp which instantiated further down at line 472, i.e. only file entries are completed but never history entries.

The attached patch is a first attempt to enable history completion and file completion at the same time by introducing a proxycompletion class which forwards completion requests to the url completion and its own history completion.

There might be the following issues: The code in ProxyCompletion::makeCompletion(const QString&) adds the url completion results to the data base of the history completion thus polluting the data set. I couldn't find another way though, since it's not possible to overwrite KCompletion::allMatches() where I could just return the concatenation of all matches.

Any more insight into how this could be done properly, would be appreciated. Of course it can be discussed, if it makes sense to do it this way.

Thanks,
Felix
Comment 1 Felix Berger 2005-11-18 14:01:06 UTC
Created attachment 13533 [details]
the proposed patch
Comment 2 Christoph Feck 2009-08-27 02:36:56 UTC
Moving from "kio/kfile" component to "kfile" product, helps sorting out duplicates.
Comment 3 David Faure 2009-11-09 13:40:35 UTC
Actually, I have to wonder if the URL completion is really useful at all in this dialog. I never typed the full path to an executable in that lineedit (and I always found it strange to see subdirs of my home directory come up as completion in there).
And if we got rid of it and only had the history completion, then someone who needs to type a full path could just open the file dialog, type the full path there (with completion), and after that it will be remembered in the history so he'll only have to do that once (per binary).

Does anyone disagree with me removing the URL completion from the "open with" dialog altogether?

(Carsten added the URL completion in r45614, so adding him to CC.)
Comment 4 Felix Berger 2012-08-27 14:49:47 UTC
I agree with David, most likely people would want PATH completion in the open with dialog. As long as they still can type absolute paths to executables in non-standard places and those entries are saved in the history completion, this would be an overall improvement.

I don't use this feature much anymore but still think it makes the open with dialog more usable.
Comment 5 Nate Graham 2018-04-13 17:06:18 UTC
The Open With dialog was recently vastly improved in usability, and we believe that it obviates this request. Thanks anyway for the patch, and sorry we couldn't merge it!