[patch] Native "Open With" dialog on Windows

David Faure faure at kde.org
Thu Jul 10 14:32:01 BST 2008

On Thursday 10 July 2008, Jaroslaw Staniek wrote:
> David Faure said the following, On 2008-07-10 13:27:
> > On Thursday 10 July 2008, Jaroslaw Staniek wrote:
> >> (for review)
> >> Native "Open With" dialog on Windows (by default).
> >> This allows to use (and associate) given file extensions with any Windows 
> >> application directly, as users expect.
> >>
> >> - moved KRun::KRunPrivate declaration to krun_p.h
> >> - added KRun::KRunPrivate::displayNativeOpenWithDialog() for Windows only
> >>    in krun_win.cpp
> >> - added a note to KOpenWithDialog that using KRun::displayOpenWithDialog()
> >>    is recommended
> > 
> > Why should this be in KRun? I think this is an odd place for the main displayOpenWithDialog() call.
> > Can't it be a static method of KOpenWithDialog instead, just like we do for KFileDialog?
> I wanted to ask this question, and have the same proposal, as I dislike the 
> location too...
> But it's in kdelibs already. I can make displayOpenWithDialog() obsolete and 
> add KOpenWithDialog::openWith() or so.

Ah I missed the fact that it's not only about showing the dialog, but also actually
running the chosen application... (and I also missed the fact that it's in krun already)
OK, I cancel my request.

I think the note in the kopenwithdialog class documentation is a bit misleading;
it depends what one wants to do with the openwith dialog. For instance the
filetypes editor uses KOpenWithDialog to let the user choose an application,
but not to run it right now, so the note "It is recommended to use KRun::displayOpenWithDialog() instead"
is wrong in this case. That method does more (choose+run), so it's not at the same level.
I suggest changing the comment to say something like "to let the user choose an application and run it 
immediately, use KRun::displayOpenWithDialog()".

David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

More information about the kde-core-devel mailing list