<Swing Dev> Bug 6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
c.cerbo at gmail.com
Sun Jan 10 14:15:08 PST 2010
I hope you had a good holiday!
As said, I began to port the native GTK FileChooser in
java.awt.FileDialog (bug id 6913179).
You can get this initial code from (it's an eclipse project):
svn checkout http://gtkjfilechooser.googlecode.com/svn/trunk/GTKFileDialog
Then type "make test" in your shell to run a simple demo.
I'd like now to integrate it with the real OpenJDK codebase, but I've
see that the GTK libraries aren't invoked through #include <gtk/gtk.h>
but through "gtk2_interface.h" (in
That means, I should extend this header file to accept also the
GtkFileChooser related functions that are in my
Could you (or somebody else) please explain me, how to do that?
Besides I have the following questions/comments:
1) Maybe should we write a new class sun.awt.X11.GtkFileDialogPeer
instead of modify sun.awt.X11.XFileDialogPeer?
The old XFileDialogPeer will be continued to be used in system without
the GTK libraries. That means, we should modify
sun.awt.X11.XToolkit#createFileDialog(FileDialog) to return
GtkFileDialogPeer instead of XFileDialogPeer, if GTK is avalaible.
By the way, how can we check in the JDK the presence of GTK? (I think,
it's already done for the availability of the GTK L&F, but I could not
2) java.awt.FileDialog supports only the selection of files but not of
folders: Why don't we allow its method setMode(.) to accept also other
values than LOAD (0) or SAVE (1). For example we could pass the value
2 to allow only the selection of folders? It's a minimal change that
doesn't broke the existing API. On platforms where the new selection
mode for folders isn't yet implemented, the behaviour should be the
same as for the mode LOAD (0).
3) I could compile the entire OpenJdk 7 without problem, but when I
try to compile only the awt part, it fails with the error message in
the attached file (error.log).
My compile variables are set as follows:
I Hope this is all clear and this is probably the longest e-mail you
will receive from me! ;-)
Costantino from Stuttgart
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4746 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20100110/910f69f9/attachment.obj
More information about the swing-dev