Index: gtk/gtkfilechooserdefault.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfilechooserdefault.c,v
retrieving revision 1.282.2.8
diff -u -r1.282.2.8 gtkfilechooserdefault.c
--- gtk/gtkfilechooserdefault.c	7 Nov 2005 20:30:17 -0000	1.282.2.8
+++ gtk/gtkfilechooserdefault.c	9 Nov 2005 14:11:47 -0000
@@ -488,6 +488,7 @@
 
 static void path_bar_clicked           (GtkPathBar            *path_bar,
 					GtkFilePath           *file_path,
+					GtkFilePath	      *child_path,
 					gboolean               child_is_hidden,
 					GtkFileChooserDefault *impl);
 
@@ -6929,6 +6930,7 @@
 static void
 path_bar_clicked (GtkPathBar            *path_bar,
 		  GtkFilePath           *file_path,
+		  GtkFilePath		*child_path,
 		  gboolean               child_is_hidden,
 		  GtkFileChooserDefault *impl)
 {
@@ -6941,6 +6943,18 @@
    */
   if (child_is_hidden)
     g_object_set (impl, "show-hidden", TRUE, NULL);
+    
+  /* Say we have "/foo/bar/baz" and the user clicks on "bar". We should then
+   * focus the "baz" entry in the files list - the reason for this is that
+   * if user furst changed to /foo/bar/baz from /foo/bar unintentionally instead
+   * of /foo/bar/baz1, it will take quite some time to scroll to baz1 in the file
+   * list, especially if this directory contains lots of folders
+   */
+  if (child_path != NULL)
+    {
+      gtk_file_chooser_default_select_path (impl, child_path, NULL);
+      browse_files_center_selected_row (impl);
+    }
 }
 
 static const GtkFileInfo *
Index: gtk/gtkmarshalers.list
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkmarshalers.list,v
retrieving revision 1.61
diff -u -r1.61 gtkmarshalers.list
--- gtk/gtkmarshalers.list	15 Jul 2005 04:55:56 -0000	1.61
+++ gtk/gtkmarshalers.list	9 Nov 2005 14:11:47 -0000
@@ -88,6 +88,7 @@
 VOID:POINTER
 VOID:POINTER,INT
 VOID:POINTER,BOOLEAN
+VOID:POINTER,POINTER,BOOLEAN
 VOID:POINTER,POINTER,POINTER
 VOID:POINTER,UINT
 VOID:STRING
Index: gtk/gtkpathbar.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkpathbar.c,v
retrieving revision 1.42.2.2
diff -u -r1.42.2.2 gtkpathbar.c
--- gtk/gtkpathbar.c	7 Nov 2005 20:02:18 -0000	1.42.2.2
+++ gtk/gtkpathbar.c	9 Nov 2005 14:11:47 -0000
@@ -193,8 +193,9 @@
 		  G_SIGNAL_RUN_FIRST,
 		  G_STRUCT_OFFSET (GtkPathBarClass, path_clicked),
 		  NULL, NULL,
-		  _gtk_marshal_VOID__POINTER_BOOLEAN,
-		  G_TYPE_NONE, 2,
+		  _gtk_marshal_VOID__POINTER_POINTER_BOOLEAN,
+		  G_TYPE_NONE, 3,
+		  G_TYPE_POINTER,
 		  G_TYPE_POINTER,
 		  G_TYPE_BOOLEAN);
 }
@@ -944,17 +945,23 @@
 
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
 
+  GtkFilePath *child_path;
   if (button_list->prev)
     {
       ButtonData *child_data;
 
       child_data = BUTTON_DATA (button_list->prev->data);
+      child_path = child_data->path;
       child_is_hidden = child_data->file_is_hidden;
     }
   else
-    child_is_hidden = FALSE;
+    {
+      child_path = NULL;
+      child_is_hidden = FALSE;
+    }
 
-  g_signal_emit (path_bar, path_bar_signals [PATH_CLICKED], 0, button_data->path, child_is_hidden);
+  g_signal_emit (path_bar, path_bar_signals [PATH_CLICKED], 0,
+		 button_data->path, child_path, child_is_hidden);
 }
 
 static GdkPixbuf *
Index: gtk/gtkpathbar.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkpathbar.h,v
retrieving revision 1.16.2.1
diff -u -r1.16.2.1 gtkpathbar.h
--- gtk/gtkpathbar.h	7 Nov 2005 20:02:18 -0000	1.16.2.1
+++ gtk/gtkpathbar.h	9 Nov 2005 14:11:47 -0000
@@ -72,6 +72,7 @@
 
   void (* path_clicked) (GtkPathBar  *path_bar,
 			 GtkFilePath *file_path,
+			 GtkFilePath *child_path,
 			 gboolean     child_is_hidden);
 };
 
