Integrative work

Lauris Kaplinski lauris at
Sat Dec 20 13:17:19 GMT 2003


Alexander Neundorf kirjutas R, 19.12.2003 kell 00:27:
> > > One way to do that is to make those apps use our filedialog and
> > > printdialog (printing does work in most cases, filedialog is a research
> > > project people should look at and maybe make proposals how to change gtk
> > > to call the kde file dialog, patches welcome for demo.
> >
> > Somewhat hackish, but working implementation is in sodipodi
> > ( No KIO integration - only file dialogs
> > and print dialog + bridge to KDE print.
> >
> > If someone want to do non-hackish or more advanced thing
> > (make Gtk+ library to use KDE file dialogs by default),
> > functional main loop integration is must-be. But still you
> > will be easily caught, as soon as someone tries to extend
> > file dialog with some extra Gtk+ widgets ;-)

> How did you do it ?
> Catch the gtp_new_file_dialog() function and hoping that nobody will access 
> the file dialog widget directly ?
> Do you have the code somewhere available ?
> Please join at kde-debian at

In sodipodi it is compile-time option and involves several code
changes. The dialog itself is invoked explicitly, not as hooked
Gtk+ dialog. As dialog is modal, I have not to care too much
about handling Gtk+ events, while KDE file dialog is visible.
I have just hooked threadAwake and timer signals of file dialog,
and ensure that Gtk+ expose event gets processed time-to-time.

But I can imagine working implementation like that:

1. Hook gtk_file_selection_get_type, to return specially
   constructed GtkWidget type. It should have the same fields,
   as ordinary GtkFileSelection, plus hidden hook for
   KDE file dialog
2. Hook all other file selector API, and implement ::show
   (and maybe some other internal stuff), so that, if:
   - file selector is show modally AND
   - user has not added custom widgets to file selector
   KDE file dialog is run. If non-modal or modified dialog
   is needed, original Gtk dialog is shown.

My code is in sodipodi (either Gnome CVS, module sodipodi, or,

Best wishes,
Lauris Kaplinski

>> Visit to unsubscribe <<

More information about the kde-core-devel mailing list