[gtk/wip/ebassi/filechooser-new: 55/55] Remove GtkFileChooserEntry:local-only



commit e5ef26efa8345aedab1230c58804cddf68113400
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sat Feb 22 15:20:53 2020 +0000

    Remove GtkFileChooserEntry:local-only
    
    We don't use it any more in GtkFileChooserWidget.

 gtk/gtkfilechooserentry.c  | 22 ----------------------
 gtk/gtkfilechooserentry.h  |  3 ---
 gtk/gtkfilechooserwidget.c |  1 -
 3 files changed, 26 deletions(-)
---
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index 633ccbb4b2..60d6e3bff4 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -64,7 +64,6 @@ struct _GtkFileChooserEntry
   guint complete_on_load : 1;
   guint eat_tabs       : 1;
   guint eat_escape     : 1;
-  guint local_only     : 1;
 };
 
 enum
@@ -273,8 +272,6 @@ _gtk_file_chooser_entry_init (GtkFileChooserEntry *chooser_entry)
   GtkEntryCompletion *comp;
   GtkCellRenderer *cell;
 
-  chooser_entry->local_only = FALSE;
-
   g_object_set (chooser_entry, "truncate-multiline", TRUE, NULL);
 
   comp = gtk_entry_completion_new ();
@@ -692,11 +689,6 @@ set_completion_folder (GtkFileChooserEntry *chooser_entry,
                        GFile               *folder_file,
                       char                *dir_part)
 {
-  if (folder_file &&
-      chooser_entry->local_only
-      && !_gtk_file_has_native_path (folder_file))
-    folder_file = NULL;
-
   if (((chooser_entry->current_folder_file
        && folder_file
        && g_file_equal (folder_file, chooser_entry->current_folder_file))
@@ -1059,20 +1051,6 @@ _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;
-  refresh_current_folder_and_file_part (chooser_entry);
-}
-
-gboolean
-_gtk_file_chooser_entry_get_local_only (GtkFileChooserEntry *chooser_entry)
-{
-  return chooser_entry->local_only;
-}
-
 void
 _gtk_file_chooser_entry_set_file_filter (GtkFileChooserEntry *chooser_entry,
                                          GtkFileFilter       *filter)
diff --git a/gtk/gtkfilechooserentry.h b/gtk/gtkfilechooserentry.h
index 732a87a741..fb6725e9c9 100644
--- a/gtk/gtkfilechooserentry.h
+++ b/gtk/gtkfilechooserentry.h
@@ -43,9 +43,6 @@ const gchar *      _gtk_file_chooser_entry_get_file_part      (GtkFileChooserEnt
 gboolean           _gtk_file_chooser_entry_get_is_folder      (GtkFileChooserEntry *chooser_entry,
                                                               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);
 void               _gtk_file_chooser_entry_set_file_filter    (GtkFileChooserEntry *chooser_entry,
                                                                GtkFileFilter       *filter);
 
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 17d0a7ab54..a6e835c5e0 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -2461,7 +2461,6 @@ location_entry_setup (GtkFileChooserWidget *impl)
   g_signal_connect_swapped (priv->location_entry, "hide-entry",
                             G_CALLBACK (location_entry_close_clicked), impl);
 
-  _gtk_file_chooser_entry_set_local_only (GTK_FILE_CHOOSER_ENTRY (priv->location_entry), FALSE);
   _gtk_file_chooser_entry_set_action (GTK_FILE_CHOOSER_ENTRY (priv->location_entry), priv->action);
   _gtk_file_chooser_entry_set_file_filter (GTK_FILE_CHOOSER_ENTRY (priv->location_entry),
                                            priv->current_filter);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]