Hello Anthony, 2010/1/22 Anthony Petrov <[email protected]>: > Since you're working on an AWT fix, I suggest using the awt repository. The > following command does the job for me: > > $ hg clone http://hg.openjdk.java.net/jdk7/awt/jdk
Yes! After cloning the awt repository (instead of the tl) I could finally make an incremental build with success! Maybe somebody should document it a little bit better on the OpenJdk website. Anyway thanks a lot! In this new patch I put into practice your previous comments: * GtkFileDialogPeer extends XDialogPeer and implements FileDialogPeer instead of extending XFileDialogPeer * Limited visibility to private when necessary * setVisible(false) hide the dialog if called in different thread. * Code formatted according C and Sun java convention (with line width 80 columns) * java_vm renamed to jvm * Function env() replaced by JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); * Callbacks methods IDs cached in static variables (filenameFilterCallbackMethodID, setFileInternalMethodID) * Check if GTK+ >= 2.4 before invoking gtk_file_chooser_load() or in XToolkit#createFileDialog(.) Then I solved also the remaining problems: * The dialog peer is disposed on close (I should also dispose the original FileDialog) * The shortcut "Search" is available: I dynamically load also the library "libgthread-2.0.so" I also added to the UNIXToolkit a method to check the GTK+ Version. It's used to enable the new FileDialog only when GTK+ >= 2.4 and it may be also useful for the GTK L&F (for example from GTK 2.18 the most buttons have no icon). I've extensively manually tested the new FileDialog and haven't found any bug: I think this patch is quit "production-ready". I'm looking forward to hearing you feedback! Best Regards, Costantino
b6913179-2.patch
Description: Binary data
