summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--NEWS42
-rw-r--r--backend/comics/meson.build49
-rw-r--r--backend/djvu/meson.build36
-rw-r--r--backend/dvi/mdvi-lib/meson.build67
-rw-r--r--backend/dvi/meson.build41
-rw-r--r--backend/epub/meson.build35
-rw-r--r--backend/epub/minizip/meson.build21
-rw-r--r--backend/meson.build5
-rw-r--r--backend/pdf/meson.build30
-rw-r--r--backend/pixbuf/meson.build30
-rw-r--r--backend/ps/meson.build31
-rw-r--r--backend/tiff/meson.build34
-rw-r--r--backend/xps/meson.build31
-rw-r--r--configure.ac4
-rw-r--r--cut-n-paste/toolbar-editor/meson.build98
-rw-r--r--cut-n-paste/zoom-control/meson.build28
-rw-r--r--data/icons/meson.build73
-rw-r--r--data/meson.build57
-rw-r--r--help/es/es.po2
-rw-r--r--help/fr/fr.po7
-rw-r--r--help/meson.build35
-rw-r--r--help/pl/pl.po2
-rw-r--r--help/pt_BR/pt_BR.po13
-rw-r--r--help/reference/libdocument/meson.build30
-rw-r--r--help/reference/libview/meson.build31
-rw-r--r--help/reference/shell/meson.build31
-rw-r--r--install-scripts/meson.build21
-rw-r--r--install-scripts/meson_install_schemas.py10
-rw-r--r--install-scripts/meson_update_icon_cache.py10
-rw-r--r--install-scripts/meson_update_mime_database.py10
-rw-r--r--libdocument/meson.build172
-rw-r--r--libmisc/meson.build28
-rw-r--r--libview/ev-document-model.c2
-rw-r--r--libview/ev-jobs.c122
-rw-r--r--libview/meson.build122
-rw-r--r--meson.build360
-rw-r--r--meson_options.txt111
-rw-r--r--po/eo.po2
-rw-r--r--po/es.po2
-rw-r--r--po/fr.po6
-rw-r--r--po/kab.po9
-rw-r--r--po/meson.build3
-rw-r--r--po/nan.po4
-rw-r--r--po/nds.po8
-rw-r--r--po/pl.po2
-rw-r--r--po/uk.po4
-rw-r--r--previewer/meson.build34
-rw-r--r--properties/meson.build20
-rw-r--r--shell/ev-application.c14
-rw-r--r--shell/ev-open-recent-action.c4
-rw-r--r--shell/ev-sidebar-thumbnails.c6
-rw-r--r--shell/ev-window.c11
-rw-r--r--shell/meson.build168
-rw-r--r--subprojects/mate-submodules.wrap12
-rw-r--r--test/meson.build25
-rwxr-xr-xtest/testBookmarksMenu.py24
-rw-r--r--test/testCommon.py26
-rwxr-xr-xtest/testEditMenu.py51
-rwxr-xr-xtest/testEncryptedFile.py33
-rwxr-xr-xtest/testFileMenu.py45
-rwxr-xr-xtest/testFileReloading.py27
-rwxr-xr-xtest/testGoMenu.py30
-rwxr-xr-xtest/testHelpMenu.py28
-rwxr-xr-xtest/testWrongFileExtension.py18
-rwxr-xr-xtest/testZoom.py26
-rw-r--r--thumbnailer/meson.build33
67 files changed, 2351 insertions, 157 deletions
diff --git a/.travis.yml b/.travis.yml
index ea4fbcfe..c5bacb9c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,7 +50,7 @@ deploy:
- provider: pages
edge:
branch: v2.0.5
- token: $GITHUB_TOKEN
+ github_token: $GITHUB_TOKEN
keep_history: false
committer_from_gh: true
target_branch: gh-pages
diff --git a/NEWS b/NEWS
index 460eb627..32063810 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,45 @@
+### atril 1.28.2
+ * Translations update
+ * epub: Disable thumbnailing sidebar
+ * (meson) fix: rename all backend files
+ * (meson) fix: generate dbus generated with the correct prefix
+ * (meson) fix: building atrild with explicit sources
+ * (meson) fix: building atril target
+ * (meson) fix: shell/meson.build missing files
+ * (meson) fix: correct dependeny on mate-submodules
+ * (meson) fix: properly build cut-n-paste/toolbar-editor
+ * (meson) fix: add missing properties/meson.build
+ * (meson) fix all build errors with meson
+ * (meson) fix more build errors
+ * (meson) fix more build errors
+ * (meson) fix: disable maintainer mode per default
+ * (meson) fix: #error "Only <atril-document.h> can be included directly."
+ * (meson) fix: libdocument! meson automatically adds lib prefix
+ * (meson) chore: clean references to xreader
+ * (meson) chore: add subprojects/mate-submodules.wrap
+ * (meson) fix: remove non existing source in shell
+ * (meson) fix: correct typo missing .in in filename
+ * (meson) fix: use mate-submodules correctly
+ * (meson) chore: fix warnings for meson.build
+ * (meson) chore: pin meson version, add missing ATRIL_MIME_TYPES
+ * (meson) chore: reorganinze meson.build
+ * (meson) chore: add maintainer mode
+ * (meson) chore: remove unused intltool
+ * (meson) meson: make ps and epub optional backends
+ * (meson) Initial support for meson
+ * Fix .cbr mimetype
+ * Wayland: stop segfaults on some systems
+ * replace deprecated gtk_menu_tool_button_new_from_stock
+ * libview/ev-document-model.c remove one more deprecation warning
+ * replace ev_document_model_get_dual_page with
+
+### atril 1.28.1
+ * Translations update
+ * Update CBR library to libarchive in README.md
+ * ci: fix travis build failures caused by recent travis changes
+ * Cleanup icons Makefile
+ * icons: Include higher resolution icons (#608)
+
### atril 1.28.0
* Translations update
diff --git a/backend/comics/meson.build b/backend/comics/meson.build
new file mode 100644
index 00000000..abc2fdc3
--- /dev/null
+++ b/backend/comics/meson.build
@@ -0,0 +1,49 @@
+backend_desktop_conf = configuration_data()
+backend_desktop_conf.set('COMICS_MIME_TYPES', comic_mimetypes)
+
+backend_desktop = configure_file(
+ input: 'comicsdocument.atril-backend.in',
+ output: 'comicsdocument.atril-backend',
+ configuration: backend_desktop_conf,
+ install: true,
+ install_dir: backendsdir,
+)
+
+comics_sources = files(
+ 'comics-document.c',
+ 'ev-archive.c',
+)
+
+comics_deps = [
+ cairo,
+ glib,
+ gtk,
+ libarchive_dep,
+]
+
+shared_module(
+ 'comicsdocument',
+ comics_sources,
+ link_with: [libdocument],
+ link_args: ['-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now'],
+ include_directories: include_dirs,
+ dependencies: comics_deps,
+ install: true,
+ install_dir: backendsdir
+)
+
+
+
+test_name = 'test-ev-archive'
+
+test_sources = files(
+ 'ev-archive.c',
+ 'test-ev-archive.c',
+)
+
+executable(
+ test_name,
+ test_sources,
+ include_directories: include_dirs,
+ dependencies: comics_deps,
+)
diff --git a/backend/djvu/meson.build b/backend/djvu/meson.build
new file mode 100644
index 00000000..011503e3
--- /dev/null
+++ b/backend/djvu/meson.build
@@ -0,0 +1,36 @@
+djvu_sources = [
+ 'djvu-document.c',
+ 'djvu-document.h',
+ 'djvu-document-private.h',
+ 'djvu-links.c',
+ 'djvu-links.h',
+ 'djvu-text-page.c',
+ 'djvu-text-page.h',
+]
+
+djvu_deps = [
+ cairo,
+ djvu,
+ glib,
+ gtk
+]
+
+shared_module(
+ 'djvudocument',
+ djvu_sources,
+ link_with: [libdocument],
+ link_args: ['-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now'],
+ include_directories: include_dirs,
+ dependencies: djvu_deps,
+ install: true,
+ install_dir: backendsdir,
+)
+
+i18n.merge_file(
+ input: 'djvudocument.atril-backend.desktop.in',
+ output: 'djvudocument.atril-backend',
+ type: 'desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: backendsdir,
+)
diff --git a/backend/dvi/mdvi-lib/meson.build b/backend/dvi/mdvi-lib/meson.build
new file mode 100644
index 00000000..6b9848ba
--- /dev/null
+++ b/backend/dvi/mdvi-lib/meson.build
@@ -0,0 +1,67 @@
+mdvi_sources = [
+ 'afmparse.c',
+ 'afmparse.h',
+ 'bitmap.c',
+ 'bitmap.h',
+ 'color.c',
+ 'color.h',
+ 'common.c',
+ 'common.h',
+ 'defaults.h',
+ 'dviopcodes.h',
+ 'dviread.c',
+ 'files.c',
+ 'font.c',
+ 'fontmap.c',
+ 'fontmap.h',
+ 'fontsrch.c',
+ 'gf.c',
+ 'hash.c',
+ 'hash.h',
+ 'list.c',
+ 'mdvi.h',
+ 'pagesel.c',
+ 'paper.c',
+ 'paper.h',
+ 'pk.c',
+ 'private.h',
+ 'setup.c',
+ 'special.c',
+ 'sp-epsf.c',
+ 'sysdeps.h',
+ 't1.c',
+ 'tfm.c',
+ 'tfmfile.c',
+ 'tt.c',
+ 'util.c',
+ 'vf.c',
+]
+
+mdvi_c_args = [
+ '-DSIZEOF_INT=__SIZEOF_INT__',
+ '-DSIZEOF_LONG=__SIZEOF_LONG__',
+ '-DSIZEOF_SHORT=__SIZEOF_SHORT__',
+ '-DSIZEOF_VOID_P=__SIZEOF_POINTER__',
+]
+
+mdvi_deps = [
+ kpathsea,
+]
+
+if t1_enabled
+ mdvi_c_args += '-DWITH_TYPE1_FONTS'
+ mdvi_deps += t1lib
+endif
+
+libmdvi = static_library(
+ 'mdvi',
+ mdvi_sources,
+ c_args: mdvi_c_args,
+ include_directories: include_dirs,
+ dependencies: mdvi_deps,
+)
+
+libmdvi_dep = declare_dependency(
+ include_directories: include_directories('.'),
+ link_with: libmdvi,
+)
diff --git a/backend/dvi/meson.build b/backend/dvi/meson.build
new file mode 100644
index 00000000..8b4d0ed0
--- /dev/null
+++ b/backend/dvi/meson.build
@@ -0,0 +1,41 @@
+subdir('mdvi-lib')
+
+dvi_sources = [
+ 'dvi-document.c',
+ 'dvi-document.h',
+ 'cairo-device.c',
+ 'cairo-device.h',
+ 'fonts.c',
+ 'fonts.h',
+]
+
+dvi_deps = [
+ cairo,
+ glib,
+ gtk,
+ libmdvi_dep,
+ math,
+ spectre,
+ mdvi_deps,
+]
+
+shared_module(
+ 'dvidocument',
+ dvi_sources,
+ link_with: [libdocument],
+ link_whole: libmdvi,
+ c_args: mdvi_c_args,
+ include_directories: include_dirs,
+ dependencies: dvi_deps,
+ install: true,
+ install_dir: backendsdir,
+)
+
+i18n.merge_file(
+ input: 'dvidocument.atril-backend.desktop.in',
+ output: 'dvidocument.atril-backend',
+ type: 'desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: backendsdir,
+)
diff --git a/backend/epub/meson.build b/backend/epub/meson.build
new file mode 100644
index 00000000..7249286b
--- /dev/null
+++ b/backend/epub/meson.build
@@ -0,0 +1,35 @@
+subdir('minizip')
+
+epub_sources = [
+ 'epub-document.c',
+ 'epub-document.h',
+]
+
+epub_deps = [
+ cairo,
+ glib,
+ gtk,
+ xml,
+ minizip_dep,
+]
+
+shared_module(
+ 'epubdocument',
+ epub_sources,
+ link_with: [libdocument],
+ link_whole: minizip,
+ link_args: ['-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now'],
+ include_directories: include_dirs,
+ dependencies: epub_deps,
+ install: true,
+ install_dir: backendsdir,
+)
+
+i18n.merge_file(
+ input: 'epubdocument.atril-backend.desktop.in',
+ output: 'epubdocument.atril-backend',
+ type: 'desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: backendsdir,
+)
diff --git a/backend/epub/minizip/meson.build b/backend/epub/minizip/meson.build
new file mode 100644
index 00000000..838bac4e
--- /dev/null
+++ b/backend/epub/minizip/meson.build
@@ -0,0 +1,21 @@
+minizip_sources = [
+ 'unzip.c',
+ 'ioapi.c',
+ 'unzip.h',
+ 'ioapi.h',
+]
+
+minizip_deps = [
+ zlib
+]
+
+minizip = static_library(
+ 'minizip',
+ minizip_sources,
+ dependencies: minizip_deps,
+)
+
+minizip_dep = declare_dependency(
+ include_directories: include_directories('.'),
+ link_with: minizip,
+)
diff --git a/backend/meson.build b/backend/meson.build
new file mode 100644
index 00000000..ca9108db
--- /dev/null
+++ b/backend/meson.build
@@ -0,0 +1,5 @@
+backendsdir = join_paths(prefix, libdir, meson.project_name(), binary_major_version, 'backends')
+
+foreach sub : backend_subdirs
+ subdir(sub)
+endforeach
diff --git a/backend/pdf/meson.build b/backend/pdf/meson.build
new file mode 100644
index 00000000..2a81d71a
--- /dev/null
+++ b/backend/pdf/meson.build
@@ -0,0 +1,30 @@
+pdf_sources = [
+ 'ev-poppler.cc',
+ 'ev-poppler.h'
+]
+
+pdf_deps = [
+ gtk,
+ xml,
+ poppler,
+]
+
+shared_module(
+ 'pdfdocument',
+ pdf_sources,
+ link_with: [libdocument],
+ link_args: ['-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now'],
+ include_directories: include_dirs,
+ dependencies: pdf_deps,
+ install: true,
+ install_dir: backendsdir,
+)
+
+i18n.merge_file(
+ input: 'pdfdocument.atril-backend.desktop.in',
+ output: 'pdfdocument.atril-backend',
+ type: 'desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: backendsdir,
+)
diff --git a/backend/pixbuf/meson.build b/backend/pixbuf/meson.build
new file mode 100644
index 00000000..68afb36f
--- /dev/null
+++ b/backend/pixbuf/meson.build
@@ -0,0 +1,30 @@
+pixbuf_sources = [
+ 'pixbuf-document.c',
+ 'pixbuf-document.h'
+]
+
+pixbuf_deps = [
+ cairo,
+ glib,
+ gtk,
+]
+
+shared_module(
+ 'pixbufdocument',
+ pixbuf_sources,
+ link_with: [libdocument],
+ link_args: ['-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now'],
+ include_directories: include_dirs,
+ dependencies: pixbuf_deps,
+ install: true,
+ install_dir: backendsdir,
+)
+
+i18n.merge_file(
+ input: 'pixbuf.atril-backend.desktop.in',
+ output: 'pixbuf.atril-backend',
+ type: 'desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: backendsdir,
+)
diff --git a/backend/ps/meson.build b/backend/ps/meson.build
new file mode 100644
index 00000000..ba8ea301
--- /dev/null
+++ b/backend/ps/meson.build
@@ -0,0 +1,31 @@
+ps_sources = [
+ 'ev-spectre.c',
+ 'ev-spectre.h'
+]
+
+ps_deps = [
+ cairo,
+ glib,
+ gtk,
+ spectre,
+]
+
+shared_module(
+ 'psdocument',
+ ps_sources,
+ link_with: [libdocument],
+ link_args: ['-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now'],
+ include_directories: include_dirs,
+ dependencies: ps_deps,
+ install: true,
+ install_dir: backendsdir,
+)
+
+i18n.merge_file(
+ input: 'psdocument.atril-backend.desktop.in',
+ output: 'psdocument.atril-backend',
+ type: 'desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: backendsdir,
+)
diff --git a/backend/tiff/meson.build b/backend/tiff/meson.build
new file mode 100644
index 00000000..04f8f462
--- /dev/null
+++ b/backend/tiff/meson.build
@@ -0,0 +1,34 @@
+tiff_sources = [
+ 'tiff-document.c',
+ 'tiff-document.h',
+ 'tiff2ps.c',
+ 'tiff2ps.h',
+]
+
+tiff_deps = [
+ cairo,
+ glib,
+ gtk,
+ math,
+ tiff,
+]
+
+shared_module(
+ 'tiffdocument',
+ tiff_sources,
+ link_with: [libdocument],
+ link_args: ['-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now'],
+ include_directories: include_dirs,
+ dependencies: tiff_deps,
+ install: true,
+ install_dir: backendsdir,
+)
+
+i18n.merge_file(
+ input: 'tiffdocument.atril-backend.desktop.in',
+ output: 'tiffdocument.atril-backend',
+ type: 'desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: backendsdir,
+)
diff --git a/backend/xps/meson.build b/backend/xps/meson.build
new file mode 100644
index 00000000..3dfc45e0
--- /dev/null
+++ b/backend/xps/meson.build
@@ -0,0 +1,31 @@
+xps_sources = [
+ 'xps-document.c',
+ 'xps-document.h',
+]
+
+xps_deps = [
+ cairo,
+ glib,
+ gtk,
+ xps,
+]
+
+shared_module(
+ 'xpsdocument',
+ xps_sources,
+ link_with: [libdocument],
+ link_args: ['-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now'],
+ include_directories: include_dirs,
+ dependencies: xps_deps,
+ install: true,
+ install_dir: backendsdir,
+)
+
+i18n.merge_file(
+ input: 'xpsdocument.atril-backend.desktop.in',
+ output: 'xpsdocument.atril-backend',
+ type: 'desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: backendsdir,
+)
diff --git a/configure.ac b/configure.ac
index cd734add..65d1c05d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@
m4_define([ev_major_version], [1])
m4_define([ev_minor_version], [28])
-m4_define([ev_micro_version], [0])
+m4_define([ev_micro_version], [2])
m4_define([ev_extra_version], [])
m4_define([ev_version], [ev_major_version.ev_minor_version.ev_micro_version()ev_extra_version])
@@ -664,7 +664,7 @@ if test "x$enable_tiff" = "xyes"; then
ATRIL_MIME_TYPES="${ATRIL_MIME_TYPES}image/tiff;"
fi
if test "x$enable_comics" = "xyes"; then
- ATRIL_MIME_TYPES="${ATRIL_MIME_TYPES}application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt;application/vnd.comicbook+zip;application/vnd-comicbook.rar;"
+ ATRIL_MIME_TYPES="${ATRIL_MIME_TYPES}application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt;application/vnd.comicbook+zip;application/vnd.comicbook-rar;"
fi
if test "x$enable_pixbuf" = "xyes"; then
ATRIL_MIME_TYPES="${ATRIL_MIME_TYPES}image/*;"
diff --git a/cut-n-paste/toolbar-editor/meson.build b/cut-n-paste/toolbar-editor/meson.build
new file mode 100644
index 00000000..fc37a885
--- /dev/null
+++ b/cut-n-paste/toolbar-editor/meson.build
@@ -0,0 +1,98 @@
+glib_genmarshal = find_program('glib-genmarshal')
+glib_mkenums = find_program('glib-mkenums')
+
+eggsources = [
+ 'egg-editable-toolbar.c',
+ 'egg-toolbars-model.c',
+ 'egg-toolbar-editor.c'
+]
+
+eggheaders = [
+ 'egg-editable-toolbar.h',
+ 'egg-toolbars-model.h',
+ 'egg-toolbar-editor.h'
+]
+
+noinst_headers = [
+ 'eggmarshalers.h'
+]
+
+eggmarshalers_h = custom_target('eggmarshalers.h',
+ output: 'eggmarshalers.h',
+ input: 'eggmarshalers.list',
+ command: [
+ glib_genmarshal,
+ '--prefix=_egg_marshal',
+ '@INPUT@',
+ '--header'
+ ],
+ capture: true
+)
+
+eggmarshalers_c = custom_target('eggmarshalers.c',
+ output: 'eggmarshalers.c',
+ input: 'eggmarshalers.list',
+ command: [
+ glib_genmarshal,
+ '--prefix=_egg_marshal',
+ '@INPUT@',
+ '--body',
+ '--prototypes'
+ ],
+ capture: true
+)
+
+eggtypebuiltins_h = custom_target('eggtypebuiltins.h',
+ output: 'eggtypebuiltins.h',
+ input: eggheaders,
+ command: [
+ glib_mkenums,
+ '--fhead', '#ifndef __EGGTYPEBUILTINS_H__\n#define __EGGTYPEBUILTINS_H__ 1\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n\n',
+ '--ftail', 'G_END_DECLS\n\n#endif /* __EGGTYPEBUILTINS_H__ */\n',
+ '--fprod', '\n/* --- @filename@ --- */',
+ '--eprod', '#define EGG_TYPE_@ENUMSHORT@ @enum_name@_get_type()\nGType @enum_name@_get_type (void);\n',
+ '@INPUT@'
+ ],
+ capture: true
+)
+
+eggtypebuiltins_c = custom_target('eggtypebuiltins.c',
+ output: 'eggtypebuiltins.c',
+ input: eggheaders,
+ command: [
+ glib_mkenums,
+ '--fhead', '#include <config.h>\n\n#include "eggtypebuiltins.h"\n\n',
+ '--fprod', '\n/* enumerations from "@filename@" */\n#include "@filename@"',
+ '--vhead', 'static const G@Type@Value _@enum_name@_values[] = {',
+ '--vprod', ' { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+ '--vtail', ' { 0, NULL, NULL }\n};\n\nGType\n@enum_name@_get_type (void)\n{\n static GType type = 0;\n\n if (G_UNLIKELY (type == 0))\n type = g_@type@_register_static ("@EnumName@", _@enum_name@_values);\n\n return type;\n}\n\n',
+ '@INPUT@'
+ ],
+ capture: true
+)
+
+built_sources = [
+ eggmarshalers_c,
+ eggmarshalers_h,
+ eggtypebuiltins_c,
+ eggtypebuiltins_h
+]
+
+# Define the library
+libtoolbareditor = static_library('toolbareditor',
+ sources: [
+ eggsources,
+ eggheaders,
+ built_sources
+ ],
+ c_args: [
+ '-DCURSOR_DIR="' + join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) + '"',
+ ],
+ include_directories: include_dirs,
+ dependencies: [shell_core_deps, xml]
+)
+
+libtoolbareditor_dep = declare_dependency(
+ link_with: libtoolbareditor,
+ include_directories: include_dirs
+)
diff --git a/cut-n-paste/zoom-control/meson.build b/cut-n-paste/zoom-control/meson.build
new file mode 100644
index 00000000..7830f1d1
--- /dev/null
+++ b/cut-n-paste/zoom-control/meson.build
@@ -0,0 +1,28 @@
+zoom_sources = [
+ 'ephy-zoom-action.h',
+ 'ephy-zoom-action.c',
+ 'ephy-zoom-control.c',
+ 'ephy-zoom-control.h',
+ 'ephy-zoom.c',
+ 'ephy-zoom.h',
+]
+
+zoom_deps = [
+ config_h,
+ glib,
+ gtk,
+ math
+]
+
+libephyzoom = static_library(
+ 'ephyzoom',
+ zoom_sources,
+ include_directories: include_root,
+ dependencies: zoom_deps,
+)
+
+libephyzoom_dep = declare_dependency(
+ link_with: libephyzoom,
+ include_directories: [include_root, include_directories('.')],
+ dependencies: zoom_deps,
+)
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 00000000..237b63ae
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,73 @@
+icons = [
+ '16x16/actions/object-rotate-right.png',
+ '16x16/actions/zoom.png',
+ '16x16/actions/zoom-fit-width.png',
+ '16x16/actions/view-page-facing.png',
+ '16x16/actions/view-page-continuous.png',
+ '16x16/actions/object-rotate-left.png',
+ '16x16/actions/zoom-fit-height.png',
+ '16x16/mimetypes/x-office-presentation.png',
+ '22x22/actions/object-rotate-right.png',
+ '22x22/actions/zoom-fit-page.png',
+ '22x22/actions/zoom.png',
+ '22x22/actions/zoom-fit-width.png',
+ '22x22/actions/view-page-facing.png',
+ '22x22/actions/view-page-continuous.png',
+ '22x22/actions/object-rotate-left.png',
+ '22x22/actions/eye.png',
+ '22x22/mimetypes/x-office-presentation.png',
+ '24x24/actions/object-rotate-right.png',
+ '24x24/actions/stock_filters-invert.png',
+ '24x24/actions/zoom.png',
+ '24x24/actions/zoom-fit-width.png',
+ '24x24/actions/view-page-facing.png',
+ '24x24/actions/view-page-continuous.png',
+ '24x24/actions/object-rotate-left.png',
+ '24x24/actions/zoom-fit-height.png',
+ '24x24/mimetypes/x-office-presentation.png',
+ '32x32/actions/object-rotate-right.png',
+ '32x32/actions/view-page-facing.png',
+ '32x32/actions/view-page-continuous.png',
+ '32x32/actions/object-rotate-left.png',
+ '32x32/mimetypes/x-office-presentation.png',
+ '48x48/actions/resize-se.png',
+ '48x48/actions/resize-sw.png',
+ '48x48/actions/view-page-facing.png',
+ '48x48/actions/view-page-continuous.png',
+ '48x48/actions/close.png',
+ 'scalable/actions/object-rotate-left.svg',
+ 'scalable/actions/object-rotate-right.svg',
+ 'scalable/mimetypes/x-office-presentation.svg',
+]
+
+foreach icon : icons
+ parts = icon.split('/')
+ size = parts[0]
+ context = parts[1]
+ filename = parts[2]
+
+ install_data(
+ icon,
+ install_dir: join_paths(datadir, meson.project_name(), 'icons', 'hicolor', size, context)
+ )
+endforeach
+
+app_icons = [
+ '16x16/apps/atril.png',
+ '22x22/apps/atril.png',
+ '24x24/apps/atril.png',
+ '48x48/apps/atril.png',
+ 'scalable/apps/atril.svg',
+]
+
+foreach icon : app_icons
+ parts = icon.split('/')
+ size = parts[0]
+ context = parts[1]
+ filename = parts[2]
+
+ install_data(
+ icon,
+ install_dir: join_paths(datadir, 'icons', 'hicolor', size, context)
+ )
+endforeach
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 00000000..1d76df31
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,57 @@
+
+subdir('icons')
+
+data_dir = include_directories('.')
+
+install_data(
+ 'atril.1',
+ install_dir : join_paths(get_option('prefix'), get_option('mandir'), 'man1')
+)
+
+service_conf = configuration_data()
+service_conf.set('libexecdir', join_paths(prefix, libexecdir))
+
+configure_file(
+ input: 'org.mate.atril.Daemon.service.in',
+ output: 'org.mate.atril.Daemon.service',
+ configuration: service_conf,
+ install_dir: join_paths(datadir, 'dbus-1', 'services')
+)
+
+schema_file = install_data(
+ 'org.mate.Atril.gschema.xml',
+ install_dir: join_paths(datadir, 'glib-2.0', 'schemas')
+)
+
+desktop_conf = configuration_data()
+desktop_conf.set('VERSION', meson.project_version())
+desktop_conf.set('ATRIL_MIME_TYPES', atril_mime_types)
+
+desktop = configure_file(
+ input: 'atril.desktop.in.in',
+ output: 'atril.desktop.in',
+ configuration: desktop_conf,
+)
+
+i18n.merge_file(
+ input: desktop,
+ output: 'atril.desktop',
+ type: 'desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: desktopdir,
+)
+
+appdata = i18n.merge_file(
+ input: 'atril.appdata.xml.in.in',
+ output: 'atril.appdata.xml',
+ type: 'xml',
+ po_dir: po_dir,
+ install: true,
+ install_dir: join_paths(datadir, 'metainfo'),
+)
+
+install_data(
+ 'hand-open.png',
+ install_dir: join_paths(prefix, datadir, meson.project_name())
+)
diff --git a/help/es/es.po b/help/es/es.po
index fdf9b5b6..e13dc0e6 100644
--- a/help/es/es.po
+++ b/help/es/es.po
@@ -9,7 +9,7 @@
# Emiliano Fascetti, 2021
# Toni Estévez <[email protected]>, 2021
# Joaquín Ruiz Luque, 2022
-# Albireo67 <[email protected]>, 2022
+# e8719986fb0e918e5504827f4b7020b9_54697cc <5c2a49c554c358fed470d27243585bdf_851518>, 2022
# Francisco Serrador, 2023
#
msgid ""
diff --git a/help/fr/fr.po b/help/fr/fr.po
index ae74674e..acfff26c 100644
--- a/help/fr/fr.po
+++ b/help/fr/fr.po
@@ -10,13 +10,14 @@
# Yoshida Shouyou, 2021
# clefebvre <[email protected]>, 2021
# Adrien Golinelli, 2022
+# David D, 2025
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2023-08-31 17:43+0200\n"
"PO-Revision-Date: 2018-09-18 09:08+0000\n"
-"Last-Translator: Adrien Golinelli, 2022\n"
+"Last-Translator: David D, 2025\n"
"Language-Team: French (https://app.transifex.com/mate/teams/13566/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -2307,7 +2308,7 @@ msgstr "Imprime le document actuel."
#. (itstool) path: td/p
#: C/shortcuts.page:67
msgid "<keyseq><key>Ctrl</key><key>P</key></keyseq>"
-msgstr ""
+msgstr "<keyseq><key>Ctrl</key><key>P</key></keyseq>"
#. (itstool) path: td/p
#: C/shortcuts.page:70
@@ -2327,7 +2328,7 @@ msgstr ""
#. (itstool) path: td/p
#: C/shortcuts.page:76
msgid "<keyseq><key>Ctrl</key><key>R</key></keyseq>"
-msgstr ""
+msgstr "<keyseq><key>Ctrl</key><key>R</key></keyseq>"
#. (itstool) path: td/p
#: C/shortcuts.page:85
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 00000000..dd9fcad3
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,35 @@
+# developer docs
+if get_option('docs')
+ glib_prefix = glib.get_pkgconfig_variable('prefix')
+ gtk_prefix = gtk.get_pkgconfig_variable('prefix')
+
+ fixref_args = [
+ '--extra-dir=' + join_paths(glib_prefix, gnome.gtkdoc_html_dir('glib')),
+ '--extra-dir=' + join_paths(glib_prefix, gnome.gtkdoc_html_dir('gio')),
+ '--extra-dir=' + join_paths(gtk_prefix, gnome.gtkdoc_html_dir('gdk')),
+ '--extra-dir=' + join_paths(gtk_prefix, gnome.gtkdoc_html_dir('gdk-pixbuf')),
+ '--extra-dir=' + join_paths(gtk_prefix, gnome.gtkdoc_html_dir('gtk')),
+ ]
+
+ subdir('reference/libdocument')
+ subdir('reference/libview')
+ subdir('reference/shell')
+endif
+
+# help files
+if get_option('help_files')
+ help_sources = [
+ 'index.docbook',
+ 'legal.xml',
+ ]
+
+ help_media = [
+ 'figures/atril_start_window.png',
+ ]
+
+ gnome.yelp(
+ meson.project_name(),
+ sources: help_sources,
+ media: help_media,
+ )
+endif
diff --git a/help/pl/pl.po b/help/pl/pl.po
index f07039a5..c8a95874 100644
--- a/help/pl/pl.po
+++ b/help/pl/pl.po
@@ -1,7 +1,7 @@
#
# Translators:
# Piotr Drąg <[email protected]>, 2018
-# Piotr Strębski <[email protected]>, 2018
+# Piotr Strebski <[email protected]>, 2018
# Stefano Karapetsas <[email protected]>, 2021
# Michal Herman <[email protected]>, 2021
# Marcin Kralka <[email protected]>, 2021
diff --git a/help/pt_BR/pt_BR.po b/help/pt_BR/pt_BR.po
index 020440c3..4e5ead30 100644
--- a/help/pt_BR/pt_BR.po
+++ b/help/pt_BR/pt_BR.po
@@ -8,15 +8,15 @@
# George Silva <[email protected]>, 2021
# Aldo Oliveira <[email protected]>, 2021
# Vitor Henrique, 2023
-# Davi Ricieri, 2024
# Antonio Neto, 2024
+# Davi Ricieri, 2025
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2023-08-31 17:43+0200\n"
"PO-Revision-Date: 2018-09-18 09:08+0000\n"
-"Last-Translator: Antonio Neto, 2024\n"
+"Last-Translator: Davi Ricieri, 2025\n"
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/mate/teams/13566/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -700,7 +700,7 @@ msgstr "atril --fullscreen arquivo.pdf"
#. (itstool) path: section/title
#: C/commandline.page:54
msgid "Opening a document in presentation mode"
-msgstr ""
+msgstr "Abrindo um documento no modo de apresentação"
#. (itstool) path: section/screen
#: C/commandline.page:55
@@ -711,7 +711,7 @@ msgstr "atril --presentation arquivo.pdf"
#. (itstool) path: section/title
#: C/commandline.page:58
msgid "Opening a document in preview mode"
-msgstr ""
+msgstr "Abrindo um documento no modo de visualização"
#. (itstool) path: section/screen
#: C/commandline.page:59
@@ -722,7 +722,7 @@ msgstr "atril --preview arquivo.pdf"
#. (itstool) path: info/desc
#: C/convertpdf.page:7
msgid "You can convert a document to PDF by \"printing\" it to a file."
-msgstr ""
+msgstr "Você pode converter um documento PDF \"imprimindo\" ele para um arquivo."
#. (itstool) path: credit/name
#: C/convertpdf.page:14 C/convertPostScript.page:14 C/convertSVG.page:14
@@ -768,6 +768,9 @@ msgid ""
"style=\"menuitem\">Print</gui></guiseq> and select <gui>Print</gui> or press"
" <keyseq><key>Ctrl</key><key>P</key></keyseq> on your keyboard."
msgstr ""
+"Vá para <guiseq><gui style=\"menuitem\">Arquivo</gui> <gui "
+"style=\"menuitem\">Imprimir</gui></guiseq> e selecione <gui>Imprimir</gui> "
+"ou pressione <keyseq><key>Ctrl</key><key>P</key></keyseq> no seu teclado."
#. (itstool) path: item/p
#: C/convertpdf.page:45 C/forms-saving.page:65
diff --git a/help/reference/libdocument/meson.build b/help/reference/libdocument/meson.build
new file mode 100644
index 00000000..2d44a400
--- /dev/null
+++ b/help/reference/libdocument/meson.build
@@ -0,0 +1,30 @@
+version_conf = configuration_data()
+version_conf.set('VERSION', version)
+
+version_xml = configure_file(
+ input: 'version.xml.in',
+ output: 'version.xml',
+ configuration: version_conf,
+)
+
+libdoc_doc_deps = declare_dependency(
+ include_directories: [libdoc_include, include_directories('.')],
+ link_with: libdocument,
+ dependencies: libdocument_deps,
+)
+
+gnome.gtkdoc(
+ 'libdocument',
+ mode: 'xml',
+ main_xml: 'libdocument-docs.xml',
+ gobject_typesfile: files('libdocument.types'),
+ src_dir: [
+ join_paths(meson.source_root(), 'libdocument'),
+ ],
+ ignore_headers: [libdocument_private_headers],
+ dependencies: libdoc_doc_deps,
+ mkdb_args: ['--xml-mode', '--output-format=xml', '--name-space=ev'],
+ fixxref_args: fixref_args,
+ install: true,
+ install_dir: 'libocument-' + api_version,
+)
diff --git a/help/reference/libview/meson.build b/help/reference/libview/meson.build
new file mode 100644
index 00000000..776c13f4
--- /dev/null
+++ b/help/reference/libview/meson.build
@@ -0,0 +1,31 @@
+version_conf = configuration_data()
+version_conf.set('VERSION', version)
+
+version_xml = configure_file(
+ input: 'version.xml.in',
+ output: 'version.xml',
+ configuration: version_conf,
+)
+
+libview_doc_deps = declare_dependency(
+ include_directories: [include_root, libdoc_include, libview_include, include_directories('.')],
+ link_with: libview,
+ dependencies: libdoc_deps,
+)
+
+gnome.gtkdoc(
+ 'libview',
+ mode: 'xml',
+ main_xml: 'libview-docs.xml',
+ gobject_typesfile: files('libview.types'),
+ src_dir: [
+ join_paths(meson.source_root(), 'libview'),
+ ],
+ ignore_headers: [libview_private_headers],
+ dependencies: libview_doc_deps,
+ mkdb_args: ['--xml-mode', '--output-format=xml', '--name-space=ev'],
+ cflags: '-DATRIL_COMPILATION',
+ fixxref_args: fixref_args,
+ install: true,
+ install_dir: 'libview-' + api_version,
+)
diff --git a/help/reference/shell/meson.build b/help/reference/shell/meson.build
new file mode 100644
index 00000000..9b2f6c43
--- /dev/null
+++ b/help/reference/shell/meson.build
@@ -0,0 +1,31 @@
+version_conf = configuration_data()
+version_conf.set('VERSION', version)
+
+version_xml = configure_file(
+ input: 'version.xml.in',
+ output: 'version.xml',
+ configuration: version_conf,
+)
+
+atril_doc_deps = declare_dependency(
+ include_directories: [include_root, libdoc_include, libview_include, include_directories('.')],
+ link_with: [libdocument, libview],
+ dependencies: atril_deps,
+)
+
+gnome.gtkdoc(
+ meson.project_name(),
+ mode: 'xml',
+ main_xml: 'atril-docs.xml',
+ gobject_typesfile: files('atril.types'),
+ src_dir: [
+ join_paths(meson.project_source_root(), 'libview'),
+ ],
+ ignore_headers: [libview_private_headers],
+ dependencies: atril_doc_deps,
+ mkdb_args: ['--xml-mode', '--output-format=xml', '--name-space=ev'],
+ cflags: '-DATRIL_COMPILATION',
+ fixxref_args: fixref_args,
+ install: true,
+ install_dir: meson.project_name(),
+)
diff --git a/install-scripts/meson.build b/install-scripts/meson.build
new file mode 100644
index 00000000..e27404dd
--- /dev/null
+++ b/install-scripts/meson.build
@@ -0,0 +1,21 @@
+# These scripts run as post-installation scripts.
+
+# They're designed to do nothing if DESTDIR is set, which happens
+# during debian builds for instance - there's a fake install target
+# so running these would be pointless.
+
+# When using deb packaging, these aren't needed, as these operations
+# are run automatically by the package manager.
+
+# They're really only necessary in straight builds where 'ninja install'
+# will be run directly, to install the program onto the system.
+
+
+# Re-compile gsettings
+meson.add_install_script('meson_install_schemas.py')
+
+# Update mime info
+meson.add_install_script('meson_update_mime_database.py')
+
+# Update the Gtk icon cache
+meson.add_install_script('meson_update_icon_cache.py')
diff --git a/install-scripts/meson_install_schemas.py b/install-scripts/meson_install_schemas.py
new file mode 100644
index 00000000..6b2bbe2d
--- /dev/null
+++ b/install-scripts/meson_install_schemas.py
@@ -0,0 +1,10 @@
+#!/usr/bin/python3
+
+import os
+import subprocess
+
+schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas')
+
+if not os.environ.get('DESTDIR'):
+ print('Compiling gsettings schemas...')
+ subprocess.call(['glib-compile-schemas', schemadir])
diff --git a/install-scripts/meson_update_icon_cache.py b/install-scripts/meson_update_icon_cache.py
new file mode 100644
index 00000000..d618191a
--- /dev/null
+++ b/install-scripts/meson_update_icon_cache.py
@@ -0,0 +1,10 @@
+#!/usr/bin/python3
+
+import os
+import subprocess
+
+themedir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'icons', 'hicolor')
+
+if not os.environ.get('DESTDIR'):
+ print('Updating gtk icon cache... %s' % themedir)
+ subprocess.call(['gtk-update-icon-cache', '-f', '-t', themedir])
diff --git a/install-scripts/meson_update_mime_database.py b/install-scripts/meson_update_mime_database.py
new file mode 100644
index 00000000..a997dbca
--- /dev/null
+++ b/install-scripts/meson_update_mime_database.py
@@ -0,0 +1,10 @@
+#!/usr/bin/python3
+
+import os
+import subprocess
+
+mimedir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'mime')
+
+if not os.environ.get('DESTDIR'):
+ print('Updating mime database...')
+ subprocess.call(['update-mime-database', mimedir])
diff --git a/libdocument/meson.build b/libdocument/meson.build
new file mode 100644
index 00000000..b19242e3
--- /dev/null
+++ b/libdocument/meson.build
@@ -0,0 +1,172 @@
+libdocument_private_headers = [
+ 'ev-debug.h',
+ 'ev-module.h'
+]
+
+libdocument_headers = [
+ 'ev-annotation.h',
+ 'ev-async-renderer.h',
+ 'ev-attachment.h',
+ 'ev-backends-manager.h',
+ 'ev-document-factory.h',
+ 'ev-document-annotations.h',
+ 'ev-document-attachments.h',
+ 'ev-document-find.h',
+ 'ev-document-fonts.h',
+ 'ev-document-forms.h',
+ 'ev-document.h',
+ 'ev-document-images.h',
+ 'ev-document-info.h',
+ 'ev-document-layers.h',
+ 'ev-document-links.h',
+ 'ev-document-misc.h',
+ 'ev-document-print.h',
+ 'ev-document-security.h',
+ 'ev-document-thumbnails.h',
+ 'ev-document-transition.h',
+ 'ev-document-text.h',
+ 'ev-file-exporter.h',
+ 'ev-file-helpers.h',
+ 'ev-form-field.h',
+ 'ev-image.h',
+ 'ev-init.h',
+ 'ev-layer.h',
+ 'ev-link-action.h',
+ 'ev-link-dest.h',
+ 'ev-link.h',
+ 'ev-macros.h',
+ 'ev-mapping-list.h',
+ 'ev-page.h',
+ 'ev-render-context.h',
+ 'ev-selection.h',
+ 'ev-transition-effect.h',
+]
+
+libdocument_sources = [
+ 'ev-annotation.c',
+ 'ev-async-renderer.c',
+ 'ev-attachment.c',
+ 'ev-backends-manager.c',
+ 'ev-layer.c',
+ 'ev-link.c',
+ 'ev-link-action.c',
+ 'ev-link-dest.c',
+ 'ev-image.c',
+ 'ev-init.c',
+ 'ev-document.c',
+ 'ev-document-annotations.c',
+ 'ev-document-attachments.c',
+ 'ev-document-factory.c',
+ 'ev-document-thumbnails.c',
+ 'ev-document-fonts.c',
+ 'ev-document-layers.c',
+ 'ev-document-links.c',
+ 'ev-document-images.c',
+ 'ev-document-print.c',
+ 'ev-document-security.c',
+ 'ev-document-find.c',
+ 'ev-document-transition.c',
+ 'ev-document-forms.c',
+ 'ev-document-text.c',
+ 'ev-form-field.c',
+ 'ev-debug.c',
+ 'ev-file-exporter.c',
+ 'ev-file-helpers.c',
+ 'ev-mapping-list.c',
+ 'ev-module.c',
+ 'ev-page.c',
+ 'ev-render-context.c',
+ 'ev-selection.c',
+ 'ev-transition-effect.c',
+ 'ev-document-misc.c',
+ libdocument_headers,
+]
+
+libdoc_header_dir = join_paths(header_dir, 'libdocument')
+
+libdoc_include = include_directories('.')
+
+libdoc_enums = gnome.mkenums(
+ 'ev-document-type-builtins',
+ sources : libdocument_headers,
+ c_template : 'ev-document-type-builtins.c.template',
+ h_template : 'ev-document-type-builtins.h.template',
+ identifier_prefix : 'Ev',
+ symbol_prefix : 'ev',
+ install_header: true,
+ install_dir: join_paths(includedir, libdoc_header_dir),
+)
+
+libdocument_sources += libdoc_enums
+
+libdoc_version_conf = configuration_data()
+libdoc_version_conf.set('EV_MAJOR_VERSION', major_version)
+libdoc_version_conf.set('EV_MINOR_VERSION', minor_version)
+libdoc_version_conf.set('EV_MICRO_VERSION', micro_version)
+
+libdoc_version = configure_file(
+ input: 'ev-version.h.in',
+ output: 'ev-version.h',
+ configuration: libdoc_version_conf,
+ install: true,
+ install_dir: join_paths(includedir, libdoc_header_dir),
+)
+
+libdocument_sources += libdoc_version
+
+libdocument_deps = [
+ config_h,
+ cairo,
+ glib,
+ gmodule,
+ gtk,
+ math,
+]
+
+libdocument = library(
+ 'document',
+ libdocument_private_headers + libdocument_sources,
+ dependencies: libdocument_deps,
+ include_directories: include_root,
+ soversion: binary_major_version,
+ version: binary_version,
+ install: true,
+)
+
+# this is needed so targets that depend on generated headers can do so
+libdocument_dep = declare_dependency(
+ link_with: libdocument,
+ dependencies: libdocument_deps,
+ include_directories: include_root,
+ sources: libdoc_enums[1]
+)
+
+install_headers(
+ libdocument_headers,
+ subdir: libdoc_header_dir,
+)
+
+if get_option('introspection')
+ introspection_includes = [
+ 'Gdk-3.0',
+ 'GdkPixbuf-2.0',
+ 'Gio-2.0',
+ 'GLib-2.0',
+ 'GObject-2.0',
+ 'Gtk-3.0',
+ ]
+
+ libdocument_gir = gnome.generate_gir(
+ libdocument,
+ namespace: 'AtrilDocument',
+ nsversion: api_version,
+ sources: libdocument_sources,
+ identifier_prefix: 'Ev',
+ symbol_prefix: 'ev',
+ includes: introspection_includes,
+ install: true,
+ install_dir_typelib: join_paths(libdir, 'girepository-1.0'),
+ install_dir_gir: join_paths(datadir, 'gir-1.0'),
+ export_packages: 'libdocument-' + api_version,
+ )
+endif
diff --git a/libmisc/meson.build b/libmisc/meson.build
new file mode 100644
index 00000000..e0140736
--- /dev/null
+++ b/libmisc/meson.build
@@ -0,0 +1,28 @@
+libmisc_sources = [
+ 'ev-page-action.c',
+ 'ev-page-action.h',
+ 'ev-page-action-widget.c',
+ 'ev-page-action-widget.h',
+ libdoc_enums,
+ libview_enums,
+]
+
+libmisc_deps = [
+ libdocument_dep,
+ glib,
+ gtk,
+]
+
+libmisc = static_library(
+ 'misc',
+ libmisc_sources,
+ link_with: libview,
+ include_directories: include_dirs,
+ dependencies: libmisc_deps,
+)
+
+libmisc_dep = declare_dependency(
+ link_with: libmisc,
+ include_directories: include_dirs,
+ dependencies: libmisc_deps,
+)
diff --git a/libview/ev-document-model.c b/libview/ev-document-model.c
index c19f6544..2e3acfd1 100644
--- a/libview/ev-document-model.c
+++ b/libview/ev-document-model.c
@@ -175,7 +175,7 @@ ev_document_model_get_property (GObject *object,
g_value_set_enum (value, model->page_layout);
break;
case PROP_DUAL_PAGE:
- g_value_set_boolean (value, ev_document_model_get_dual_page (model));
+ g_value_set_boolean (value, ev_document_model_get_page_layout (model));
break;
case PROP_DUAL_PAGE_ODD_LEFT:
g_value_set_boolean (value, ev_document_model_get_dual_page_odd_pages_left (model));
diff --git a/libview/ev-jobs.c b/libview/ev-jobs.c
index 5db40cab..8e33ee5d 100644
--- a/libview/ev-jobs.c
+++ b/libview/ev-jobs.c
@@ -41,9 +41,6 @@
#include "ev-debug.h"
#include <gtk/gtk.h>
-#if ENABLE_EPUB
-#include <webkit2/webkit2.h>
-#endif
#include <errno.h>
#include <glib/gstdio.h>
#include <glib/gi18n-lib.h>
@@ -823,77 +820,6 @@ ev_job_thumbnail_dispose (GObject *object)
(* G_OBJECT_CLASS (ev_job_thumbnail_parent_class)->dispose) (object);
}
-#if ENABLE_EPUB
-static void
-snapshot_callback(WebKitWebView *webview,
- GAsyncResult *results,
- EvJobThumbnail *job_thumb)
-{
- GError *error = NULL;
-
- ev_document_doc_mutex_lock ();
-
- EvPage *page = ev_document_get_page (EV_JOB(job_thumb)->document, job_thumb->page);
- job_thumb->surface = webkit_web_view_get_snapshot_finish (webview,
- results,
- &error);
-
- if (error) {
- g_warning ("Error retrieving a snapshot: %s", error->message);
- }
-
- EvRenderContext *rc = ev_render_context_new (page, job_thumb->rotation, job_thumb->scale);
- EvPage *screenshotpage;
- screenshotpage = ev_page_new(job_thumb->page);
- screenshotpage->backend_page = (EvBackendPage)job_thumb->surface;
- screenshotpage->backend_destroy_func = (EvBackendPageDestroyFunc)cairo_surface_destroy;
- ev_render_context_set_page(rc,screenshotpage);
-
- job_thumb->thumbnail = ev_document_thumbnails_get_thumbnail (EV_DOCUMENT_THUMBNAILS (EV_JOB(job_thumb)->document),
- rc, TRUE);
- g_object_unref(screenshotpage);
- g_object_unref(rc);
-
- ev_document_doc_mutex_unlock ();
- ev_job_succeeded (EV_JOB(job_thumb));
-
- gtk_widget_destroy (gtk_widget_get_toplevel (GTK_WIDGET (webview)));
-}
-
-static void
-web_thumbnail_get_screenshot_cb (WebKitWebView *webview,
- WebKitLoadEvent event,
- EvJobThumbnail *job_thumb)
-{
- if (event != WEBKIT_LOAD_FINISHED || ev_job_is_failed (EV_JOB(job_thumb))) {
- return;
- }
-
- webkit_web_view_get_snapshot (webview,
- WEBKIT_SNAPSHOT_REGION_VISIBLE,
- WEBKIT_SNAPSHOT_OPTIONS_NONE,
- NULL,
- (GAsyncReadyCallback)snapshot_callback,
- g_object_ref (job_thumb));
-}
-
-static gboolean
-webview_load_failed_cb (WebKitWebView *webview,
- WebKitLoadEvent event,
- gchar *failing_uri,
- gpointer error,
- EvJobThumbnail *job_thumb)
-{
- GError *e = (GError *) error;
- g_warning ("Error loading data from %s: %s", failing_uri, e->message);
- ev_job_failed_from_error (EV_JOB(job_thumb), e);
-
- gtk_widget_destroy (gtk_widget_get_toplevel (GTK_WIDGET (webview)));
- return TRUE;
-}
-
-#endif /* ENABLE_EPUB */
-
static gboolean
ev_job_thumbnail_run (EvJob *job)
{
@@ -903,53 +829,19 @@ ev_job_thumbnail_run (EvJob *job)
ev_debug_message (DEBUG_JOBS, "%d (%p)", job_thumb->page, job);
ev_profiler_start (EV_PROFILE_JOBS, "%s (%p)", EV_GET_TYPE_NAME (job), job);
- if (job->document->iswebdocument) {
- /* Do not block the main loop */
- if (!ev_document_doc_mutex_trylock ())
- return TRUE;
- } else {
- ev_document_doc_mutex_lock ();
- }
+ ev_document_doc_mutex_lock ();
page = ev_document_get_page (job->document, job_thumb->page);
ev_document_doc_mutex_unlock ();
- if (job->document->iswebdocument == TRUE ) {
- rc = ev_render_context_new (page, 0, job_thumb->scale);
- } else {
- rc = ev_render_context_new (page, job_thumb->rotation, job_thumb->scale);
- }
+ rc = ev_render_context_new (page, job_thumb->rotation, job_thumb->scale);
g_object_unref (page);
-#if ENABLE_EPUB
- if (job->document->iswebdocument == TRUE) {
- GtkWidget *webview;
- GtkWidget *offscreenwindow;
-
- webview = webkit_web_view_new ();
- offscreenwindow = gtk_offscreen_window_new ();
-
- gtk_container_add (GTK_CONTAINER(offscreenwindow), GTK_WIDGET (webview));
- gtk_window_set_default_size (GTK_WINDOW(offscreenwindow), 800, 1080);
- gtk_widget_show_all (offscreenwindow);
-
- g_signal_connect (WEBKIT_WEB_VIEW (webview), "load-changed",
- G_CALLBACK (web_thumbnail_get_screenshot_cb),
- g_object_ref (job_thumb));
- g_signal_connect (WEBKIT_WEB_VIEW(webview), "load-failed",
- G_CALLBACK(webview_load_failed_cb),
- g_object_ref (job_thumb));
- webkit_web_view_load_uri (WEBKIT_WEB_VIEW (webview), (gchar*) rc->page->backend_page);
- }
- else
-#endif /* ENABLE_EPUB */
- {
- ev_document_doc_mutex_lock ();
- job_thumb->thumbnail = ev_document_thumbnails_get_thumbnail (EV_DOCUMENT_THUMBNAILS (job->document),
- rc, TRUE);
- ev_document_doc_mutex_unlock ();
- ev_job_succeeded (job);
- }
+ ev_document_doc_mutex_lock ();
+ job_thumb->thumbnail = ev_document_thumbnails_get_thumbnail (EV_DOCUMENT_THUMBNAILS (job->document),
+ rc, TRUE);
+ ev_document_doc_mutex_unlock ();
+ ev_job_succeeded (job);
g_object_unref (rc);
return FALSE;
diff --git a/libview/meson.build b/libview/meson.build
new file mode 100644
index 00000000..f345a608
--- /dev/null
+++ b/libview/meson.build
@@ -0,0 +1,122 @@
+libview_private_headers = [
+ 'ev-annotation-window.h',
+ 'ev-link-accessible.h',
+ 'ev-page-accessible.h',
+ 'ev-image-accessible.h',
+ 'ev-form-field-accessible.h',
+ 'ev-page-cache.h',
+ 'ev-pixbuf-cache.h',
+ 'ev-timeline.h',
+ 'ev-transition-animation.h',
+ 'ev-view-accessible.h',
+ 'ev-view-cursor.h',
+ 'ev-view-private.h',
+]
+
+libview_headers = [
+ 'ev-document-model.h',
+ 'ev-jobs.h',
+ 'ev-job-scheduler.h',
+ 'ev-print-operation.h',
+ 'ev-stock-icons.h',
+ 'ev-view.h',
+ 'ev-web-view.h',
+ 'ev-view-presentation.h',
+]
+
+libview_sources = [
+ 'ev-annotation-window.c',
+ 'ev-document-model.c',
+ 'ev-jobs.c',
+ 'ev-job-scheduler.c',
+ 'ev-link-accessible.c',
+ 'ev-page-accessible.c',
+ 'ev-image-accessible.c',
+ 'ev-form-field-accessible.c',
+ 'ev-page-cache.c',
+ 'ev-pixbuf-cache.c',
+ 'ev-print-operation.c',
+ 'ev-stock-icons.c',
+ 'ev-timeline.c',
+ 'ev-transition-animation.c',
+ 'ev-view.c',
+ 'ev-web-view.c',
+ 'ev-view-accessible.c',
+ 'ev-view-cursor.c',
+ 'ev-view-presentation.c',
+ libview_headers,
+]
+
+libview_header_dir = join_paths(header_dir, 'libview')
+
+libview_include = include_directories('.')
+
+libview_enums = gnome.mkenums(
+ 'ev-view-type-builtins',
+ sources : libview_headers,
+ c_template : 'ev-view-type-builtins.c.template',
+ h_template : 'ev-view-type-builtins.h.template',
+ identifier_prefix : 'Ev',
+ symbol_prefix : 'ev',
+ install_header: true,
+ install_dir: join_paths(includedir, libview_header_dir),
+)
+
+libview_sources += libview_enums
+
+libview_marshal = gnome.genmarshal(
+ 'ev-view-marshal',
+ sources: 'ev-view-marshal.list',
+ prefix: 'ev_view_marshal'
+)
+
+libview_deps = [
+ libdocument_dep,
+ config_h,
+ gail,
+ glib,
+ gtk,
+ gtk_unix_print,
+ math,
+]
+
+if get_option('epub')
+ libview_deps += webkit
+endif
+
+libview = library(
+ 'view',
+ libview_sources + libview_private_headers + libdoc_enums + libview_marshal,
+ include_directories: include_dirs,
+ dependencies: libview_deps,
+ soversion: binary_major_version,
+ version: binary_version,
+ install: true,
+)
+
+libview_dep = declare_dependency(
+ link_with: libview,
+ include_directories: include_dirs,
+ dependencies: libview_deps,
+)
+
+install_headers(
+ libview_headers,
+ subdir: libview_header_dir,
+)
+
+if get_option('introspection')
+ libview_gir = gnome.generate_gir(
+ libview,
+ namespace: 'AtrilView',
+ nsversion: api_version,
+ sources: libview_sources,
+ identifier_prefix: 'Ev',
+ symbol_prefix: 'ev',
+ includes: [introspection_includes, libdocument_gir[0]],
+ install: true,
+ install_dir_typelib: join_paths(libdir, 'girepository-1.0'),
+ install_dir_gir: join_paths(datadir, 'gir-1.0'),
+ export_packages: ['libview-' + api_version, 'libdocument-' + api_version],
+ )
+endif
diff --git a/meson.build b/meson.build
new file mode 100644
index 00000000..a8dc8ba7
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,360 @@
+project('atril', 'c', 'cpp',
+ version: '1.28.2',
+ meson_version: '>=0.56.0',
+ default_options: [
+ 'warning_level=1',
+ 'buildtype=debugoptimized',
+ ]
+)
+
+# Import modules
+gnome = import('gnome')
+i18n = import('i18n')
+pkgconfig = import('pkgconfig')
+
+# Get compiler
+cc = meson.get_compiler('c')
+
+# Version information
+version = meson.project_version()
+version_list = version.split('.')
+major_version = version_list[0]
+minor_version = version_list[1]
+micro_version = version_list[2]
+
+api_version = '1.5'
+binary_version = '3.0.0'
+binary_major_version = binary_version.split('.')[0]
+
+# Configuration data
+atril_conf = configuration_data()
+atril_conf.set_quoted('VERSION', version)
+atril_conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
+
+if get_option('enable_dbus')
+ atril_conf.set('ENABLE_DBUS', '')
+endif
+
+# Directory paths
+prefix = get_option('prefix')
+bindir = get_option('bindir')
+datadir = get_option('datadir')
+libdir = get_option('libdir')
+includedir = get_option('includedir')
+libexecdir = get_option('libexecdir')
+desktopdir = join_paths(datadir, 'applications')
+schema_dir = join_paths(datadir, 'glib-2.0', 'schemas')
+header_dir = join_paths(meson.project_name(), api_version)
+
+po_dir = join_paths(meson.project_source_root(), 'po')
+
+# Dependencies
+glib_version = '2.36.0'
+gtk_version = '3.14.0'
+gtk_api_version = '3.0'
+
+cairo = dependency('cairo', version: '>= 1.14.0')
+gail = dependency('gail-3.0')
+gio = dependency('gio-2.0', version: '>= 2.36.0')
+glib = dependency('glib-2.0', version: '>= ' + glib_version)
+gmodule = dependency('gmodule-2.0')
+gtk = dependency('gtk+-' + gtk_api_version, version: '>= ' + gtk_version)
+ice = dependency('ice')
+sm = dependency('sm')
+X11 = dependency('x11')
+xml = dependency('libxml-2.0', version: '>= 2.5.0')
+zlib = dependency('zlib')
+libsecret = dependency('libsecret-1', version: '>= 0.5', required: get_option('keyring'))
+gtk_unix_print = dependency('gtk+-unix-print-3.0', version: '>= ' + gtk_version, required: get_option('gtk_unix_print'))
+mate_desktop = dependency('mate-desktop-2.0', version: '>= 1.27.1')
+
+# Backend configuration
+enabled_backend_names = []
+backend_subdirs = []
+atril_mime_types = ''
+
+# PDF backend
+if get_option('pdf')
+ poppler = dependency('poppler-glib')
+ backend_subdirs += 'pdf'
+ atril_mime_types += 'application/pdf;application/x-bzpdf;application/x-gzpdf;application/x-xzpdf;'
+endif
+
+# PostScript backend
+if get_option('ps')
+ spectre = dependency('libspectre', version: '>= 0.2.0')
+ backend_subdirs += 'ps'
+ atril_mime_types += 'application/postscript;application/x-bzpostscript;application/x-gzpostscript;image/x-eps;image/x-bzeps;image/x-gzeps;application/illustrator;'
+endif
+
+# DVI backend
+if get_option('dvi')
+ kpathsea = dependency('kpathsea')
+ spectre = dependency('libspectre', version: '>= 0.2.0')
+ if get_option('t1lib')
+ t1lib = cc.find_library('t1', required: false)
+ t1_enabled = t1lib.found()
+ else
+ t1_enabled = false
+ endif
+ backend_subdirs += 'dvi'
+ atril_mime_types += 'application/x-dvi;application/x-bzdvi;application/x-gzdvi;'
+endif
+
+# DJVU backend
+if get_option('djvu')
+ djvu = dependency('ddjvuapi', version: '>= 3.5.17')
+ backend_subdirs += 'djvu'
+ atril_mime_types += 'image/vnd.djvu;image/vnd.djvu+multipage;'
+endif
+
+# TIFF backend
+if get_option('tiff')
+ tiff = dependency('libtiff-4')
+ backend_subdirs += 'tiff'
+ atril_mime_types += 'image/tiff;'
+endif
+
+# Pixbuf backend
+if get_option('pixbuf')
+ backend_subdirs += 'pixbuf'
+ atril_mime_types += 'image/*;'
+ atril_conf.set10('ENABLE_PIXBUF', true)
+endif
+
+# Comics backend
+if get_option('comics')
+ libarchive_req_version = '>= 3.6.0'
+ libarchive_dep = dependency('libarchive', version: '>= 3.6.0', required: true)
+ backend_subdirs += 'comics'
+ comic_mimetypes = ';'.join([
+ 'application/vnd.comicbook-rar',
+ 'application/vnd.comicbook+zip',
+ 'application/x-cb7',
+ 'application/x-cbr',
+ 'application/x-cbt',
+ 'application/x-cbz',
+ 'application/x-ext-cb7',
+ 'application/x-ext-cbr',
+ 'application/x-ext-cbt',
+ 'application/x-ext-cbz',
+ ]) + ';'
+ atril_mime_types += comic_mimetypes
+endif
+
+# XPS backend
+if get_option('xps')
+ xps = dependency('libgxps', version: '>= 0.2.1')
+ backend_subdirs += 'xps'
+ atril_mime_types += 'application/oxps;application/vnd.ms-xpsdocument;'
+endif
+
+thumbnailer_mime_types = atril_mime_types
+
+# EPUB backend
+if get_option('epub')
+ webkit = dependency('webkit2gtk-4.1', version: '>= 2.4.3', required: false)
+ backend_subdirs += 'epub'
+ atril_mime_types += 'application/epub+zip;'
+endif
+
+atril_conf.set_quoted('SUPPORTED_MIMETYPES', atril_mime_types)
+
+# Math library
+math = cc.find_library('m', required: false)
+
+# MathJax configuration
+mathjax_directory = get_option('mathjax-directory')
+if mathjax_directory == ''
+ foreach dir: [
+ '/usr/share/mathjax',
+ '/usr/share/javascript/mathjax'
+ ]
+ if run_command('test', ['-f', join_paths(dir, 'MathJax.js')], check: false).returncode() == 0
+ mathjax_directory = dir
+ endif
+ endforeach
+endif
+
+if mathjax_directory != ''
+ atril_conf.set_quoted('MATHJAX_DIRECTORY', mathjax_directory)
+elif get_option('epub')
+ error('"mathjax-directory" is undefined and could not be autodetected')
+endif
+
+mate_submodules_dep = dependency('mate-submodules', version: '1.24.0',
+fallback: ['mate-submodules', 'mate_submodules_dep'])
+
+# Generate config.h
+config_h_file = configure_file(
+ output: 'config.h',
+ configuration: atril_conf
+)
+
+config_h = declare_dependency(
+ sources: config_h_file
+)
+
+# Include directories
+include_dirs = include_directories('.', 'libdocument', 'libview', 'libmisc', 'cut-n-paste/toolbar-editor', 'properties')
+include_root = include_directories('.')
+
+# Headers
+atril_document_header = [
+ 'atril-document.h'
+]
+
+atril_view_header = [
+ 'atril-view.h'
+]
+
+# Compiler flags
+c_args = [
+ '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
+ '-DDATADIR="@0@"'.format(join_paths(prefix, datadir)),
+ '-DMATEDATADIR="@0@"'.format(join_paths(prefix, datadir)),
+ '-DLIBDIR="@0@"'.format(join_paths(prefix, libdir)),
+ '-DBINDIR="@0@"'.format(join_paths(prefix, bindir)),
+ '-DEV_BACKENDSDIR="@0@"'.format(join_paths(prefix, libdir, meson.project_name(), binary_major_version, 'backends')),
+ '-DATRILDATADIR="@0@"'.format(join_paths(prefix, datadir, meson.project_name())),
+ '-DMATELOCALEDIR="@0@"'.format(join_paths(prefix, datadir, 'locale')),
+ '-Werror=implicit-function-declaration',
+ '-DATRIL_COMPILATION',
+ '-DPACKAGE_URL="https://mate-desktop.org"',
+ '-include', 'config.h',
+]
+
+cpp_args = [
+ '-DATRIL_LOCALE_DIR="@0@"'.format(join_paths(prefix, datadir, 'locale')),
+ '-DMATELOCALEDIR="@0@"'.format(join_paths(prefix, datadir, 'locale')),
+ '-DATRIL_COMPILATION',
+ '-DHAVE_CONFIG_H',
+ '-DPACKAGE_URL="https://mate-desktop.org"'
+]
+
+# Maintainer mode configuration
+if get_option('maintainer_mode')
+ domains = ['G', 'ATK', 'PANGO', 'GDK', 'GDK_PIXBUF', 'GTK', 'MATE', 'LIBGLADE', 'VTE', 'WNCK', 'LIBSOUP']
+
+ disable_deprecated_flags = []
+ foreach domain : domains
+ disable_deprecated_flags += '-D@0@_DISABLE_DEPRECATED'.format(domain)
+ disable_deprecated_flags += '-D@0@_DISABLE_SINGLE_INCLUDES'.format(domain)
+ endforeach
+
+ c_args += disable_deprecated_flags
+ cpp_args += disable_deprecated_flags
+endif
+
+# Additional conditional flags
+if get_option('enable_debug')
+ c_args += '-DEV_ENABLE_DEBUG'
+ cpp_args += '-DEV_ENABLE_DEBUG'
+endif
+
+if get_option('epub')
+ c_args += '-DENABLE_EPUB'
+ cpp_args += '-DENABLE_EPUB'
+endif
+
+# Add compiler arguments
+add_project_arguments(c_args, language: 'c')
+add_project_arguments(cpp_args, language: 'cpp')
+
+# Define shell_core_deps before including subdirectories that need it
+shell_core_deps = [
+ glib,
+ gtk,
+ gio,
+]
+
+subdir('libdocument')
+subdir('libview')
+subdir('libmisc')
+subdir('backend')
+subdir('data')
+
+if get_option('thumbnailer')
+ subdir('thumbnailer')
+endif
+
+if get_option('previewer')
+ subdir('previewer')
+endif
+
+subdir('cut-n-paste/toolbar-editor')
+subdir('cut-n-paste/zoom-control')
+subdir('properties')
+
+subdir('shell')
+subdir('po')
+subdir('help')
+subdir('install-scripts')
+
+# Tests (conditional on Meson version)
+if meson.version().version_compare('>=0.46')
+ subdir('test')
+endif
+
+# Install headers
+atril_headers = [
+ 'atril-document.h',
+ 'atril-view.h',
+]
+
+install_headers(
+ atril_headers,
+ subdir: header_dir
+)
+
+# Generate pkg-config files
+pc_conf = configuration_data()
+pc_conf.set('prefix', prefix)
+pc_conf.set('exec_prefix', '${prefix}')
+pc_conf.set('libdir', join_paths('${prefix}', libdir))
+pc_conf.set('includedir', join_paths('${prefix}', includedir))
+pc_conf.set('EV_API_VERSION', api_version)
+pc_conf.set('EV_BINARY_VERSION', binary_major_version)
+pc_conf.set('VERSION', version)
+pc_conf.set('GLIB_REQUIRED', glib_version)
+pc_conf.set('GTK_API_VERSION', gtk_api_version)
+pc_conf.set('GTK_REQUIRED', gtk_version)
+
+configure_file(
+ input: 'atril-document.pc.in',
+ output: 'atril-document-@[email protected]'.format(api_version),
+ configuration: pc_conf,
+ install_dir: join_paths(libdir, 'pkgconfig')
+)
+
+configure_file(
+ input: 'atril-view.pc.in',
+ output: 'atril-view-@[email protected]'.format(api_version),
+ configuration: pc_conf,
+ install_dir: join_paths(libdir, 'pkgconfig')
+)
+
+# Summary output
+summary = [
+ '',
+ '--- Build Configuration Summary For Atril ---',
+ '',
+ 'prefix = @0@'.format(prefix),
+ 'bindir = @0@'.format(bindir),
+ 'datadir = @0@'.format(datadir),
+ 'libdir = @0@'.format(libdir),
+ 'includedir = @0@'.format(includedir),
+ 'libexecdir = @0@'.format(libexecdir),
+ 'desktopdir = @0@'.format(desktopdir),
+ 'schema_dir = @0@'.format(schema_dir),
+ 'ENABLE_DBUS = @0@'.format(get_option('enable_dbus')),
+ 'MathJax directory = @0@'.format(mathjax_directory),
+ '',
+ 'Backends enabled:',
+]
+
+foreach backend_name : backend_subdirs
+ summary += ' @0@'.format(backend_name)
+endforeach
+
+message('\n'.join(summary))
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 00000000..0fe1c039
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,111 @@
+option('comics',
+ type: 'boolean',
+ value: false,
+ description: 'Support for the comic book (cbr) backend'
+)
+option('djvu',
+ type: 'boolean',
+ value: false,
+ description: 'Support for the djvu backend'
+)
+option('dvi',
+ type: 'boolean',
+ value: false,
+ description: 'Support for the dvi backend'
+)
+option('t1lib',
+ type: 'boolean',
+ value: false,
+ description: 'Compile with t1lib for type1 font support in the dvi backend'
+)
+option('epub',
+ type: 'boolean',
+ value: false,
+ description: 'Support for the epub backend'
+)
+option('pdf',
+ type: 'boolean',
+ value: true,
+ description: 'Support for the PDF backend'
+)
+option('pixbuf',
+ type: 'boolean',
+ value: false,
+ description: 'Support for the generic pixbuf image backend'
+)
+option('ps',
+ type: 'boolean',
+ value: false,
+ description: 'Support for the PostScript backend'
+)
+option('tiff',
+ type: 'boolean',
+ value: true,
+ description: 'Support for the tiff backend'
+)
+option('xps',
+ type: 'boolean',
+ value: false,
+ description: 'Support for the xps backend'
+)
+option('gtk_unix_print',
+ type: 'boolean',
+ value: true,
+ description: 'Print support'
+)
+option('keyring',
+ type: 'boolean',
+ value: true,
+ description: 'Keyring support for password-protected documents'
+)
+option('mathjax-directory',
+ type: 'string',
+ value: '',
+ description: 'Path to the system mathjax installation.'
+)
+option('previewer',
+ type: 'boolean',
+ value: true,
+ description: 'Build the print previewer program'
+)
+option('thumbnailer',
+ type: 'boolean',
+ value: true,
+ description: 'Build the thumbnailer program'
+)
+option('docs',
+ type: 'boolean',
+ value: false,
+ description: 'Build the API references (requires gtk-doc)'
+)
+option('help_files',
+ type: 'boolean',
+ value: false,
+ description: 'Build the help files'
+)
+option('introspection',
+ type: 'boolean',
+ value: false,
+ description: 'Enable GObject introspection'
+)
+option('enable_dbus',
+ type: 'boolean',
+ value: true,
+ description: 'Enable D-Bus support'
+)
+option('deprecated_warnings',
+ type: 'boolean',
+ value: false,
+ description: 'Show build warnings for deprecations'
+)
+option('enable_debug',
+ type: 'boolean',
+ value: false,
+ description: 'Enable the runtime debugger'
+)
+
+option('maintainer_mode',
+ type: 'boolean',
+ value: false,
+ description: 'Enable maintainer mode (extra warnings for deprecated APIs)'
+)
diff --git a/po/eo.po b/po/eo.po
index 34c4d6b8..95be4599 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -8,7 +8,7 @@
# 9a7df1f0a3f5f4de7c0fff80f6fa8bdc_64f795c <c0e0e9e34d0b00c2c039f4b25af104bd_91457>, 2018
# Michael Moroni <[email protected]>, 2018
# fenris <[email protected]>, 2019
-# Warut Bunprasert <[email protected]>, 2020
+# Warut Bunprasert <[email protected]>, 2020
# kristjan <[email protected]>, 2020
# Stefano Karapetsas <[email protected]>, 2021
#
diff --git a/po/es.po b/po/es.po
index 1bbcf784..aeddc185 100644
--- a/po/es.po
+++ b/po/es.po
@@ -15,7 +15,7 @@
# Arcenio Cid <[email protected]>, 2018
# Luis Armando Medina <[email protected]>, 2018
# ZenWalker <[email protected]>, 2018
-# Adolfo Jayme-Barrientos, 2019
+# Adolfo Jayme Barrientos, 2019
# 5eb873a56a0ef4b82a9609ebd37adb5c, 2019
# Joel Barrios <[email protected]>, 2019
# Emiliano Fascetti, 2021
diff --git a/po/fr.po b/po/fr.po
index 3ed99c37..107e4176 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -397,17 +397,17 @@ msgstr "%s: Fichier corrompu ou ce n'est pas un fichier TFM\n"
#: backend/dvi/mdvi-lib/tt.c:151
#, c-format
msgid "(tt) %s: could not load face: %s\n"
-msgstr ""
+msgstr "(tt) %s: n'a pas pu charger la face : %s\n"
#: backend/dvi/mdvi-lib/tt.c:159
#, c-format
msgid "(tt) %s: could not create face: %s\n"
-msgstr ""
+msgstr "(tt) %s: n'a pas pu créer la face: %s\n"
#: backend/dvi/mdvi-lib/tt.c:168
#, c-format
msgid "(tt) %s: could not create glyph: %s\n"
-msgstr ""
+msgstr "(tt) %s: n'a pas pu créer le glyphe : %s\n"
#: backend/dvi/mdvi-lib/tt.c:201
#, c-format
diff --git a/po/kab.po b/po/kab.po
index 8822f520..ec40e241 100644
--- a/po/kab.po
+++ b/po/kab.po
@@ -5,7 +5,8 @@
#
# Translators:
# Mohammed Belkacem <[email protected]>, 2018
-# Slimane Selyan AMIRI <[email protected]>, 2021
+# Azwaw <[email protected]>, 2021
+# ButterflyOfFire, 2024
#
msgid ""
msgstr ""
@@ -13,7 +14,7 @@ msgstr ""
"Report-Msgid-Bugs-To: https://github.com/mate-desktop/atril/issues\n"
"POT-Creation-Date: 2023-08-31 17:43+0200\n"
"PO-Revision-Date: 2018-03-11 14:35+0000\n"
-"Last-Translator: Slimane Selyan AMIRI <[email protected]>, 2021\n"
+"Last-Translator: ButterflyOfFire, 2024\n"
"Language-Team: Kabyle (https://app.transifex.com/mate/teams/13566/kab/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -1370,7 +1371,7 @@ msgstr ""
#: shell/ev-annotation-properties-dialog.c:105
msgid "Help"
-msgstr ""
+msgstr "Tallalt"
#: shell/ev-annotation-properties-dialog.c:106
msgid "New Paragraph"
@@ -1787,7 +1788,7 @@ msgstr ""
#: shell/ev-window.c:5406
msgid "GNOME Documentation Team"
-msgstr ""
+msgstr "Agraw n tsemlit n GNOME"
#: shell/ev-window.c:5411
msgid ""
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 00000000..554ceaf2
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,3 @@
+i18n.gettext(meson.project_name(),
+ preset: 'glib'
+)
diff --git a/po/nan.po b/po/nan.po
index 61199ec2..e81216f3 100644
--- a/po/nan.po
+++ b/po/nan.po
@@ -1096,11 +1096,11 @@ msgstr ""
#: properties/ev-properties-view.c:67
msgid "Created:"
-msgstr ""
+msgstr "建立佇:"
#: properties/ev-properties-view.c:68
msgid "Modified:"
-msgstr ""
+msgstr "修改佇:"
#: properties/ev-properties-view.c:69
msgid "Number of Pages:"
diff --git a/po/nds.po b/po/nds.po
index accda5ea..7fa6731f 100644
--- a/po/nds.po
+++ b/po/nds.po
@@ -5,7 +5,7 @@
#
# Translators:
# Stefano Karapetsas <[email protected]>, 2021
-# Benedikt Straub <[email protected]>, 2023
+# Benedikt Straub <[email protected]>, 2025
#
msgid ""
msgstr ""
@@ -13,7 +13,7 @@ msgstr ""
"Report-Msgid-Bugs-To: https://github.com/mate-desktop/atril/issues\n"
"POT-Creation-Date: 2023-08-31 17:43+0200\n"
"PO-Revision-Date: 2018-03-11 14:35+0000\n"
-"Last-Translator: Benedikt Straub <[email protected]>, 2023\n"
+"Last-Translator: Benedikt Straub <[email protected]>, 2025\n"
"Language-Team: Low German (https://app.transifex.com/mate/teams/13566/nds/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -1783,11 +1783,11 @@ msgstr ""
#: shell/ev-window.c:5405
msgid "MATE Documentation Team"
-msgstr ""
+msgstr "MATE-Dokumenteren-Klottje"
#: shell/ev-window.c:5406
msgid "GNOME Documentation Team"
-msgstr ""
+msgstr "GNOME Documentation Team"
#: shell/ev-window.c:5411
msgid ""
diff --git a/po/pl.po b/po/pl.po
index e5ef0a80..c4c75b50 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -7,7 +7,7 @@
# Bogusław B. <[email protected]>, 2018
# Wiktor Jezioro <[email protected]>, 2018
# Piotr Drąg <[email protected]>, 2018
-# Piotr Strębski <[email protected]>, 2018
+# Piotr Strebski <[email protected]>, 2018
# Stefano Karapetsas <[email protected]>, 2018
# Marcin Kralka <[email protected]>, 2018
# Kajetan Rosiak <[email protected]>, 2018
diff --git a/po/uk.po b/po/uk.po
index b92d6ce0..20fb9d50 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -8,9 +8,9 @@
# Stefano Karapetsas <[email protected]>, 2018
# zubr139, 2018
# 8368efb4263ae7005ba7cc0c0f943bdd_16f29c1, 2018
-# Шаповалов Анатолій Романович <[email protected]>, 2018
+# Анатолій Романович Шаповалов <[email protected]>, 2018
# Микола Ткач <[email protected]>, 2021
-# Sergiy <[email protected]>, 2022
+# Serhii Horichenko <[email protected]>, 2022
# Yaroslav Belograd, 2022
# Anton Gladky <[email protected]>, 2022
#
diff --git a/previewer/meson.build b/previewer/meson.build
new file mode 100644
index 00000000..e5f68919
--- /dev/null
+++ b/previewer/meson.build
@@ -0,0 +1,34 @@
+previewer_sources = [
+ 'ev-previewer.c',
+ 'ev-previewer-window.h',
+ 'ev-previewer-window.c',
+ libdoc_enums,
+ libview_enums,
+]
+
+previewer_sources += gnome.compile_resources(
+ 'previewer-resources', 'previewer.gresource.xml',
+ source_dir: ['.', join_paths(meson.project_source_root(), 'data')],
+ c_name: 'ev_previewer'
+)
+
+previewer_deps = [
+ libdocument_dep,
+ gio,
+ gtk,
+ gtk_unix_print
+]
+
+executable(
+ 'atril-previewer',
+ previewer_sources,
+ dependencies: previewer_deps,
+ link_with: [libview, libmisc],
+ include_directories: include_dirs,
+ install: true,
+)
+
+install_data(
+ 'atril-previewer.1',
+ install_dir : join_paths(prefix, get_option('mandir'), 'man1')
+)
diff --git a/properties/meson.build b/properties/meson.build
new file mode 100644
index 00000000..cc97aa0e
--- /dev/null
+++ b/properties/meson.build
@@ -0,0 +1,20 @@
+glib_dep = dependency('glib-2.0')
+properties_inc = include_directories('.', '..')
+
+libevproperties_sources = [
+ 'ev-properties-view.c',
+ 'ev-properties-view.h',
+]
+
+libevproperties = static_library(
+ 'evproperties',
+ libevproperties_sources,
+ include_directories: properties_inc,
+ dependencies: [glib_dep, gtk]
+)
+
+libevproperties_dep = declare_dependency(
+ link_with: libevproperties,
+ include_directories: properties_inc,
+ dependencies: [glib_dep, gtk]
+)
diff --git a/shell/ev-application.c b/shell/ev-application.c
index 56279aca..57f1b922 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -419,9 +419,17 @@ on_register_uri_cb (GObject *source_object,
g_variant_builder_add (&builder, "{sv}",
"display",
g_variant_new_string (gdk_display_get_name (gdk_screen_get_display (data->screen))));
- g_variant_builder_add (&builder, "{sv}",
- "screen",
- g_variant_new_int32 (gdk_x11_screen_get_screen_number (data->screen)));
+
+ if (GDK_IS_X11_SCREEN (data->screen)) {
+ g_variant_builder_add (&builder, "{sv}",
+ "screen",
+ g_variant_new_int32 (gdk_x11_screen_get_screen_number (data->screen)));
+ } else {
+ /*Do not crash on wayland, use the first monitor for now*/
+ g_variant_builder_add (&builder, "{sv}",
+ "screen",
+ g_variant_new_int32 (0));
+ }
if (data->dest) {
switch (ev_link_dest_get_dest_type (data->dest)) {
case EV_LINK_DEST_TYPE_PAGE_LABEL:
diff --git a/shell/ev-open-recent-action.c b/shell/ev-open-recent-action.c
index 3186f261..46d5eda8 100644
--- a/shell/ev-open-recent-action.c
+++ b/shell/ev-open-recent-action.c
@@ -65,7 +65,9 @@ ev_open_recent_action_create_tool_item (GtkAction *action)
gtk_recent_filter_add_application (filter, g_get_application_name ());
gtk_recent_chooser_set_filter (GTK_RECENT_CHOOSER (toolbar_recent_menu), filter);
- tool_item = GTK_WIDGET (gtk_menu_tool_button_new_from_stock ("gtk-open"));
+ GtkWidget *icon = gtk_image_new_from_icon_name ("document-open", GTK_ICON_SIZE_SMALL_TOOLBAR);
+ tool_item = GTK_WIDGET (gtk_menu_tool_button_new (icon, NULL));
+
gtk_menu_tool_button_set_arrow_tooltip_text (GTK_MENU_TOOL_BUTTON (tool_item),
_("Open a recently used document"));
gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (tool_item),
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
index 11e43267..c12a7a10 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -581,6 +581,10 @@ ev_sidebar_thumbnails_fill_model (EvSidebarThumbnails *sidebar_thumbnails)
GtkTreeIter iter;
int i;
+ if (priv->document->iswebdocument) {
+ return;
+ }
+
for (i = 0; i < sidebar_thumbnails->priv->n_pages; i++) {
gchar *page_label;
gchar *page_string;
@@ -1018,7 +1022,7 @@ static gboolean
ev_sidebar_thumbnails_support_document (EvSidebarPage *sidebar_page,
EvDocument *document)
{
- return (EV_IS_DOCUMENT_THUMBNAILS (document));
+ return (EV_IS_DOCUMENT_THUMBNAILS (document) && !document->iswebdocument);
}
static const gchar*
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 9f9576f6..5281acda 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -537,7 +537,7 @@ ev_window_update_actions (EvWindow *ev_window)
page = ev_document_model_get_page (ev_window->priv->model);
n_pages = ev_document_get_n_pages (ev_window->priv->document);
has_pages = n_pages > 0;
- dual_mode = ev_document_model_get_dual_page (ev_window->priv->model);
+ dual_mode = ev_document_model_get_page_layout (ev_window->priv->model);
}
#if ENABLE_EPUB
if (ev_window->priv->document && ev_window->priv->document->iswebdocument == TRUE ) {
@@ -1592,7 +1592,8 @@ ev_window_refresh_window_thumbnail (EvWindow *ev_window)
EvDocument *document = ev_window->priv->document;
if (!document || ev_document_get_n_pages (document) <= 0 ||
- !ev_document_check_dimensions (document)) {
+ !ev_document_check_dimensions (document) ||
+ document->iswebdocument) {
return;
}
@@ -4843,7 +4844,7 @@ ev_window_cmd_edit_save_settings (GtkAction *action, EvWindow *ev_window)
g_settings_set_boolean (settings, "continuous",
ev_document_model_get_continuous (model));
g_settings_set_boolean (settings, "dual-page",
- ev_document_model_get_dual_page (model));
+ ev_document_model_get_page_layout (model));
g_settings_set_boolean (settings, "dual-page-odd-left",
ev_document_model_get_dual_page_odd_pages_left (model));
g_settings_set_boolean (settings, "fullscreen",
@@ -5332,7 +5333,7 @@ ev_window_update_dual_page_action (EvWindow *window)
g_signal_handlers_block_by_func
(action, G_CALLBACK (ev_window_cmd_dual), window);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
- ev_document_model_get_dual_page (window->priv->model));
+ ev_document_model_get_page_layout (window->priv->model));
G_GNUC_END_IGNORE_DEPRECATIONS;
g_signal_handlers_unblock_by_func
(action, G_CALLBACK (ev_window_cmd_dual), window);
@@ -5347,7 +5348,7 @@ ev_window_dual_mode_changed_cb (EvDocumentModel *model,
if (ev_window->priv->metadata && !ev_window_is_empty (ev_window))
ev_metadata_set_boolean (ev_window->priv->metadata, "dual-page",
- ev_document_model_get_dual_page (model));
+ ev_document_model_get_page_layout (model));
}
static void
diff --git a/shell/meson.build b/shell/meson.build
new file mode 100644
index 00000000..268416ef
--- /dev/null
+++ b/shell/meson.build
@@ -0,0 +1,168 @@
+# Define include directories
+include_dirs = include_directories(
+ '.', # Current directory
+ '..', # Parent directory
+ '../cut-n-paste/zoom-control',
+ '../cut-n-paste/toolbar-editor',
+ '../libdocument',
+ '../libview',
+ '../libmisc',
+ '../properties'
+)
+
+# Define preprocessor definitions
+c_args = [
+ '-DATRILDATADIR="' + join_paths(get_option('prefix'), get_option('datadir'), 'atril') + '"',
+ '-DMATEDATADIR="' + get_option('datadir') + '"',
+ '-DLIBEXECDIR="' + get_option('libexecdir') + '"',
+ '-DATRIL_COMPILATION'
+]
+
+shell_sources = [
+ 'eggfindbar.c',
+ 'eggfindbar.h',
+ 'ev-annotation-properties-dialog.h',
+ 'ev-annotation-properties-dialog.c',
+ 'ev-bookmarks.h',
+ 'ev-bookmarks.c',
+ 'ev-bookmark-action.h',
+ 'ev-bookmark-action.c',
+ 'ev-application.c',
+ 'ev-application.h',
+ 'ev-file-monitor.h',
+ 'ev-file-monitor.c',
+ 'ev-history.c',
+ 'ev-history.h',
+ 'ev-loading-message.h',
+ 'ev-loading-message.c',
+ 'ev-keyring.h',
+ 'ev-keyring.c',
+ 'ev-message-area.c',
+ 'ev-message-area.h',
+ 'ev-media-player-keys.h',
+ 'ev-media-player-keys.c',
+ 'ev-metadata.c',
+ 'ev-metadata.h',
+ 'ev-navigation-action.h',
+ 'ev-navigation-action.c',
+ 'ev-navigation-action-widget.h',
+ 'ev-navigation-action-widget.c',
+ 'ev-password-view.h',
+ 'ev-password-view.c',
+ 'ev-progress-message-area.h',
+ 'ev-progress-message-area.c',
+ 'ev-properties-dialog.c',
+ 'ev-properties-dialog.h',
+ 'ev-properties-fonts.c',
+ 'ev-properties-fonts.h',
+ 'ev-properties-license.c',
+ 'ev-properties-license.h',
+ 'ev-open-recent-action.c',
+ 'ev-open-recent-action.h',
+ 'ev-utils.c',
+ 'ev-utils.h',
+ 'ev-window.c',
+ 'ev-window.h',
+ 'ev-window-title.c',
+ 'ev-window-title.h',
+ 'ev-sidebar.c',
+ 'ev-sidebar.h',
+ 'ev-sidebar-annotations.c',
+ 'ev-sidebar-annotations.h',
+ 'ev-sidebar-attachments.c',
+ 'ev-sidebar-attachments.h',
+ 'ev-sidebar-bookmarks.h',
+ 'ev-sidebar-bookmarks.c',
+ 'ev-sidebar-layers.c',
+ 'ev-sidebar-layers.h',
+ 'ev-sidebar-links.c',
+ 'ev-sidebar-links.h',
+ 'ev-sidebar-page.c',
+ 'ev-sidebar-page.h',
+ 'ev-sidebar-thumbnails.c',
+ 'ev-sidebar-thumbnails.h',
+]
+
+ev_resources = gnome.compile_resources(
+ 'atril-resources',
+ 'atril.gresource.xml',
+ source_dir: '../data',
+ c_name: 'ev',
+)
+
+shell_sources += ev_resources
+
+atril_deps = [
+ libdocument_dep,
+ config_h,
+ gio,
+ glib,
+ gtk,
+ libsecret,
+ math,
+ mate_desktop,
+ mate_submodules_dep,
+ libtoolbareditor_dep,
+ libevproperties_dep
+]
+
+if get_option('enable_dbus')
+ dbus_generated = gnome.gdbus_codegen(
+ 'ev-gdbus-generated',
+ 'ev-gdbus.xml',
+ interface_prefix: 'org.mate.atril',
+ namespace: 'Ev',
+ object_manager: true,
+ )
+
+ shell_sources += dbus_generated
+
+ # Generate the daemon D-Bus code
+ dbus_daemon_generated = gnome.gdbus_codegen(
+ 'ev-daemon-gdbus-generated',
+ 'ev-daemon-gdbus.xml',
+ interface_prefix: 'org.mate.atril',
+ namespace: 'Ev',
+ object_manager: true,
+ )
+
+ executable(
+ 'atrild',
+ sources: ['ev-daemon.c', ] + dbus_daemon_generated,
+ include_directories: include_dirs,
+ dependencies: atril_deps,
+ c_args: c_args,
+ install: true,
+ install_dir: libexecdir,
+ )
+endif
+
+libshell_deps = [
+ atril_deps,
+ libview_dep,
+ libmisc_dep,
+ mate_submodules_dep,
+ libephyzoom_dep,
+]
+
+libshell = static_library(
+ 'shell',
+ shell_sources,
+ dependencies: libshell_deps,
+ include_directories: include_dirs,
+)
+
+libshell_dep = declare_dependency(
+ link_whole: libshell, # Need the whole lib for gresource lookup
+ dependencies: libshell_deps,
+ include_directories: include_dirs,
+)
+
+atril = executable(
+ 'atril',
+ 'main.c',
+ dependencies: [libshell_dep] + atril_deps,
+ include_directories: include_dirs,
+ c_args: c_args,
+ install: true,
+)
diff --git a/subprojects/mate-submodules.wrap b/subprojects/mate-submodules.wrap
new file mode 100644
index 00000000..23ec215a
--- /dev/null
+++ b/subprojects/mate-submodules.wrap
@@ -0,0 +1,12 @@
+[wrap-git]
+directory =mate-submodules
+url=https://github.com/mate-desktop/mate-submodules.git
+push-url=ssh://[email protected]:mate-desktop/mate-submodules.git
+revision=master
+depth=1
+
+[provide]
+libegg = libegg_dep
+
+
+
diff --git a/test/meson.build b/test/meson.build
new file mode 100644
index 00000000..edf23189
--- /dev/null
+++ b/test/meson.build
@@ -0,0 +1,25 @@
+test_cases = [
+ 'testFileMenu.py',
+ 'testEditMenu.py',
+ 'testHelpMenu.py',
+ 'testZoom.py',
+ 'testGoMenu.py',
+ 'testBookmarksMenu.py',
+ 'testEncryptedFile.py',
+ 'testFileReloading.py',
+ 'testWrongFileExtension.py'
+]
+
+foreach case : test_cases
+ test_script = find_program(case)
+
+ test(
+ case,
+ test_script,
+ args: [atril.full_path()],
+ is_parallel: false,
+ depends: atril,
+ workdir: join_paths(prefix, bindir),
+ timeout: 120,
+ )
+endforeach
diff --git a/test/testBookmarksMenu.py b/test/testBookmarksMenu.py
new file mode 100755
index 00000000..2f2a5324
--- /dev/null
+++ b/test/testBookmarksMenu.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python3
+
+# This test opens the Bookmarks menu.
+
+from testCommon import run_app, bail
+
+from dogtail.procedural import *
+
+try:
+ run_app(file='test-links.pdf')
+
+ focus.frame('test-links.pdf')
+ click('Bookmarks', roleName='menu')
+ click('Add Bookmark', roleName='menu item')
+
+ click('Bookmarks', roleName='menu')
+ click('Page 1', roleName='menu item')
+
+ # Close
+ click('File', roleName='menu')
+ click('Close', roleName='menu item')
+
+except:
+ bail()
diff --git a/test/testCommon.py b/test/testCommon.py
new file mode 100644
index 00000000..8e95bf58
--- /dev/null
+++ b/test/testCommon.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python3
+
+import os
+import sys
+import signal
+
+os.environ['LANG'] = 'C'
+
+from dogtail.config import config
+config.logDebugToStdOut = True
+config.logDebugToFile = False
+
+import dogtail.procedural as dt
+
+def run_app(file=None):
+ global pid
+
+ if file is not None:
+ arguments = os.path.join(os.path.dirname(__file__), file)
+ else:
+ arguments = ''
+ pid = dt.run(sys.argv[1], arguments=arguments, appName='xreader')
+
+def bail():
+ os.kill(pid, signal.SIGTERM)
+ sys.exit(1)
diff --git a/test/testEditMenu.py b/test/testEditMenu.py
new file mode 100755
index 00000000..5d9c672e
--- /dev/null
+++ b/test/testEditMenu.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python3
+
+# This test opens the Edit menu and runs through the menu items.
+
+from testCommon import run_app, bail
+
+from dogtail.procedural import *
+
+try:
+ run_app(file='test-links.pdf')
+
+ # Begin to run through Edit options
+ focus.frame('test-links.pdf')
+ click('Edit', roleName='menu')
+
+ click('Select All', roleName='menu item')
+
+ click('Edit', roleName='menu')
+ click('Find…', roleName='menu item')
+
+ focus.frame('test-links.pdf')
+ type('link')
+ click('Find Previous', roleName='push button')
+
+ click('Edit', roleName='menu')
+ click('Find Next', roleName='menu item')
+
+ click('Edit', roleName='menu')
+ click('Find Previous', roleName='menu item')
+
+ click('Edit', roleName='menu')
+ click('Rotate Left', roleName='menu item')
+
+ click('Edit', roleName='menu')
+ click('Rotate Right', roleName='menu item')
+
+ click('Edit', roleName='menu')
+ click('Save Current Settings as Default', roleName='menu item')
+
+ click('Edit', roleName='menu')
+ click('Preferences', roleName='menu item')
+
+ focus.frame('Preferences')
+ click('Close', roleName='push button')
+
+ focus.frame('test-links.pdf')
+ click('File', roleName='menu')
+ click('Close', roleName='menu item')
+
+except:
+ bail()
diff --git a/test/testEncryptedFile.py b/test/testEncryptedFile.py
new file mode 100755
index 00000000..9b2741e5
--- /dev/null
+++ b/test/testEncryptedFile.py
@@ -0,0 +1,33 @@
+#!/usr/bin/python3
+
+# Test opening a password encrypted file and unlocking it.
+
+from testCommon import run_app, bail
+
+from dogtail.procedural import *
+
+try:
+
+ run_app(file='test-encrypt.pdf')
+
+ # Try an incorrect password first
+ focus.dialog('Enter password')
+ type('wrong password')
+ click('Unlock Document', roleName='push button')
+ focus.dialog('Enter password')
+ click('Cancel', roleName='push button')
+
+ # Try again with the correct password
+ focus.frame('test-encrypt.pdf — Password Required')
+ click('Unlock Document', roleName='push button')
+ type('Foo')
+ focus.dialog('Enter password')
+ click('Unlock Document', roleName='push button')
+
+ # Close xreader
+ focus.frame('test-encrypt.pdf — Dokument1')
+ click('File', roleName='menu')
+ click('Close', roleName='menu item')
+
+except:
+ bail()
diff --git a/test/testFileMenu.py b/test/testFileMenu.py
new file mode 100755
index 00000000..b944b83f
--- /dev/null
+++ b/test/testFileMenu.py
@@ -0,0 +1,45 @@
+#!/usr/bin/python3
+
+# Test that the File menu and menu items work correctly.
+
+from testCommon import run_app, bail
+
+from dogtail.procedural import *
+
+try:
+ run_app(file='test-links.pdf')
+
+ # Open a file
+ click('File', roleName='menu')
+ click('Open…', roleName='menu item')
+ click('Cancel', roleName='push button')
+
+ # Save a Copy
+ focus.frame('test-links.pdf')
+ click('File', roleName='menu')
+ click('Save a Copy…', roleName='menu item')
+ click('Cancel', roleName='push button')
+
+ # Print
+ focus.frame('test-links.pdf')
+ click('File', roleName='menu')
+ click('Print…', roleName='menu item')
+ focus.dialog('Print')
+ click('Cancel', roleName='push button')
+
+ # Properties
+ focus.frame('test-links.pdf')
+ click('File', roleName='menu')
+ click('Properties', roleName='menu item')
+ click('Fonts', roleName='page tab')
+ click('General', roleName='page tab')
+ focus.dialog('Properties')
+ click('Close', roleName='push button')
+
+ # Close All Windows
+ focus.frame('test-links.pdf')
+ click('File', roleName='menu')
+ click('Close All Windows', roleName='menu item')
+
+except:
+ bail()
diff --git a/test/testFileReloading.py b/test/testFileReloading.py
new file mode 100755
index 00000000..66ca2ec7
--- /dev/null
+++ b/test/testFileReloading.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python3
+
+# Test reloading a document.
+
+from testCommon import run_app, bail
+
+from dogtail.procedural import *
+
+try:
+
+ run_app(file='test-page-labels.pdf')
+
+ focus.widget('page-label-entry')
+ focus.widget.text = "iii"
+ activate()
+
+ if focus.widget.text != "III":
+ click('File', roleName='menu')
+ click('Close', roleName='menu item')
+ exit (1)
+
+ # Close xreader
+ click('File', roleName='menu')
+ click('Close', roleName='menu item')
+
+except:
+ bail()
diff --git a/test/testGoMenu.py b/test/testGoMenu.py
new file mode 100755
index 00000000..3ba753b1
--- /dev/null
+++ b/test/testGoMenu.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python3
+
+# This test opens the Go menu and test menu items.
+
+from testCommon import run_app, bail
+
+from dogtail.procedural import *
+
+try:
+ run_app(file='test-links.pdf')
+
+ focus.frame('test-links.pdf')
+ click('Go', roleName='menu')
+ click('Next Page', roleName='menu item')
+
+ click('Go', roleName='menu')
+ click('Previous Page', roleName='menu item')
+
+ click('Go', roleName='menu')
+ click('Last Page', roleName='menu item')
+
+ click('Go', roleName='menu')
+ click('First Page', roleName='menu item')
+
+ # Close
+ click('File', roleName='menu')
+ click('Close', roleName='menu item')
+
+except:
+ bail()
diff --git a/test/testHelpMenu.py b/test/testHelpMenu.py
new file mode 100755
index 00000000..72c1c4b1
--- /dev/null
+++ b/test/testHelpMenu.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python3
+
+# This test opens the Help menu and runs through the menu items.
+
+from testCommon import run_app, bail
+
+from dogtail.procedural import *
+
+try:
+ run_app()
+
+ click('Help', roleName='menu')
+ click('About', roleName='menu item')
+ focus.dialog('About Xreader')
+ click('License', roleName='toggle button')
+ click('Close', roleName='push button')
+
+ focus.frame('Recent Documents')
+ click('Help', roleName='menu')
+ click('Contents', roleName='menu item')
+
+ keyCombo('<Control>w')
+
+ focus.frame('Recent Documents')
+ click('File', roleName='menu')
+ click('Close', roleName='menu item')
+except:
+ bail()
diff --git a/test/testWrongFileExtension.py b/test/testWrongFileExtension.py
new file mode 100755
index 00000000..3b866f6e
--- /dev/null
+++ b/test/testWrongFileExtension.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python3
+
+# Test opening a file with wrong extenstion.
+
+from testCommon import run_app, bail
+
+from dogtail.procedural import *
+
+try:
+
+ run_app(file='test-mime.bin')
+
+ # Close xreader
+ click('File', roleName='menu')
+ click('Close', roleName='menu item')
+
+except:
+ bail()
diff --git a/test/testZoom.py b/test/testZoom.py
new file mode 100755
index 00000000..994a2ee9
--- /dev/null
+++ b/test/testZoom.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python3
+
+# This test opens the View menu and test zoom features.
+
+from testCommon import run_app, bail
+
+from dogtail.procedural import *
+
+try:
+ run_app(file='test-links.pdf')
+
+ # Zoom In
+ focus.frame('test-links.pdf')
+ click('View', roleName='menu')
+ click('Zoom In', roleName='menu item')
+
+ # Zoom Out
+ click('View', roleName='menu')
+ click('Zoom Out', roleName='menu item')
+
+ # Close
+ click('File', roleName='menu')
+ click('Close', roleName='menu item')
+
+except:
+ bail()
diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build
new file mode 100644
index 00000000..08d766fb
--- /dev/null
+++ b/thumbnailer/meson.build
@@ -0,0 +1,33 @@
+thumbnailer_sources = [
+ 'atril-thumbnailer.c',
+]
+
+thumbnailer_deps = [
+ libdocument_dep,
+ glib,
+ gtk,
+]
+
+executable(
+ 'atril-thumbnailer',
+ thumbnailer_sources,
+ include_directories: include_dirs,
+ dependencies: thumbnailer_deps,
+ install: true,
+)
+
+install_data(
+ 'atril-thumbnailer.1',
+ install_dir : join_paths(prefix, get_option('mandir'), 'man1')
+)
+
+mime_conf = configuration_data()
+mime_conf.set('THUMBNAILER_MIME_TYPES', thumbnailer_mime_types)
+mime_conf.set('ATRIL_MIME_TYPES', atril_mime_types)
+
+mime_file = configure_file(
+ input: 'atril.thumbnailer.in',
+ output: 'atril.thumbnailer',
+ configuration: mime_conf,
+ install_dir: join_paths(datadir, 'thumbnailers')
+)