Commit 04c78019 authored by Federico Mena Quintero's avatar Federico Mena Quintero Committed by Benjamin Otte

Remove obsolete code to use a cached mime-type

The non-standard "filechooser::mime-type" was a remnant of the recent-files code using
a hand-built GFileInfo; now we just query the file info ourselves.
Signed-off-by: default avatarFederico Mena Quintero <federico@novell.com>
parent 6166fccf
......@@ -292,22 +292,16 @@ node_should_be_visible (GtkFileSystemModel *model, guint id)
if (required & GTK_FILE_FILTER_MIME_TYPE)
{
filter_info.mime_type = g_file_info_get_attribute_string (node->info, "filechooser::mime-type");
if (filter_info.mime_type != NULL)
filter_info.contains |= GTK_FILE_FILTER_MIME_TYPE;
else
{
const char *s = g_file_info_get_content_type (node->info);
if (s)
{
mime_type = g_content_type_get_mime_type (s);
if (mime_type)
{
filter_info.mime_type = mime_type;
filter_info.contains |= GTK_FILE_FILTER_MIME_TYPE;
}
}
}
const char *s = g_file_info_get_content_type (node->info);
if (s)
{
mime_type = g_content_type_get_mime_type (s);
if (mime_type)
{
filter_info.mime_type = mime_type;
filter_info.contains |= GTK_FILE_FILTER_MIME_TYPE;
}
}
}
if (required & GTK_FILE_FILTER_FILENAME)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment