[gtk/file-filter2: 6/7] Drop gtk_file_filter_filter
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/file-filter2: 6/7] Drop gtk_file_filter_filter
- Date: Sun, 5 Jul 2020 18:47:09 +0000 (UTC)
commit a777931213af2d6c289f00d93bc78811246d9f40
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 | 28 +++++-----------------------
gtk/gtkfilefilter.h | 3 ---
gtk/gtkfilesystemmodel.c | 1 +
5 files changed, 7 insertions(+), 27 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index a2abcab1fb..5edc931771 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -1420,7 +1420,6 @@ gtk_file_filter_add_mime_type
gtk_file_filter_add_pattern
gtk_file_filter_add_pixbuf_formats
gtk_file_filter_get_attributes
-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 1de37269ad..786291ac67 100644
--- a/gtk/gtkfilefilter.c
+++ b/gtk/gtkfilefilter.c
@@ -765,32 +765,14 @@ 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 = filter->rules; tmp_list; tmp_list = tmp_list->next)
+ 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 853c838fb4..1adc1139d7 100644
--- a/gtk/gtkfilefilter.h
+++ b/gtk/gtkfilefilter.h
@@ -56,9 +56,6 @@ void gtk_file_filter_add_pixbuf_formats (GtkFileFilter *filter);
GDK_AVAILABLE_IN_ALL
const char ** gtk_file_filter_get_attributes (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]