OSX: Use xdgmime system to guess content type from data

Closes: Bug #788401

The problem is described here:

https://bugzilla.gnome.org/show_bug.cgi?id=788401

This patch introduces the use of the xdgmime system to guess
the content type from data. So you can guess for example the
type public.svg-image from the file content of a svg file.
This patch only applies to MacOS. A test for the regression
is also included.
This commit is contained in:
Friedrich Beckmann
2017-10-11 15:59:16 +02:00
committed by Philip Withnall
parent 13c6d9fedf
commit e55efa35e3
3 changed files with 45 additions and 8 deletions

View File

@@ -3,10 +3,8 @@ include $(top_srcdir)/glib.mk
SUBDIRS = gdbus-2.0/codegen
if OS_UNIX
if !OS_COCOA
SUBDIRS += xdgmime
endif
endif
if OS_WIN32_AND_DLL_COMPILATION
if MS_LIB_AVAILABLE
@@ -262,10 +260,9 @@ SUBDIRS += fam
endif
if OS_UNIX
if !OS_COCOA
platform_libadd += xdgmime/libxdgmime.la
platform_deps += xdgmime/libxdgmime.la
if !OS_COCOA
appinfo_headers += gdesktopappinfo.h
endif