[gtk/file-filter2: 4/5] Drop gtk_file_filter_filter



commit 57646e6cbbfa9937378d21d796c7178d6a6c8682
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jul 4 11:06:36 2020 -0400

    Drop gtk_file_filter_filter
    
    It has been superseded by gtk_filter_match.

 docs/reference/gtk/gtk4-sections.txt |  1 -
 gtk/gtkfilechooserentry.c            |  1 +
 gtk/gtkfilefilter.c                  | 26 ++++----------------------
 gtk/gtkfilefilter.h                  |  3 ---
 gtk/gtkfilesystemmodel.c             |  1 +
 5 files changed, 6 insertions(+), 26 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index cb914a7703..54701c355e 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -1423,7 +1423,6 @@ gtk_file_filter_add_pattern
 gtk_file_filter_add_pixbuf_formats
 gtk_file_filter_add_custom
 gtk_file_filter_get_needed
-gtk_file_filter_filter
 
 <SUBSECTION Serialization>
 gtk_file_filter_new_from_gvariant
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index 28bba7de32..695d3db352 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -33,6 +33,7 @@
 #include "gtkintl.h"
 #include "gtkmarshalers.h"
 #include "gtkfilefilterprivate.h"
+#include "gtkfilter.h"
 #include "gtkeventcontrollerfocus.h"
 
 typedef struct _GtkFileChooserEntryClass GtkFileChooserEntryClass;
diff --git a/gtk/gtkfilefilter.c b/gtk/gtkfilefilter.c
index 8e0fe85927..3b73316e52 100644
--- a/gtk/gtkfilefilter.c
+++ b/gtk/gtkfilefilter.c
@@ -803,31 +803,13 @@ static gboolean
 gtk_file_filter_match (GtkFilter *filter,
                        gpointer   item)
 {
+  GtkFileFilter *file_filter = GTK_FILE_FILTER (filter);
+  GFileInfo *info = item;
+  GSList *tmp_list;
+
   if (!G_IS_FILE_INFO (item))
     return TRUE;
 
-  return gtk_file_filter_filter (GTK_FILE_FILTER (filter), G_FILE_INFO (item));
-}
-
-/**
- * gtk_file_filter_filter:
- * @filter: a #GtkFileFilter
- * @info: the #GFileInfo to filter
- *
- * Tests whether a file should be displayed according to @filter.
- *
- * This function will not typically be used by applications; it
- * is intended principally for use in the implementation of
- * #GtkFileChooser.
- *
- * Returns: %TRUE if the file should be displayed
- **/
-gboolean
-gtk_file_filter_filter (GtkFileFilter *filter,
-                        GFileInfo     *info)
-{
-  GSList *tmp_list;
-
   for (tmp_list = file_filter->rules; tmp_list; tmp_list = tmp_list->next)
     {
       FilterRule *rule = tmp_list->data;
diff --git a/gtk/gtkfilefilter.h b/gtk/gtkfilefilter.h
index 0c968e111b..cc2c54ba26 100644
--- a/gtk/gtkfilefilter.h
+++ b/gtk/gtkfilefilter.h
@@ -93,9 +93,6 @@ void gtk_file_filter_add_custom         (GtkFileFilter      *filter,
 
 GDK_AVAILABLE_IN_ALL
 GtkFileFilterFlags gtk_file_filter_get_needed (GtkFileFilter           *filter);
-GDK_AVAILABLE_IN_ALL
-gboolean           gtk_file_filter_filter     (GtkFileFilter           *filter,
-                                               GFileInfo               *info);
 
 GDK_AVAILABLE_IN_ALL
 GVariant      *gtk_file_filter_to_gvariant       (GtkFileFilter *filter);
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index 66454f4255..006cb1252b 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -29,6 +29,7 @@
 #include "gtktreedatalist.h"
 #include "gtktreednd.h"
 #include "gtktreemodel.h"
+#include "gtkfilter.h"
 
 /*** Structure: how GtkFileSystemModel works
  *


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