Index: gtk/gtkfilechooserdefault.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfilechooserdefault.c,v
retrieving revision 1.240.2.20
diff -u -p -r1.240.2.20 gtkfilechooserdefault.c
--- gtk/gtkfilechooserdefault.c	23 May 2005 17:02:04 -0000	1.240.2.20
+++ gtk/gtkfilechooserdefault.c	26 May 2005 11:36:44 -0000
@@ -5436,6 +5436,8 @@ gtk_file_chooser_default_should_respond 
   GtkWidget *toplevel;
   GtkWidget *current_focus;
 
+  g_printerr ("gtk_file_chooser_default_should_respond()\n");
+
   impl = GTK_FILE_CHOOSER_DEFAULT (chooser_embed);
 
   toplevel = gtk_widget_get_toplevel (GTK_WIDGET (impl));
@@ -6304,7 +6306,6 @@ location_popup_handler (GtkFileChooserDe
   GtkWidget *hbox;
   GtkWidget *label;
   GtkWidget *entry;
-  gboolean refocus;
   const char *title;
   const char *accept_stock;
 
@@ -6364,11 +6365,10 @@ location_popup_handler (GtkFileChooserDe
   if (path[0])
     gtk_editable_select_region (GTK_EDITABLE (entry), -1, -1);
 
-  refocus = TRUE;
-
   if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
     {
-      if (update_from_entry (impl, GTK_WINDOW (dialog), GTK_FILE_CHOOSER_ENTRY (entry)))
+      if (update_from_entry (impl, GTK_WINDOW (dialog),
+                             GTK_FILE_CHOOSER_ENTRY (entry)))
 	{
 	  if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN
 	      || impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
@@ -6381,18 +6381,18 @@ location_popup_handler (GtkFileChooserDe
 			|| impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER);
 	      gtk_widget_grab_focus (impl->save_file_name_entry);
 	    }
-	  refocus = FALSE;
-	}
-    }
 
-  if (refocus)
-    {
-      GtkWindow *toplevel;
+          gtk_widget_destroy (dialog);
+
+          g_printerr ("activating the file\n");
+          g_signal_emit_by_name (impl, "file-activated");
 
-      toplevel = get_toplevel (GTK_WIDGET (impl));
-      if (toplevel && toplevel->focus_widget)
-	gtk_widget_grab_focus (toplevel->focus_widget);
+          return;
+	}
     }
+
+  if (toplevel && toplevel->focus_widget)
+    gtk_widget_grab_focus (toplevel->focus_widget);
 
   gtk_widget_destroy (dialog);
 }
Index: gtk/gtkfilechooserdialog.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfilechooserdialog.c,v
retrieving revision 1.29.2.2
diff -u -p -r1.29.2.2 gtkfilechooserdialog.c
--- gtk/gtkfilechooserdialog.c	20 Mar 2005 06:25:27 -0000	1.29.2.2
+++ gtk/gtkfilechooserdialog.c	26 May 2005 11:36:45 -0000
@@ -169,9 +169,13 @@ file_chooser_widget_file_activated (GtkF
 {
   GList *children, *l;
 
+  g_printerr ("file_chooser_widget_file_activated\n");
+
   if (gtk_window_activate_default (GTK_WINDOW (dialog)))
     return;
 
+  g_printerr ("gtk_window_activate_default() didn't do the trick\n");
+
   /* There probably isn't a default widget, so make things easier for the
    * programmer by looking for a reasonable button on our own.
    */
@@ -553,6 +557,8 @@ response_cb (GtkDialog *dialog,
   GtkFileChooserDialogPrivate *priv;
 
   priv = GTK_FILE_CHOOSER_DIALOG_GET_PRIVATE (dialog);
+
+  g_printerr ("response_cb(%d)\n", response_id);
 
   /* Act only on response IDs we recognize */
   if (!(response_id == GTK_RESPONSE_ACCEPT
