0c72c81ca0d45c55b9053d0cfe4e90eeedc71d77
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index c5bf577..3814f5e 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -5275,6 +5275,9 @@ set_local_only (GtkFileChooserDefault *impl,
   if (local_only != impl->local_only)
     {
       impl->local_only = local_only;
+      _gtk_file_chooser_entry_set_local_only (GTK_FILE_CHOOSER_ENTRY (impl->location_entry),
+                                              local_only);
+
 
       if (impl->shortcuts_model && impl->file_system)
 	{
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index 0db1b53..941c4fd 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -79,6 +79,7 @@ struct _GtkFileChooserEntry
   guint has_completion : 1;
   guint in_change      : 1;
   guint eat_tabs       : 1;
+  guint local_only     : 1;
 };
 
 enum
@@ -194,6 +195,8 @@ _gtk_file_chooser_entry_init (GtkFileChooserEntry *chooser_entry)
   GtkEntryCompletion *comp;
   GtkCellRenderer *cell;
 
+  chooser_entry->local_only = TRUE;
+
   g_object_set (chooser_entry, "truncate-multiline", TRUE, NULL);
 
   comp = gtk_entry_completion_new ();
@@ -1123,6 +1126,16 @@ start_explicit_completion (GtkFileChooserEntry *chooser_entry)
       return;
     }
 
+  if (chooser_entry->local_only &&
+      !g_file_is_native (chooser_entry->current_folder_file))
+    {
+      beep (chooser_entry);
+      pop_up_completion_feedback (chooser_entry, _("Only local paths can be selected"));
+
+      chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
+      return;
+    }
+
   if (chooser_entry->current_folder
       && _gtk_folder_is_finished_loading (chooser_entry->current_folder))
     {
@@ -1382,6 +1395,10 @@ start_loading_current_folder (GtkFileChooserEntry *chooser_entry)
       chooser_entry->file_system == NULL)
     return;
 
+  if (chooser_entry->local_only &&
+      !g_file_is_native (chooser_entry->current_folder_file))
+    return;
+
   g_assert (chooser_entry->current_folder == NULL);
   g_assert (chooser_entry->load_folder_cancellable == NULL);
 
@@ -1842,3 +1859,16 @@ _gtk_file_chooser_entry_select_filename (GtkFileChooserEntry *chooser_entry)
   gtk_editable_select_region (GTK_EDITABLE (chooser_entry), 0, (gint) len);
 }
 
+void
+_gtk_file_chooser_entry_set_local_only (GtkFileChooserEntry *chooser_entry,
+                                        gboolean             local_only)
+{
+  chooser_entry->local_only = local_only;
+  clear_completions (chooser_entry);
+}
+
+gboolean
+_gtk_file_chooser_entry_get_local_only (GtkFileChooserEntry *chooser_entry)
+{
+  return chooser_entry->local_only;
+}
diff --git a/gtk/gtkfilechooserentry.h b/gtk/gtkfilechooserentry.h
index 2818fd9..125e57e 100644
--- a/gtk/gtkfilechooserentry.h
+++ b/gtk/gtkfilechooserentry.h
@@ -49,6 +49,10 @@ gboolean           _gtk_file_chooser_entry_get_is_folder      (GtkFileChooserEnt
 							       GFile               *file);
 void               _gtk_file_chooser_entry_select_filename    (GtkFileChooserEntry *chooser_entry);
 
+void               _gtk_file_chooser_entry_set_local_only     (GtkFileChooserEntry *chooser_entry,
+                                                               gboolean             local_only);
+gboolean           _gtk_file_chooser_entry_get_local_only     (GtkFileChooserEntry *chooser_entry);
+
 G_END_DECLS
 
 #endif /* __GTK_FILE_CHOOSER_ENTRY_H__ */
