Index: gtk/gtkfilechooserdefault.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfilechooserdefault.c,v
retrieving revision 1.171
diff -u -r1.171 gtkfilechooserdefault.c
--- gtk/gtkfilechooserdefault.c	4 May 2004 17:53:13 -0000	1.171
+++ gtk/gtkfilechooserdefault.c	15 May 2004 14:47:23 -0000
@@ -2709,10 +2709,35 @@
 			    GdkEventButton        *event,
 			    GtkFileChooserDefault *impl)
 {
-  if (event->button != 3)
+  GtkTreePath *path;
+  GtkTreeViewColumn *column;
+  GtkTreeSelection *selection;
+  GtkSettings *settings;
+  gboolean single_click_activate;
+
+  if (event->button != 1 &&
+      event->button != 3)
     return FALSE;
 
-  file_list_popup_menu (impl, event);
+  if (event->button == 3)
+    file_list_popup_menu (impl, event);
+  else {
+    settings = gtk_widget_get_settings (GTK_WIDGET (widget));
+    g_object_get (settings, "gtk-file-single-click-activate", &single_click_activate, NULL);
+
+    if (!single_click_activate ||
+	!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (impl->browse_files_tree_view),
+			  		event->x, event->y, &path, &column, NULL, NULL))
+      return FALSE;
+
+    selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view));
+    gtk_tree_selection_select_path (selection, path);
+
+    gtk_tree_view_row_activated (GTK_TREE_VIEW (impl->browse_files_tree_view), path, column);
+
+    gtk_tree_path_free (path);
+  }
+
   return TRUE;
 }
 
