[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: gtk peer fix

Kaffe CVS cvs-commits at kaffe.org
Mon Feb 14 10:47:54 PST 2005


PatchSet 5536 
Date: 2005/02/14 18:39:57
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: gtk peer fix

2005-02-14  Dalibor Topic  <robilad at kaffe.org>

        Resynced with GNU Classpath.

        2005-02-11  Thomas Fitzsimmons  <fitzsim at redhat.com>

        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c (create):
        Use GTK's built-in file system backend.  Use GTK_RESPONSE_ACCEPT.
        (handle_response): Use GTK_RESPONSE_ACCEPT.

Members: 
	ChangeLog:1.3580->1.3581 
	libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c:1.9->1.10 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3580 kaffe/ChangeLog:1.3581
--- kaffe/ChangeLog:1.3580	Mon Feb 14 13:48:34 2005
+++ kaffe/ChangeLog	Mon Feb 14 18:39:57 2005
@@ -2,6 +2,16 @@
 
 	Resynced with GNU Classpath.
 
+	2005-02-11  Thomas Fitzsimmons  <fitzsim at redhat.com>
+
+        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c (create):
+        Use GTK's built-in file system backend.  Use GTK_RESPONSE_ACCEPT.
+        (handle_response): Use GTK_RESPONSE_ACCEPT.
+
+2005-02-14  Dalibor Topic  <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+
 	2005-02-10  Michael Koch  <konqueror at gmx.de>
 
         * configure.ac: Define GTK_CAIRO in config.h
Index: kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
diff -u kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c:1.9 kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c:1.10
--- kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c:1.9	Sat Jan 22 18:25:02 2005
+++ kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c	Mon Feb 14 18:40:00 2005
@@ -62,15 +62,17 @@
 
   gdk_threads_enter ();
   
-  widget = gtk_file_chooser_dialog_new("",
-                                       GTK_WINDOW(parentp),
-                                       GTK_FILE_CHOOSER_ACTION_OPEN,
-                                       GTK_STOCK_OK, GTK_RESPONSE_OK,
-                                       GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                       NULL);
-
-  /* GtkFileChooser doesn't show hidden files by default. */
-  g_object_set(GTK_FILE_CHOOSER(widget), "show_hidden", TRUE);
+  /* FIXME: we should be using the default gnome-vfs backend but it is
+     not currently thread-safe.  See:
+     http://bugzilla.gnome.org/show_bug.cgi?id=166852 */
+  widget = gtk_file_chooser_dialog_new_with_backend
+    ("Open File",
+     GTK_WINDOW(parentp),
+     GTK_FILE_CHOOSER_ACTION_OPEN,
+     "gtk+",
+     GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+     GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+     NULL);
 
   /* GtkFileSelect is not modal by default */
   gtk_window_set_modal (GTK_WINDOW (widget), TRUE);
@@ -221,7 +223,7 @@
   /* We only need this for the case when the user closed the window,
      or clicked ok or cancel. */
   if (responseId != GTK_RESPONSE_DELETE_EVENT
-      && responseId != GTK_RESPONSE_OK
+      && responseId != GTK_RESPONSE_ACCEPT
       && responseId != GTK_RESPONSE_CANCEL)
     return;
 
@@ -245,7 +247,7 @@
     return;
   }
 
-  if (responseId == GTK_RESPONSE_OK) {
+  if (responseId == GTK_RESPONSE_ACCEPT) {
     fileName = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (GTK_WIDGET (ptr)));
     str_fileName = (*gdk_env())->NewStringUTF (gdk_env(), fileName);
   }



More information about the kaffe mailing list