mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Implement g_content_type_is_mime_type() (clone of win32's)
Add missing function, copying from gcontenttype-win32.c per Patrick Griffis (Comment #55 of bug report) https://bugzilla.gnome.org/show_bug.cgi?id=734946
This commit is contained in:
parent
ecc27a0cba
commit
ea586b47a3
@ -132,6 +132,23 @@ g_content_type_is_a (const gchar *ctype,
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_content_type_is_mime_type (const gchar *type,
|
||||
const gchar *mime_type)
|
||||
{
|
||||
gchar *content_type;
|
||||
gboolean ret;
|
||||
|
||||
g_return_val_if_fail (type != NULL, FALSE);
|
||||
g_return_val_if_fail (mime_type != NULL, FALSE);
|
||||
|
||||
content_type = g_content_type_from_mime_type (mime_type);
|
||||
ret = g_content_type_is_a (type, content_type);
|
||||
g_free (content_type);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_content_type_is_unknown (const gchar *type)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user