Native mode for KFileDialog API on Windows (again)

Jaroslaw Staniek js at iidea.pl
Tue Jun 10 08:30:47 BST 2008


Olivier Goffart said the following, On 2008-06-09 18:18:

> You could catch the show event of the KFileDialog to hide the dialog, and show 
> the ugly and featureless native one instead. And map all to small amount of 
> available feature.

Update: Currently I've found this solution (work in progress):

-Add KFileDialogEx class that inherits KFileDialog;

-#define KFileDialog KFileDialogEx
and include <kfiledialog.h>

-KFileDialogEx reimplements int exec() method and behaves like KFileDialog for 
KDE (non-native) mode.

Then, we don't have to change code in the applications.

> I don't know how it will work for application that make advanced use of the 
> dialog...

Applications using KFileWidget directly would use the KDE implementation of 
course. The same case for apps depending on extra KDE features.

> Maybe that could be optionel at runtime (a config setting). I think it would 
> be great to give the KFileDialog anyway.  (Some prefer features over 
> consistency)

That's the plan; native mode could be switched on by this setting:

[KFileDialog Settings]
Native=true

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
  Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/kexi)
  KDE Libraries for MS Windows (http://windows.kde.org)




More information about the kde-core-devel mailing list