[evince/wip/hadess/app-provided-pixbuf-loader: 1/2] libdocument: Load application-specific gdk-pixbuf loaders



commit b931ddbff99118e600643483ec468f26c81bd511
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Feb 28 14:52:37 2019 +0100

    libdocument: Load application-specific gdk-pixbuf loaders
    
    Use a new gdk-pixbuf feature to integrate application-provided
    gdk-pixbuf loaders.
    
    This makes it easy to include non-standard loaders without touching the
    system installation.
    
    See https://gitlab.gnome.org/GNOME/gdk-pixbuf/merge_requests/34

 libdocument/ev-init.c | 1 +
 meson.build           | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/libdocument/ev-init.c b/libdocument/ev-init.c
index ac1901ce..56c47828 100644
--- a/libdocument/ev-init.c
+++ b/libdocument/ev-init.c
@@ -114,6 +114,7 @@ ev_init (void)
        bindtextdomain (GETTEXT_PACKAGE, ev_get_locale_dir ());
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
+        gdk_pixbuf_init_modules (EXTRA_GDK_PIXBUF_LOADERS_DIR, NULL);
         _ev_debug_init ();
         _ev_file_helpers_init ();
         have_backends = _ev_document_factory_init ();
diff --git a/meson.build b/meson.build
index de7e1c13..024e674f 100644
--- a/meson.build
+++ b/meson.build
@@ -140,7 +140,9 @@ top_inc = include_directories('.')
 glib_req_version = '>= 2.36.0'
 gtk_req_version = '>= 3.22.0'
 
-gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.36.5')
+gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.39.1')
+config_h.set_quoted('EXTRA_GDK_PIXBUF_LOADERS_DIR',
+                    join_paths (ev_libdir, ev_name, 'gdk-pixbuf', 
gdk_pixbuf_dep.get_pkgconfig_variable('gdk_pixbuf_binary_version')))
 gio_dep = dependency('gio-2.0', version: glib_req_version)
 glib_dep = dependency('glib-2.0', version: glib_req_version)
 gmodule_dep = dependency('gmodule-2.0')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]