mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-13 04:10:13 +00:00
filefilter: Fix an embarrassing oversight
I forgot to remove some dead code, and left the pixbuf_formats list in the rule union. Oops.
This commit is contained in:
parent
6267c8469b
commit
acad5e4e3d
@ -110,7 +110,6 @@ struct _FilterRule
|
||||
union {
|
||||
char *pattern;
|
||||
char **content_types;
|
||||
GSList *pixbuf_formats;
|
||||
} u;
|
||||
};
|
||||
|
||||
@ -847,36 +846,6 @@ gtk_file_filter_match (GtkFilter *filter,
|
||||
}
|
||||
break;
|
||||
|
||||
{
|
||||
const char *filter_content_type;
|
||||
|
||||
filter_content_type = g_file_info_get_content_type (info);
|
||||
if (filter_content_type)
|
||||
{
|
||||
GSList *list;
|
||||
|
||||
for (list = rule->u.pixbuf_formats; list; list = list->next)
|
||||
{
|
||||
int i;
|
||||
char **mime_types;
|
||||
|
||||
mime_types = gdk_pixbuf_format_get_mime_types (list->data);
|
||||
|
||||
for (i = 0; mime_types[i] != NULL; i++)
|
||||
{
|
||||
if (strcmp (mime_types[i], filter_content_type) == 0)
|
||||
{
|
||||
g_strfreev (mime_types);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
g_strfreev (mime_types);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user