Drop gtk_file_filter_filter

It has been superseded by gtk_filter_match.
This commit is contained in:
Matthias Clasen 2020-07-04 11:06:36 -04:00
parent 35988d659d
commit 11dd602b28
5 changed files with 7 additions and 27 deletions

View File

@ -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

View File

@ -33,6 +33,7 @@
#include "gtkintl.h"
#include "gtkmarshalers.h"
#include "gtkfilefilterprivate.h"
#include "gtkfilter.h"
#include "gtkeventcontrollerfocus.h"
typedef struct _GtkFileChooserEntryClass GtkFileChooserEntryClass;

View File

@ -768,32 +768,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;

View File

@ -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);

View File

@ -29,6 +29,7 @@
#include "gtktreedatalist.h"
#include "gtktreednd.h"
#include "gtktreemodel.h"
#include "gtkfilter.h"
/*** Structure: how GtkFileSystemModel works
*