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: Federico Mena Quintero <federico@novell.com>
This commit is contained in:
Federico Mena Quintero 2009-09-03 12:09:09 -05:00 committed by Benjamin Otte
parent 6166fccf30
commit 04c78019fb

View File

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