Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.8296.2.38
diff -u -p -r1.8296.2.38 ChangeLog
--- ChangeLog	16 Sep 2006 05:12:30 -0000	1.8296.2.38
+++ ChangeLog	16 Sep 2006 16:29:37 -0000
@@ -1,3 +1,9 @@
+2006-09-16  Dennis Cranston  <dennis_cranston@yahoo.com>
+
+	* gtk/gtkfilechooserbutton.c: (bookmark_filter),
+	(gtk_file_chooser_button_constructor), (fs_bookmarks_changed_cb):
+	When in "local only" mode remove non local bookmarks.
+
 2006-09-16  Matthias Clasen  <mclasen@redhat.com>
 
 	* gtk/gtkcombobox.c (gtk_combo_box_finalize): Unref the
Index: gtk/gtkfilechooserbutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfilechooserbutton.c,v
retrieving revision 1.52.2.2
diff -u -p -r1.52.2.2 gtkfilechooserbutton.c
--- gtk/gtkfilechooserbutton.c	11 Sep 2006 02:33:57 -0000	1.52.2.2
+++ gtk/gtkfilechooserbutton.c	16 Sep 2006 16:29:38 -0000
@@ -601,6 +601,33 @@ gtk_file_chooser_button_remove_shortcut_
   return retval;
 }
 
+GSList *
+bookmark_filter (GtkFileChooserButton *button,
+                 GSList               *bookmarks)
+{
+  GtkFileChooserButtonPrivate *priv = button->priv;
+  GSList *new_bookmarks;
+  gboolean local_only;
+  
+  local_only = gtk_file_chooser_get_local_only (GTK_FILE_CHOOSER (priv->dialog));
+
+  if (!local_only)
+    return bookmarks;
+
+  new_bookmarks = bookmarks;
+  
+  do
+    {
+      if (!gtk_file_system_path_is_local (priv->fs, bookmarks->data))
+        {
+          new_bookmarks = g_slist_remove (new_bookmarks, bookmarks->data);
+        }
+      bookmarks = bookmarks->next;
+    }
+  while (bookmarks);
+
+  return new_bookmarks;
+}
 
 /* ******************* *
  *  GObject Functions  *
@@ -698,7 +725,7 @@ gtk_file_chooser_button_constructor (GTy
   model_add_volumes (button, list);
   g_slist_free (list);
 
-  list = gtk_file_system_list_bookmarks (priv->fs);
+  list = bookmark_filter (button, gtk_file_system_list_bookmarks (priv->fs));
   model_add_bookmarks (button, list);
   gtk_file_paths_free (list);
 
@@ -2244,7 +2271,7 @@ fs_bookmarks_changed_cb (GtkFileSystem *
   GtkFileChooserButtonPrivate *priv = button->priv;
   GSList *bookmarks;
 
-  bookmarks = gtk_file_system_list_bookmarks (fs);
+  bookmarks = bookmark_filter (button, gtk_file_system_list_bookmarks (fs));
   if (!bookmarks)
     {
       model_remove_rows (user_data,
