Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0376d06670 |
338 changed files with 66232 additions and 120117 deletions
39
.build.yml
39
.build.yml
|
|
@ -15,14 +15,11 @@ requires:
|
|||
- libgxps
|
||||
- make
|
||||
- mate-common
|
||||
- mate-desktop
|
||||
- poppler-glib
|
||||
- texlive-bin
|
||||
- webkit2gtk
|
||||
- which
|
||||
- yelp-tools
|
||||
# mate-desktop dependencies
|
||||
- iso-codes
|
||||
|
||||
debian:
|
||||
# Useful URL: https://github.com/mate-desktop/debian-packages
|
||||
|
|
@ -41,14 +38,13 @@ requires:
|
|||
- libgtk-3-dev
|
||||
- libgxps-dev
|
||||
- libkpathsea-dev
|
||||
- libmate-desktop-dev
|
||||
- libsynctex-dev
|
||||
- libpoppler-glib-dev
|
||||
- libsecret-1-dev
|
||||
- libsm-dev
|
||||
- libspectre-dev
|
||||
- libtiff-dev
|
||||
- libwebkit2gtk-4.1-dev
|
||||
- libwebkit2gtk-4.0-dev
|
||||
- libx11-dev
|
||||
- libxml2-dev
|
||||
- lsb-release
|
||||
|
|
@ -57,8 +53,6 @@ requires:
|
|||
- xsltproc
|
||||
- yelp-tools
|
||||
- zlib1g-dev
|
||||
# mate-desktop dependencies
|
||||
- iso-codes
|
||||
|
||||
fedora:
|
||||
# Useful URL: https://src.fedoraproject.org/cgit/rpms/atril.git
|
||||
|
|
@ -84,14 +78,11 @@ requires:
|
|||
- libtiff-devel
|
||||
- make
|
||||
- mate-common
|
||||
- mate-desktop-devel
|
||||
- poppler-glib-devel
|
||||
- redhat-rpm-config
|
||||
- texlive-lib-devel
|
||||
- webkit2gtk4.1-devel
|
||||
- webkitgtk4-devel
|
||||
- yelp-tools
|
||||
# mate-desktop dependencies
|
||||
- iso-codes-devel
|
||||
|
||||
ubuntu:
|
||||
- autopoint
|
||||
|
|
@ -107,7 +98,6 @@ requires:
|
|||
- libgtk-3-dev
|
||||
- libgxps-dev
|
||||
- libkpathsea-dev
|
||||
- libmate-desktop-dev
|
||||
- libsynctex-dev
|
||||
- libpoppler-glib-dev
|
||||
- libsecret-1-dev
|
||||
|
|
@ -123,8 +113,6 @@ requires:
|
|||
- xsltproc
|
||||
- yelp-tools
|
||||
- zlib1g-dev
|
||||
# mate-desktop dependencies
|
||||
- iso-codes
|
||||
|
||||
variables:
|
||||
- 'CHECKERS="
|
||||
|
|
@ -143,27 +131,8 @@ variables:
|
|||
-enable-checker alpha.unix.cstring.OutOfBounds
|
||||
-enable-checker alpha.core.FixedAddr
|
||||
-enable-checker security.insecureAPI.strcpy"'
|
||||
- MATE_DESKTOP_VERSION=1.27.1
|
||||
|
||||
before_scripts:
|
||||
- cd ${START_DIR}
|
||||
- if [ ! -f mate-desktop-${MATE_DESKTOP_VERSION}.tar.xz ];then
|
||||
- curl -Ls -o mate-desktop-${MATE_DESKTOP_VERSION}.tar.xz https://github.com/mate-desktop/mate-desktop/releases/download/v${MATE_DESKTOP_VERSION}/mate-desktop-${MATE_DESKTOP_VERSION}.tar.xz
|
||||
- fi
|
||||
- tar xf mate-desktop-${MATE_DESKTOP_VERSION}.tar.xz
|
||||
- cd mate-desktop-${MATE_DESKTOP_VERSION}
|
||||
- if [ ${DISTRO_NAME} == "debian" -o ${DISTRO_NAME} == "ubuntu" ];then
|
||||
- ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu
|
||||
- else
|
||||
- ./autogen.sh --prefix=/usr
|
||||
- fi
|
||||
- if [ ${TRAVIS} == "false" ]; then
|
||||
- make clean
|
||||
- fi
|
||||
- make
|
||||
- make install
|
||||
|
||||
- cd ${START_DIR}
|
||||
- if [ ${DISTRO_NAME} == "debian" ];then
|
||||
- egrep -lRZ 'G_GNUC_BEGIN_IGNORE_DEPRECATIONS' . | xargs -0 -l sed -i -e 's/G_GNUC_BEGIN_IGNORE_DEPRECATIONS/ /g'
|
||||
- egrep -lRZ 'G_GNUC_END_IGNORE_DEPRECATIONS' . | xargs -0 -l sed -i -e 's/G_GNUC_END_IGNORE_DEPRECATIONS/ /g'
|
||||
|
|
@ -171,8 +140,8 @@ before_scripts:
|
|||
|
||||
build_scripts:
|
||||
- if [ ${DISTRO_NAME} == "debian" ];then
|
||||
- export CFLAGS+=" -Wsign-compare -Wunused-macros"
|
||||
- export CXXFLAGS+=" -Wsign-compare -Wunused-macros"
|
||||
- export CFLAGS+=" -Wsign-compare -Wunused-macros -Wunused-parameter"
|
||||
- export CXXFLAGS+=" -Wsign-compare -Wunused-macros -Wunused"
|
||||
- cppcheck --enable=warning,style,performance,portability,information,missingInclude --force -D__cplusplus .
|
||||
- fi
|
||||
|
||||
|
|
|
|||
21
.travis.yml
21
.travis.yml
|
|
@ -1,4 +1,4 @@
|
|||
dist: jammy
|
||||
dist: focal
|
||||
language: shell
|
||||
os: linux
|
||||
services:
|
||||
|
|
@ -19,9 +19,7 @@ before_install:
|
|||
- chmod +x docker-build gen-index
|
||||
|
||||
install:
|
||||
- sudo apt-get install -y python3-pip python3-setuptools
|
||||
- sudo pip3 install --upgrade pip
|
||||
- sudo pip3 install PyGithub
|
||||
- pip3 install PyGithub
|
||||
- ./docker-build --name ${DISTRO} --config .build.yml --install
|
||||
|
||||
script:
|
||||
|
|
@ -32,24 +30,16 @@ notifications:
|
|||
if: (tag OR branch = master) AND
|
||||
repo = mate-desktop/atril
|
||||
channels:
|
||||
- "irc.libera.chat#mate-dev"
|
||||
- "irc.freenode.org#mate-dev"
|
||||
template:
|
||||
- "[%{repository_name}] %{author}: %{commit_subject}"
|
||||
- "[%{branch}] %{commit} %{message} %{build_url}"
|
||||
on_success: never
|
||||
on_failure: always
|
||||
|
||||
before_deploy:
|
||||
- yes | gem update --system --force
|
||||
- gem install bundler
|
||||
- gem install faraday-net_http -v '3.3.0' # Avoid faraday version problem
|
||||
- gem install uri
|
||||
- gem install logger
|
||||
|
||||
deploy:
|
||||
- provider: pages
|
||||
edge:
|
||||
branch: v2.0.5
|
||||
edge: true
|
||||
token: $GITHUB_TOKEN
|
||||
keep_history: false
|
||||
committer_from_gh: true
|
||||
|
|
@ -60,8 +50,7 @@ deploy:
|
|||
all_branches: true
|
||||
condition: ${DISTRO} =~ ^fedora.*$
|
||||
- provider: script
|
||||
edge:
|
||||
branch: v2.0.5
|
||||
edge: true
|
||||
script: ./docker-build --verbose --config .build.yml --release github
|
||||
on:
|
||||
tags: true
|
||||
|
|
|
|||
23
.tx/config
23
.tx/config
|
|
@ -1,17 +1,16 @@
|
|||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[o:mate:p:MATE:r:master--atril]
|
||||
file_filter = po/<lang>.po
|
||||
source_file = atril.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[MATE.master--atril]
|
||||
file_filter = po/<lang>.po
|
||||
source_file = atril.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
minimum_perc = 2
|
||||
|
||||
[o:mate:p:MATE:r:master--atril-user-guide]
|
||||
file_filter = help/<lang>/<lang>.po
|
||||
source_file = help/atril.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
[MATE.master--atril-user-guide]
|
||||
file_filter = help/<lang>/<lang>.po
|
||||
source_file = help/atril.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
minimum_perc = 2
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[MATE.master--atril]
|
||||
file_filter = po/<lang>.po
|
||||
source_file = atril.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
minimum_perc = 2
|
||||
|
||||
[MATE.master--atril-user-guide]
|
||||
file_filter = help/<lang>/<lang>.po
|
||||
source_file = help/atril.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
minimum_perc = 2
|
||||
106
NEWS
106
NEWS
|
|
@ -1,96 +1,6 @@
|
|||
### 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
|
||||
|
||||
### atril 1.27.1
|
||||
|
||||
* Translations update
|
||||
* fix a incompatible pointer type warning for gcc14
|
||||
* epub: Avoid crash when index list has extraneous entry
|
||||
* epub: Prevent path traversal when extracting files
|
||||
* comics: Use libarchive to unpack documents
|
||||
* Fix build with libxml2 2.12
|
||||
* fix typo in configure.ac
|
||||
* replace deprecated gtk_image_menu_item_new_from_stock
|
||||
* replace deprecated gtk-image-menu-item
|
||||
* drop double ui files
|
||||
* Remove compilation warnings and set 'always_show_image' Properties in the UI file
|
||||
* fix warnings in id,it and tr translations
|
||||
* Add epub to man page
|
||||
* support webkit2 4.0 and 4.1
|
||||
* use webkit2gtk-4.1
|
||||
* epub: add fallback for malformed epub files in check_mime_type
|
||||
|
||||
### atril 1.27.0
|
||||
|
||||
* Translations update
|
||||
* epub: Fix index loading for certain documents - look for epub:type instead of epub:id.
|
||||
* ci: drop -Wunused-parameter compiler cflag from debian build
|
||||
* Fix implicit conversion changes signedness: 'gboolean' to 'guint'
|
||||
* Fix the type for the signal identifier which is gulong
|
||||
* Use GLib's new g_clear_signal_handler() function to simplify code
|
||||
* Remove warnings about redefining gettext support macros
|
||||
* Don't build the path to stock icons
|
||||
* Use a blank line at most
|
||||
* Accessibility: add button description
|
||||
* Preserve compatibility with older GLib versions
|
||||
|
||||
### atril 1.26.0
|
||||
|
||||
* Translations update
|
||||
* ev-window.c: only create a EvWebView if needed
|
||||
* ev-sidebar-links: Optimize reverse link lookup for a page
|
||||
* introspection: Fix bogus --library arguments.
|
||||
* libdocument: remove _ev_g_mkdtemp function
|
||||
* epub: declaration of ‘uL’ shadows a previous local [-Wshadow]
|
||||
* ev-window: missing initializer for a field of ‘GtkActionEntry’
|
||||
* epub: fix typo
|
||||
|
||||
### atril 1.25.1
|
||||
|
||||
* Translations update
|
||||
* update translations
|
||||
* update help
|
||||
* caja extension: Update copyright year
|
||||
* dvi: use glib i18n macros
|
||||
|
|
@ -126,7 +36,7 @@
|
|||
|
||||
### atril 1.25.0
|
||||
|
||||
* Translations update
|
||||
* sync with transifex
|
||||
* [ci] fix release tarball on travis CI failed
|
||||
* Re-enable highlight_find_results
|
||||
* Use ENABLE_SYNCTEX in libdocument/Makefile.am
|
||||
|
|
@ -155,13 +65,13 @@
|
|||
|
||||
### atril 1.24.0
|
||||
|
||||
* Translations update
|
||||
* update translations
|
||||
* thumbnailer: Fix memory leak
|
||||
* Fix year 2038 issue with signed 32-bit integers
|
||||
|
||||
### atril 1.23.2
|
||||
|
||||
* Translations update
|
||||
* update translations
|
||||
* Fix atril.desktop file
|
||||
* Fix memory leak ev_sidebar_thumbnails_document_changed_cb()
|
||||
* pdf: Fix memory leak when adding new text annotations
|
||||
|
|
@ -188,7 +98,7 @@
|
|||
|
||||
### atril 1.23.1
|
||||
|
||||
* Translations update
|
||||
* update translations
|
||||
* tx: sync with transifex
|
||||
* Travis CI: 'cppcheck' with '-D__cplusplus'
|
||||
* ev-view: Remove unused variables and assignment
|
||||
|
|
@ -251,7 +161,7 @@
|
|||
|
||||
### atril 1.23.0
|
||||
|
||||
* Translations update
|
||||
* update translations
|
||||
* Remove trailing whitespaces
|
||||
* test: get focus on frame
|
||||
* let test7.py can works
|
||||
|
|
@ -269,7 +179,7 @@
|
|||
|
||||
### atril 1.22.0
|
||||
|
||||
* Translations update
|
||||
* update translations
|
||||
* Add update-authors.pl script which helps to update atril.about
|
||||
* Read authors (updated) from atril.about gresource
|
||||
* Initialize Travis CI support
|
||||
|
|
@ -289,7 +199,7 @@
|
|||
|
||||
### atril 1.21.1
|
||||
|
||||
* Translations update
|
||||
* update translations
|
||||
* Use make functions for HELP_LINGUAS
|
||||
* comics: support application/vnd.rar MIME type
|
||||
* shell: Save document to the same path it was opened from
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Atril Optional Backend Libraries
|
|||
==================================================
|
||||
* [DjVuLibre](http://djvu.sourceforge.net/) for DjVu viewing
|
||||
|
||||
* [libarchive](https://www.libarchive.org/) for viewing CBR comics
|
||||
* [RAR](https://www.rarlab.com/) for viewing CBR comics
|
||||
|
||||
* [libgxps](https://wiki.gnome.org/Projects/libgxps) for XPS documents
|
||||
|
||||
|
|
|
|||
|
|
@ -12,15 +12,12 @@ backend_LTLIBRARIES = libcomicsdocument.la
|
|||
|
||||
libcomicsdocument_la_SOURCES = \
|
||||
comics-document.c \
|
||||
comics-document.h \
|
||||
ev-archive.c \
|
||||
ev-archive.h
|
||||
comics-document.h
|
||||
|
||||
libcomicsdocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS)
|
||||
libcomicsdocument_la_LIBADD = \
|
||||
$(top_builddir)/libdocument/libatrildocument.la \
|
||||
$(BACKEND_LIBS) \
|
||||
$(COMICS_LIBS) \
|
||||
$(LIB_LIBS)
|
||||
|
||||
backend_in_files = comicsdocument.atril-backend.desktop.in
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -16,9 +16,9 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __COMICS_DOCUMENT_H__
|
||||
#define __COMICS_DOCUMENT_H__
|
||||
|
||||
#include "ev-macros.h"
|
||||
#include "ev-document.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
|
@ -30,8 +30,9 @@ G_BEGIN_DECLS
|
|||
typedef struct _ComicsDocument ComicsDocument;
|
||||
|
||||
GType comics_document_get_type (void) G_GNUC_CONST;
|
||||
GType register_atril_backend (GTypeModule *module);
|
||||
|
||||
G_MODULE_EXPORT GType register_atril_backend (GTypeModule *module);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __COMICS_DOCUMENT_H__ */
|
||||
|
|
|
|||
|
|
@ -1,323 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
|
||||
/*
|
||||
* Copyright (C) 2017, Bastien Nocera <hadess@hadess.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "ev-archive.h"
|
||||
|
||||
#include <archive.h>
|
||||
#include <archive_entry.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#define BUFFER_SIZE (64 * 1024)
|
||||
|
||||
struct _EvArchive {
|
||||
GObject parent_instance;
|
||||
EvArchiveType type;
|
||||
|
||||
/* libarchive */
|
||||
struct archive *libar;
|
||||
struct archive_entry *libar_entry;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(EvArchive, ev_archive, G_TYPE_OBJECT);
|
||||
|
||||
static void
|
||||
ev_archive_finalize (GObject *object)
|
||||
{
|
||||
EvArchive *archive = EV_ARCHIVE (object);
|
||||
|
||||
switch (archive->type) {
|
||||
case EV_ARCHIVE_TYPE_RAR:
|
||||
case EV_ARCHIVE_TYPE_ZIP:
|
||||
case EV_ARCHIVE_TYPE_7Z:
|
||||
case EV_ARCHIVE_TYPE_TAR:
|
||||
g_clear_pointer (&archive->libar, archive_free);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (ev_archive_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
ev_archive_class_init (EvArchiveClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = (GObjectClass *) klass;
|
||||
|
||||
object_class->finalize = ev_archive_finalize;
|
||||
}
|
||||
|
||||
EvArchive *
|
||||
ev_archive_new (void)
|
||||
{
|
||||
return g_object_new (EV_TYPE_ARCHIVE, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
libarchive_set_archive_type (EvArchive *archive,
|
||||
EvArchiveType archive_type)
|
||||
{
|
||||
archive->type = archive_type;
|
||||
archive->libar = archive_read_new ();
|
||||
|
||||
if (archive_type == EV_ARCHIVE_TYPE_ZIP)
|
||||
archive_read_support_format_zip (archive->libar);
|
||||
else if (archive_type == EV_ARCHIVE_TYPE_7Z)
|
||||
archive_read_support_format_7zip (archive->libar);
|
||||
else if (archive_type == EV_ARCHIVE_TYPE_TAR)
|
||||
archive_read_support_format_tar (archive->libar);
|
||||
else if (archive_type == EV_ARCHIVE_TYPE_RAR) {
|
||||
archive_read_support_format_rar (archive->libar);
|
||||
archive_read_support_format_rar5 (archive->libar);
|
||||
} else
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
EvArchiveType
|
||||
ev_archive_get_archive_type (EvArchive *archive)
|
||||
{
|
||||
g_return_val_if_fail (EV_IS_ARCHIVE (archive), EV_ARCHIVE_TYPE_NONE);
|
||||
|
||||
return archive->type;
|
||||
}
|
||||
|
||||
gboolean
|
||||
ev_archive_set_archive_type (EvArchive *archive,
|
||||
EvArchiveType archive_type)
|
||||
{
|
||||
g_return_val_if_fail (EV_IS_ARCHIVE (archive), FALSE);
|
||||
g_return_val_if_fail (archive->type == EV_ARCHIVE_TYPE_NONE, FALSE);
|
||||
|
||||
switch (archive_type) {
|
||||
case EV_ARCHIVE_TYPE_RAR:
|
||||
case EV_ARCHIVE_TYPE_ZIP:
|
||||
case EV_ARCHIVE_TYPE_7Z:
|
||||
case EV_ARCHIVE_TYPE_TAR:
|
||||
libarchive_set_archive_type (archive, archive_type);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
ev_archive_open_filename (EvArchive *archive,
|
||||
const char *path,
|
||||
GError **error)
|
||||
{
|
||||
int r;
|
||||
|
||||
g_return_val_if_fail (EV_IS_ARCHIVE (archive), FALSE);
|
||||
g_return_val_if_fail (archive->type != EV_ARCHIVE_TYPE_NONE, FALSE);
|
||||
g_return_val_if_fail (path != NULL, FALSE);
|
||||
|
||||
switch (archive->type) {
|
||||
case EV_ARCHIVE_TYPE_NONE:
|
||||
g_assert_not_reached ();
|
||||
case EV_ARCHIVE_TYPE_RAR:
|
||||
case EV_ARCHIVE_TYPE_ZIP:
|
||||
case EV_ARCHIVE_TYPE_7Z:
|
||||
case EV_ARCHIVE_TYPE_TAR:
|
||||
r = archive_read_open_filename (archive->libar, path, BUFFER_SIZE);
|
||||
if (r != ARCHIVE_OK) {
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"Error opening archive: %s", archive_error_string (archive->libar));
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
libarchive_read_next_header (EvArchive *archive,
|
||||
GError **error)
|
||||
{
|
||||
while (1) {
|
||||
int r;
|
||||
|
||||
r = archive_read_next_header (archive->libar, &archive->libar_entry);
|
||||
if (r != ARCHIVE_OK) {
|
||||
if (r != ARCHIVE_EOF)
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"Error reading archive: %s", archive_error_string (archive->libar));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (archive_entry_filetype (archive->libar_entry) != AE_IFREG) {
|
||||
g_debug ("Skipping '%s' as it's not a regular file",
|
||||
archive_entry_pathname (archive->libar_entry));
|
||||
continue;
|
||||
}
|
||||
|
||||
g_debug ("At header for file '%s'", archive_entry_pathname (archive->libar_entry));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
ev_archive_read_next_header (EvArchive *archive,
|
||||
GError **error)
|
||||
{
|
||||
g_return_val_if_fail (EV_IS_ARCHIVE (archive), FALSE);
|
||||
g_return_val_if_fail (archive->type != EV_ARCHIVE_TYPE_NONE, FALSE);
|
||||
|
||||
switch (archive->type) {
|
||||
case EV_ARCHIVE_TYPE_NONE:
|
||||
g_assert_not_reached ();
|
||||
case EV_ARCHIVE_TYPE_RAR:
|
||||
case EV_ARCHIVE_TYPE_ZIP:
|
||||
case EV_ARCHIVE_TYPE_7Z:
|
||||
case EV_ARCHIVE_TYPE_TAR:
|
||||
return libarchive_read_next_header (archive, error);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
ev_archive_at_entry (EvArchive *archive)
|
||||
{
|
||||
g_return_val_if_fail (EV_IS_ARCHIVE (archive), FALSE);
|
||||
g_return_val_if_fail (archive->type != EV_ARCHIVE_TYPE_NONE, FALSE);
|
||||
|
||||
return (archive->libar_entry != NULL);
|
||||
}
|
||||
|
||||
const char *
|
||||
ev_archive_get_entry_pathname (EvArchive *archive)
|
||||
{
|
||||
g_return_val_if_fail (EV_IS_ARCHIVE (archive), NULL);
|
||||
g_return_val_if_fail (archive->type != EV_ARCHIVE_TYPE_NONE, NULL);
|
||||
|
||||
switch (archive->type) {
|
||||
case EV_ARCHIVE_TYPE_NONE:
|
||||
g_assert_not_reached ();
|
||||
case EV_ARCHIVE_TYPE_RAR:
|
||||
case EV_ARCHIVE_TYPE_ZIP:
|
||||
case EV_ARCHIVE_TYPE_7Z:
|
||||
case EV_ARCHIVE_TYPE_TAR:
|
||||
g_return_val_if_fail (archive->libar_entry != NULL, NULL);
|
||||
return archive_entry_pathname (archive->libar_entry);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gint64
|
||||
ev_archive_get_entry_size (EvArchive *archive)
|
||||
{
|
||||
g_return_val_if_fail (EV_IS_ARCHIVE (archive), -1);
|
||||
g_return_val_if_fail (archive->type != EV_ARCHIVE_TYPE_NONE, -1);
|
||||
|
||||
switch (archive->type) {
|
||||
case EV_ARCHIVE_TYPE_NONE:
|
||||
g_assert_not_reached ();
|
||||
case EV_ARCHIVE_TYPE_RAR:
|
||||
case EV_ARCHIVE_TYPE_ZIP:
|
||||
case EV_ARCHIVE_TYPE_7Z:
|
||||
case EV_ARCHIVE_TYPE_TAR:
|
||||
g_return_val_if_fail (archive->libar_entry != NULL, -1);
|
||||
return archive_entry_size (archive->libar_entry);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
gboolean
|
||||
ev_archive_get_entry_is_encrypted (EvArchive *archive)
|
||||
{
|
||||
g_return_val_if_fail (EV_IS_ARCHIVE (archive), FALSE);
|
||||
g_return_val_if_fail (archive->type != EV_ARCHIVE_TYPE_NONE, FALSE);
|
||||
|
||||
switch (archive->type) {
|
||||
case EV_ARCHIVE_TYPE_NONE:
|
||||
g_assert_not_reached ();
|
||||
case EV_ARCHIVE_TYPE_RAR:
|
||||
case EV_ARCHIVE_TYPE_ZIP:
|
||||
case EV_ARCHIVE_TYPE_7Z:
|
||||
case EV_ARCHIVE_TYPE_TAR:
|
||||
g_return_val_if_fail (archive->libar_entry != NULL, -1);
|
||||
return archive_entry_is_encrypted (archive->libar_entry);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gssize
|
||||
ev_archive_read_data (EvArchive *archive,
|
||||
void *buf,
|
||||
gsize count,
|
||||
GError **error)
|
||||
{
|
||||
gssize r = -1;
|
||||
|
||||
g_return_val_if_fail (EV_IS_ARCHIVE (archive), -1);
|
||||
g_return_val_if_fail (archive->type != EV_ARCHIVE_TYPE_NONE, -1);
|
||||
|
||||
switch (archive->type) {
|
||||
case EV_ARCHIVE_TYPE_NONE:
|
||||
g_assert_not_reached ();
|
||||
case EV_ARCHIVE_TYPE_RAR:
|
||||
case EV_ARCHIVE_TYPE_ZIP:
|
||||
case EV_ARCHIVE_TYPE_7Z:
|
||||
case EV_ARCHIVE_TYPE_TAR:
|
||||
g_return_val_if_fail (archive->libar_entry != NULL, -1);
|
||||
r = archive_read_data (archive->libar, buf, count);
|
||||
if (r < 0) {
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"Failed to decompress data: %s", archive_error_string (archive->libar));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
void
|
||||
ev_archive_reset (EvArchive *archive)
|
||||
{
|
||||
g_return_if_fail (EV_IS_ARCHIVE (archive));
|
||||
g_return_if_fail (archive->type != EV_ARCHIVE_TYPE_NONE);
|
||||
|
||||
switch (archive->type) {
|
||||
case EV_ARCHIVE_TYPE_RAR:
|
||||
case EV_ARCHIVE_TYPE_ZIP:
|
||||
case EV_ARCHIVE_TYPE_7Z:
|
||||
case EV_ARCHIVE_TYPE_TAR:
|
||||
g_clear_pointer (&archive->libar, archive_free);
|
||||
libarchive_set_archive_type (archive, archive->type);
|
||||
archive->libar_entry = NULL;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ev_archive_init (EvArchive *archive)
|
||||
{
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
|
||||
/*
|
||||
* Copyright (C) 2017, Bastien Nocera <hadess@hadess.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define EV_TYPE_ARCHIVE ev_archive_get_type ()
|
||||
G_DECLARE_FINAL_TYPE (EvArchive, ev_archive, EV, ARCHIVE, GObject)
|
||||
|
||||
typedef enum {
|
||||
EV_ARCHIVE_TYPE_NONE = 0,
|
||||
EV_ARCHIVE_TYPE_RAR,
|
||||
EV_ARCHIVE_TYPE_ZIP,
|
||||
EV_ARCHIVE_TYPE_7Z,
|
||||
EV_ARCHIVE_TYPE_TAR
|
||||
} EvArchiveType;
|
||||
|
||||
EvArchive *ev_archive_new (void);
|
||||
gboolean ev_archive_set_archive_type (EvArchive *archive,
|
||||
EvArchiveType archive_type);
|
||||
EvArchiveType ev_archive_get_archive_type (EvArchive *archive);
|
||||
gboolean ev_archive_open_filename (EvArchive *archive,
|
||||
const char *path,
|
||||
GError **error);
|
||||
gboolean ev_archive_read_next_header (EvArchive *archive,
|
||||
GError **error);
|
||||
gboolean ev_archive_at_entry (EvArchive *archive);
|
||||
const char *ev_archive_get_entry_pathname (EvArchive *archive);
|
||||
gint64 ev_archive_get_entry_size (EvArchive *archive);
|
||||
gboolean ev_archive_get_entry_is_encrypted (EvArchive *archive);
|
||||
gssize ev_archive_read_data (EvArchive *archive,
|
||||
void *buf,
|
||||
gsize count,
|
||||
GError **error);
|
||||
void ev_archive_reset (EvArchive *archive);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
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,
|
||||
)
|
||||
|
|
@ -66,6 +66,7 @@ EV_BACKEND_REGISTER_WITH_CODE (DjvuDocument, djvu_document,
|
|||
EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_SELECTION, djvu_selection_iface_init);
|
||||
});
|
||||
|
||||
|
||||
#define EV_DJVU_ERROR ev_djvu_error_quark ()
|
||||
|
||||
static GQuark
|
||||
|
|
@ -255,6 +256,7 @@ djvu_document_load (EvDocument *document,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
djvu_document_save (EvDocument *document,
|
||||
const char *uri,
|
||||
|
|
@ -674,6 +676,7 @@ djvu_document_find_find_text (EvDocumentFind *document,
|
|||
r->y2 = height - tmp * SCALE_FACTOR;
|
||||
}
|
||||
|
||||
|
||||
return matches;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -181,6 +181,7 @@ build_tree (const DjvuDocument *djvu_document,
|
|||
if (!string_from_miniexp (miniexp_car (iter), &title)) goto unknown_entry;
|
||||
if (!string_from_miniexp (miniexp_cadr (iter), &link_dest)) goto unknown_entry;
|
||||
|
||||
|
||||
if (!g_utf8_validate (title, -1, NULL)) {
|
||||
utf8_title = str_to_utf8 (title);
|
||||
title_markup = g_markup_escape_text (utf8_title, -1);
|
||||
|
|
@ -341,6 +342,7 @@ get_djvu_hyperlink_mapping (DjvuDocument *djvu_document,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
djvu_links_has_document_links (EvDocumentLinks *document_links)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include <libdjvu/miniexp.h>
|
||||
#include "djvu-text-page.h"
|
||||
|
||||
|
||||
/**
|
||||
* djvu_text_page_selection_process:
|
||||
* @page: #DjvuTextPage instance
|
||||
|
|
@ -116,6 +117,7 @@ djvu_text_page_limits_process (DjvuTextPage *page,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
djvu_text_page_limits (DjvuTextPage *page,
|
||||
miniexp_t p,
|
||||
|
|
@ -402,6 +404,7 @@ djvu_text_page_search (DjvuTextPage *page,
|
|||
g_free (search_text);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* djvu_text_page_prepare_search:
|
||||
* @page: #DjvuTextPage instance
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include <glib.h>
|
||||
#include <libdjvu/miniexp.h>
|
||||
|
||||
|
||||
typedef struct _DjvuTextPage DjvuTextPage;
|
||||
typedef struct _DjvuTextLink DjvuTextLink;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
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,
|
||||
)
|
||||
|
|
@ -110,6 +110,7 @@ dvi_document_load (EvDocument *document,
|
|||
|
||||
mdvi_cairo_device_init (&dvi_document->context->device);
|
||||
|
||||
|
||||
dvi_document->base_width = dvi_document->context->dvi_page_w * dvi_document->context->params.conv
|
||||
+ 2 * unit2pix(dvi_document->params->dpi, MDVI_HMARGIN) / dvi_document->params->hshrink;
|
||||
|
||||
|
|
@ -122,6 +123,7 @@ dvi_document_load (EvDocument *document,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
dvi_document_save (EvDocument *document,
|
||||
const char *uri,
|
||||
|
|
|
|||
|
|
@ -54,3 +54,4 @@ void mdvi_register_fonts (void)
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -81,10 +81,13 @@
|
|||
|
||||
#define MATCH(A,B) (strncmp((A),(B), MAX_NAME) == 0)
|
||||
|
||||
|
||||
|
||||
/*************************** GLOBALS ***********************/
|
||||
|
||||
static char *ident = NULL; /* storage buffer for keywords */
|
||||
|
||||
|
||||
/* "shorts" for fast case statement
|
||||
* The values of each of these enumerated items correspond to an entry in the
|
||||
* table of strings defined below. Therefore, if you add a new string as
|
||||
|
|
@ -172,6 +175,7 @@ static char *token(FILE *stream)
|
|||
|
||||
} /* token */
|
||||
|
||||
|
||||
/*************************** linetoken *************************/
|
||||
|
||||
/* "linetoken" will get read all tokens until the EOL character from
|
||||
|
|
@ -199,6 +203,7 @@ static char *linetoken(FILE *stream)
|
|||
|
||||
} /* linetoken */
|
||||
|
||||
|
||||
/*************************** recognize *************************/
|
||||
|
||||
/* This function tries to match a string to a known list of
|
||||
|
|
@ -229,6 +234,7 @@ static enum parseKey recognize(char *ident)
|
|||
|
||||
} /* recognize */
|
||||
|
||||
|
||||
/************************* parseGlobals *****************************/
|
||||
|
||||
/* This function is called by "parseFile". It will parse the AFM File
|
||||
|
|
@ -395,6 +401,8 @@ static BOOL parseGlobals(FILE *fp, GlobalFontInfo *gfi)
|
|||
|
||||
} /* parseGlobals */
|
||||
|
||||
|
||||
|
||||
#if 0 /* this function does not seem to be used anywhere */
|
||||
/************************* initializeArray ************************/
|
||||
|
||||
|
|
@ -576,6 +584,7 @@ static int parseCharWidths(FILE *fp, int *cwi)
|
|||
|
||||
} /* parseCharWidths */
|
||||
|
||||
|
||||
/************************* parseCharMetrics ************************/
|
||||
|
||||
/* This function is called by parseFile if the caller of parseFile
|
||||
|
|
@ -685,6 +694,8 @@ static int parseCharMetrics(FILE *fp, FontInfo *fi)
|
|||
|
||||
} /* parseCharMetrics */
|
||||
|
||||
|
||||
|
||||
/************************* parseTrackKernData ***********************/
|
||||
|
||||
/* This function is called by "parseFile". It will parse the AFM File
|
||||
|
|
@ -786,6 +797,7 @@ static int parseTrackKernData(FILE *fp, FontInfo *fi)
|
|||
|
||||
} /* parseTrackKernData */
|
||||
|
||||
|
||||
/************************* parsePairKernData ************************/
|
||||
|
||||
/* This function is called by "parseFile". It will parse the AFM File
|
||||
|
|
@ -906,6 +918,7 @@ static int parsePairKernData(FILE *fp, FontInfo *fi)
|
|||
|
||||
} /* parsePairKernData */
|
||||
|
||||
|
||||
/************************* parseCompCharData **************************/
|
||||
|
||||
/* This function is called by "parseFile". It will parse the AFM File
|
||||
|
|
@ -1030,8 +1043,12 @@ static int parseCompCharData(FILE *fp, FontInfo *fi)
|
|||
|
||||
} /* parseCompCharData */
|
||||
|
||||
|
||||
|
||||
|
||||
/*************************** 'PUBLIC' FUNCTION ********************/
|
||||
|
||||
|
||||
/*************************** parseFile *****************************/
|
||||
|
||||
/* parseFile is the only 'public' procedure available. It is called
|
||||
|
|
@ -1061,6 +1078,7 @@ extern int afm_parse_file(FILE *fp, FontInfo **fi, FLAGS flags)
|
|||
|
||||
register char *keyword; /* used to store a token */
|
||||
|
||||
|
||||
/* storage data for the global variable ident */
|
||||
ident = (char *) calloc(MAX_NAME, sizeof(char));
|
||||
if (ident == NULL) {error = storageProblem; return(error);}
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ static Uchar bit_swap[] = {
|
|||
0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* next we have three bitmap functions to convert bitmaps in LSB bit order
|
||||
* with 8, 16 and 32 bits per unit, to our internal format. The differences
|
||||
|
|
@ -191,6 +192,7 @@ BITMAP *bitmap_convert_msb8(Uchar *data, int w, int h, int stride)
|
|||
return bm;
|
||||
}
|
||||
|
||||
|
||||
BITMAP *bitmap_copy(BITMAP *bm)
|
||||
{
|
||||
BITMAP *nb = bitmap_alloc(bm->width, bm->height);
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ static int cc_entries;
|
|||
|
||||
#define GAMMA_DIFF 0.005
|
||||
|
||||
|
||||
/* create a color table */
|
||||
Ulong *get_color_table(DviDevice *dev,
|
||||
int nlevels, Ulong fg, Ulong bg, double gamma, int density)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _COLOR_H_
|
||||
#define _COLOR_H_
|
||||
|
||||
|
|
|
|||
|
|
@ -834,6 +834,7 @@ int mdvi_add_fontmap_file(const char *name, const char *fullpath)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void mdvi_flush_encodings(void)
|
||||
{
|
||||
DviEncoding *enc;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
/* simple hash tables for MDVI */
|
||||
|
||||
|
||||
struct _DviHashBucket {
|
||||
DviHashBucket *next;
|
||||
DviHashKey key;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
/* Hash tables */
|
||||
|
||||
|
||||
typedef struct _DviHashBucket DviHashBucket;
|
||||
typedef struct _DviHashTable DviHashTable;
|
||||
|
||||
|
|
@ -17,6 +18,7 @@ typedef Ulong (*DviHashFunc) __PROTO((DviHashKey key));
|
|||
typedef int (*DviHashComp) __PROTO((DviHashKey key1, DviHashKey key2));
|
||||
typedef void (*DviHashFree) __PROTO((DviHashKey key, void *data));
|
||||
|
||||
|
||||
struct _DviHashTable {
|
||||
DviHashBucket **buckets;
|
||||
int nbucks;
|
||||
|
|
|
|||
|
|
@ -414,6 +414,7 @@ struct _DviRange {
|
|||
int step; /* step */
|
||||
};
|
||||
|
||||
|
||||
typedef void (*DviSpecialHandler)
|
||||
__PROTO((DviContext *dvi, const char *prefix, const char *arg));
|
||||
|
||||
|
|
@ -599,6 +600,7 @@ extern int font_free_unused __PROTO((DviDevice *));
|
|||
|
||||
extern int mdvi_encode_font __PROTO((DviParams *, DviFont *));
|
||||
|
||||
|
||||
/* font lookup functions */
|
||||
extern int mdvi_register_font_type __PROTO((DviFontInfo *, int));
|
||||
extern char **mdvi_list_font_class __PROTO((int));
|
||||
|
|
|
|||
|
|
@ -1,67 +0,0 @@
|
|||
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,
|
||||
)
|
||||
|
|
@ -24,6 +24,7 @@ struct _DviPaperSpec {
|
|||
const char *height;
|
||||
};
|
||||
|
||||
|
||||
extern int mdvi_get_paper_size __PROTO((const char *, DviPaper *));
|
||||
extern DviPaperSpec* mdvi_get_paper_specs __PROTO((DviPaperClass));
|
||||
extern void mdvi_free_paper_specs __PROTO((DviPaperSpec *));
|
||||
|
|
|
|||
|
|
@ -212,6 +212,7 @@ void mdvi_flush_specials(void)
|
|||
{
|
||||
DviSpecial *sp, *list;
|
||||
|
||||
|
||||
for(list = (DviSpecial *)specials.head; (sp = list); ) {
|
||||
list = sp->next;
|
||||
if(sp->prefix) mdvi_free(sp->prefix);
|
||||
|
|
|
|||
|
|
@ -258,6 +258,7 @@ int tfm_load_file(const char *filename, TFMInfo *info)
|
|||
/* allocate characters */
|
||||
info->chars = xnalloc(TFMChar, size);
|
||||
|
||||
|
||||
#ifdef WORD_LITTLE_ENDIAN
|
||||
/* byte-swap the three arrays at once (they are consecutive in memory) */
|
||||
swap_array((Uint32 *)widths, nw + nh + nd);
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
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,
|
||||
)
|
||||
|
|
@ -31,9 +31,9 @@
|
|||
#include <libxml/parser.h>
|
||||
#include <libxml/xmlmemory.h>
|
||||
#include <libxml/HTMLparser.h>
|
||||
|
||||
#include <config.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
|
@ -224,6 +224,7 @@ epub_document_links_has_document_links(EvDocumentLinks *document_links)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
typedef struct _LinksCBStruct {
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter *parent;
|
||||
|
|
@ -412,6 +413,7 @@ epub_remove_temporary_dir (gchar *path_name)
|
|||
return (g_remove (path_name));
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
check_mime_type (const gchar* uri,
|
||||
GError** error);
|
||||
|
|
@ -623,55 +625,45 @@ xml_get_data_from_node(xmlNodePtr node,
|
|||
static gboolean
|
||||
check_mime_type(const gchar* uri,GError** error)
|
||||
{
|
||||
GError * err = NULL;
|
||||
const gchar* mimeFromFile;
|
||||
GError * err = NULL ;
|
||||
const gchar* mimeFromFile = ev_file_get_mime_type(uri,FALSE,&err);
|
||||
|
||||
mimeFromFile = ev_file_get_mime_type(uri, FALSE, &err);
|
||||
if (mimeFromFile)
|
||||
gchar* mimetypes[] = {"application/epub+zip","application/x-booki+zip"};
|
||||
int typecount = 2;
|
||||
if ( !mimeFromFile )
|
||||
{
|
||||
const gchar* mimetypes[] = {"application/epub+zip", "application/x-booki+zip", NULL};
|
||||
guint i;
|
||||
|
||||
for (i = 0; mimetypes[i]; i++) {
|
||||
if (strcmp(mimeFromFile, mimetypes[i]) == 0)
|
||||
return TRUE;
|
||||
if (err) {
|
||||
g_propagate_error (error, err);
|
||||
}
|
||||
|
||||
/* fallback for malformed epub files */
|
||||
if (strcmp (mimeFromFile, "application/zip") == 0)
|
||||
{
|
||||
mimeFromFile = ev_file_get_mime_type (uri, TRUE, &err);
|
||||
if (mimeFromFile)
|
||||
{
|
||||
for (i = 0; i < G_N_ELEMENTS (mimetypes); i++) {
|
||||
if (g_strcmp0(mimeFromFile, mimetypes[i]) == 0)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*We didn't find a match*/
|
||||
g_set_error_literal (error,
|
||||
EV_DOCUMENT_ERROR,
|
||||
EV_DOCUMENT_ERROR_INVALID,
|
||||
_("Not an ePub document"));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
g_set_error_literal (error,
|
||||
EV_DOCUMENT_ERROR,
|
||||
EV_DOCUMENT_ERROR_INVALID,
|
||||
_("Unknown MIME Type"));
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (err)
|
||||
g_propagate_error (error, err);
|
||||
else
|
||||
g_set_error_literal (error,
|
||||
EV_DOCUMENT_ERROR,
|
||||
EV_DOCUMENT_ERROR_INVALID,
|
||||
_("Unknown MIME Type"));
|
||||
{
|
||||
int i=0;
|
||||
for (i=0; i < typecount ;i++) {
|
||||
if ( g_strcmp0(mimeFromFile, mimetypes[i]) == 0 ) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
/*We didn't find a match*/
|
||||
g_set_error_literal (error,
|
||||
EV_DOCUMENT_ERROR,
|
||||
EV_DOCUMENT_ERROR_INVALID,
|
||||
_("Not an ePub document"));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
extract_one_file(EpubDocument* epub_document, GFile *tmp_gfile, GError ** error)
|
||||
extract_one_file(EpubDocument* epub_document,GError ** error)
|
||||
{
|
||||
GFile * outfile ;
|
||||
gsize writesize = 0;
|
||||
|
|
@ -698,20 +690,6 @@ extract_one_file(EpubDocument* epub_document, GFile *tmp_gfile, GError ** error)
|
|||
gfilepath = g_string_new(epub_document->tmp_archive_dir) ;
|
||||
g_string_append_printf(gfilepath,"/%s",(gchar*)currentfilename);
|
||||
|
||||
outfile = g_file_new_for_path (gfilepath->str);
|
||||
g_autofree gchar *rpath = g_file_get_relative_path (tmp_gfile, outfile);
|
||||
|
||||
if (rpath == NULL)
|
||||
{
|
||||
g_set_error_literal (error,
|
||||
EV_DOCUMENT_ERROR,
|
||||
EV_DOCUMENT_ERROR_INVALID,
|
||||
_("epub file is invalid or corrupt"));
|
||||
g_critical ("Invalid filename in Epub container - '%s'", (gchar *) currentfilename);
|
||||
result = FALSE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*if we encounter a directory, make a directory inside our temporary folder.*/
|
||||
if (directory != NULL && *directory == '\0')
|
||||
{
|
||||
|
|
@ -739,6 +717,7 @@ extract_one_file(EpubDocument* epub_document, GFile *tmp_gfile, GError ** error)
|
|||
g_string_free(dir_create,TRUE);
|
||||
}
|
||||
|
||||
outfile = g_file_new_for_path(gfilepath->str);
|
||||
outstream = g_file_create(outfile,G_FILE_CREATE_PRIVATE,NULL,error);
|
||||
gpointer buffer = g_malloc0(512);
|
||||
while ( (writesize = unzReadCurrentFile(epub_document->epubDocument,buffer,512) ) != 0 )
|
||||
|
|
@ -751,10 +730,10 @@ extract_one_file(EpubDocument* epub_document, GFile *tmp_gfile, GError ** error)
|
|||
}
|
||||
g_free(buffer);
|
||||
g_output_stream_close((GOutputStream*)outstream,NULL,error);
|
||||
g_object_unref(outstream);
|
||||
g_object_unref(outfile) ;
|
||||
g_object_unref(outstream) ;
|
||||
|
||||
out:
|
||||
g_object_unref(outfile);
|
||||
unzCloseCurrentFile (epub_document->epubDocument) ;
|
||||
g_string_free(gfilepath,TRUE);
|
||||
g_free(currentfilename);
|
||||
|
|
@ -766,7 +745,6 @@ extract_epub_from_container (const gchar* uri,
|
|||
EpubDocument *epub_document,
|
||||
GError ** error)
|
||||
{
|
||||
GFile *tmp_gfile = NULL;
|
||||
GError *err = NULL;
|
||||
epub_document->archivename = g_filename_from_uri(uri,NULL,error);
|
||||
|
||||
|
|
@ -828,10 +806,9 @@ extract_epub_from_container (const gchar* uri,
|
|||
goto out;
|
||||
}
|
||||
|
||||
tmp_gfile = g_file_new_for_path (epub_document->tmp_archive_dir);
|
||||
while ( TRUE )
|
||||
{
|
||||
if ( extract_one_file(epub_document, tmp_gfile, &err) == FALSE )
|
||||
if ( extract_one_file(epub_document,&err) == FALSE )
|
||||
{
|
||||
if (err) {
|
||||
g_propagate_error (error, err);
|
||||
|
|
@ -852,7 +829,6 @@ extract_epub_from_container (const gchar* uri,
|
|||
}
|
||||
|
||||
out:
|
||||
g_clear_object (&tmp_gfile);
|
||||
unzClose(epub_document->epubDocument);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1044,7 +1020,7 @@ setup_document_content_list(const gchar* content_uri, GError** error,gchar *docu
|
|||
}
|
||||
if ( xmlStrcmp(itemrefptr->name,(xmlChar*)"itemref") == 0)
|
||||
{
|
||||
contentListNode *newnode = g_malloc0(sizeof(*newnode));
|
||||
contentListNode *newnode = g_malloc0(sizeof(newnode));
|
||||
newnode->key = (gchar*)xml_get_data_from_node(itemrefptr,XML_ATTRIBUTE,(xmlChar*)"idref");
|
||||
if ( newnode->key == NULL )
|
||||
{
|
||||
|
|
@ -1225,13 +1201,7 @@ setup_index_from_navfile(gchar *tocpath)
|
|||
GList *index = NULL;
|
||||
open_xml_document(tocpath);
|
||||
set_xml_root_node(NULL);
|
||||
xmlNodePtr nav = xml_get_pointer_to_node((xmlChar*)"nav",(xmlChar*)"type",(xmlChar*)"toc");
|
||||
|
||||
if (nav == NULL) {
|
||||
xml_free_doc();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
xmlNodePtr nav = xml_get_pointer_to_node((xmlChar*)"nav",(xmlChar*)"id",(xmlChar*)"toc");
|
||||
xmlretval=NULL;
|
||||
xml_parse_children_of_node(nav,(xmlChar*)"ol", NULL,NULL);
|
||||
gchar *navdirend = g_strrstr(tocpath,"/");
|
||||
|
|
@ -1576,6 +1546,7 @@ epub_document_check_add_night_sheet(EvDocument *document)
|
|||
|
||||
gchar *csspath = g_strdup_printf("%s/atrilnightstyle.css",epub_document->documentdir);
|
||||
|
||||
|
||||
GFile *styles = g_file_new_for_path (csspath);
|
||||
GOutputStream *outstream = (GOutputStream*)g_file_create(styles,G_FILE_CREATE_PRIVATE,NULL,NULL);
|
||||
if ( g_output_stream_write((GOutputStream*)outstream,style,strlen(style),NULL,NULL) == -1 )
|
||||
|
|
@ -1626,7 +1597,7 @@ page_set_function(linknode *Link, GList *contentList)
|
|||
contentListNode *pagedata;
|
||||
|
||||
guint flag=0;
|
||||
while (!flag && listiter) {
|
||||
while (!flag) {
|
||||
pagedata = listiter->data;
|
||||
if (link_present_on_page(Link->pagelink, pagedata->value)) {
|
||||
flag=1;
|
||||
|
|
@ -1649,6 +1620,7 @@ epub_document_set_index_pages(GList *index,GList *contentList)
|
|||
g_list_foreach(index,(GFunc)page_set_function,contentList);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
add_mathjax_script_node_to_file(gchar *filename, gchar *data)
|
||||
{
|
||||
|
|
@ -1796,6 +1768,7 @@ epub_document_init (EpubDocument *epub_document)
|
|||
epub_document->docTitle = NULL;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
epub_document_finalize (GObject *object)
|
||||
{
|
||||
|
|
@ -1837,6 +1810,7 @@ epub_document_finalize (GObject *object)
|
|||
G_OBJECT_CLASS (epub_document_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
epub_document_class_init (EpubDocumentClass *klass)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
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,
|
||||
)
|
||||
|
|
@ -25,6 +25,7 @@
|
|||
#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
|
||||
#endif
|
||||
|
||||
|
||||
#include "ioapi.h"
|
||||
|
||||
voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)
|
||||
|
|
@ -81,6 +82,8 @@ void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filef
|
|||
p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode));
|
||||
static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
|
||||
static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size));
|
||||
|
|
@ -125,6 +128,7 @@ static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename,
|
|||
return file;
|
||||
}
|
||||
|
||||
|
||||
static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size)
|
||||
{
|
||||
uLong ret;
|
||||
|
|
@ -146,6 +150,7 @@ static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
ZPOS64_T ret;
|
||||
|
|
@ -201,6 +206,7 @@ static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
int ret;
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ typedef unsigned long long int ZPOS64_T;
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define ZLIB_FILEFUNC_SEEK_CUR (1)
|
||||
#define ZLIB_FILEFUNC_SEEK_END (2)
|
||||
#define ZLIB_FILEFUNC_SEEK_SET (0)
|
||||
|
|
@ -121,6 +122,7 @@ extern "C" {
|
|||
#define ZLIB_FILEFUNC_MODE_EXISTING (4)
|
||||
#define ZLIB_FILEFUNC_MODE_CREATE (8)
|
||||
|
||||
|
||||
#ifndef ZCALLBACK
|
||||
#if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
|
||||
#define ZCALLBACK CALLBACK
|
||||
|
|
@ -129,6 +131,9 @@ extern "C" {
|
|||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
|
||||
typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
|
||||
typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
|
||||
|
|
@ -138,6 +143,7 @@ typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stre
|
|||
typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
|
||||
typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
|
||||
|
||||
|
||||
/* here is the "old" 32 bits structure structure */
|
||||
typedef struct zlib_filefunc_def_s
|
||||
{
|
||||
|
|
@ -179,6 +185,7 @@ typedef struct zlib_filefunc64_32_def_s
|
|||
seek_file_func zseek32_file;
|
||||
} zlib_filefunc64_32_def;
|
||||
|
||||
|
||||
#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
|
||||
#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
|
||||
//#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream))
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
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,
|
||||
)
|
||||
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
For more info read MiniZip_info.txt
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------
|
||||
Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
|
||||
compatibility with older software. The following is from the original crypt.c.
|
||||
|
|
@ -47,6 +48,7 @@
|
|||
|
||||
Copyright (C) 2007-2008 Even Rouault
|
||||
|
||||
|
||||
Oct-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again).
|
||||
Oct-2009 - Mathias Svensson - Fixed problem if uncompressed size was > 4G and compressed size was <4G
|
||||
should only read the compressed/uncompressed size from the Zip64 format if
|
||||
|
|
@ -61,6 +63,7 @@
|
|||
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -83,17 +86,20 @@
|
|||
# include <errno.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef local
|
||||
# define local static
|
||||
#endif
|
||||
/* compile with -Dlocal if your debugger can't find static symbols */
|
||||
|
||||
|
||||
#ifndef CASESENSITIVITYDEFAULT_NO
|
||||
# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES)
|
||||
# define CASESENSITIVITYDEFAULT_NO
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef UNZ_BUFSIZE
|
||||
#define UNZ_BUFSIZE (16384)
|
||||
#endif
|
||||
|
|
@ -112,12 +118,14 @@
|
|||
#define SIZECENTRALDIRITEM (0x2e)
|
||||
#define SIZEZIPLOCALHEADER (0x1e)
|
||||
|
||||
|
||||
/* unz_file_info_interntal contain internal info about a file in zipfile*/
|
||||
typedef struct unz_file_info64_internal_s
|
||||
{
|
||||
ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */
|
||||
} unz_file_info64_internal;
|
||||
|
||||
|
||||
/* file_in_zip_read_info_s contain internal information about a file in zipfile,
|
||||
when reading and decompress it */
|
||||
typedef struct
|
||||
|
|
@ -148,6 +156,7 @@ typedef struct
|
|||
int raw;
|
||||
} file_in_zip64_read_info_s;
|
||||
|
||||
|
||||
/* unz64_s contain internal information about the zipfile
|
||||
*/
|
||||
typedef struct
|
||||
|
|
@ -180,6 +189,7 @@ typedef struct
|
|||
# endif
|
||||
} unz64_s;
|
||||
|
||||
|
||||
#ifndef NOUNCRYPT
|
||||
#include "crypt.h"
|
||||
#endif
|
||||
|
|
@ -190,6 +200,7 @@ typedef struct
|
|||
IN assertion: the stream s has been successfully opened for reading.
|
||||
*/
|
||||
|
||||
|
||||
local int unz64local_getByte OF((
|
||||
const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream,
|
||||
|
|
@ -213,6 +224,7 @@ local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, v
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* ===========================================================================
|
||||
Reads a long in LSB order from the given gz_stream. Sets
|
||||
*/
|
||||
|
|
@ -283,6 +295,7 @@ local int unz64local_getLong64 OF((
|
|||
voidpf filestream,
|
||||
ZPOS64_T *pX));
|
||||
|
||||
|
||||
local int unz64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream,
|
||||
ZPOS64_T *pX)
|
||||
|
|
@ -351,6 +364,7 @@ local int strcmpcasenosensitive_internal (const char* fileName1, const char* fil
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef CASESENSITIVITYDEFAULT_NO
|
||||
#define CASESENSITIVITYDEFAULTVALUE 2
|
||||
#else
|
||||
|
|
@ -404,6 +418,7 @@ local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f
|
|||
if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
|
||||
return 0;
|
||||
|
||||
|
||||
uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
|
||||
|
||||
if (uMaxBack>uSizeFile)
|
||||
|
|
@ -448,6 +463,7 @@ local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f
|
|||
return uPosFound;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Locate the Central directory 64 of a zipfile (at the end, just before
|
||||
the global comment)
|
||||
|
|
@ -470,6 +486,7 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
|||
if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
|
||||
return 0;
|
||||
|
||||
|
||||
uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
|
||||
|
||||
if (uMaxBack>uSizeFile)
|
||||
|
|
@ -588,6 +605,8 @@ local unzFile unzOpenInternal (const void *path,
|
|||
us.z_filefunc = *pzlib_filefunc64_32_def;
|
||||
us.is64bitOpenFunction = is64bitOpenFunction;
|
||||
|
||||
|
||||
|
||||
us.filestream = ZOPEN64(us.z_filefunc,
|
||||
path,
|
||||
ZLIB_FILEFUNC_MODE_READ |
|
||||
|
|
@ -726,6 +745,7 @@ local unzFile unzOpenInternal (const void *path,
|
|||
us.pfile_in_zip_read = NULL;
|
||||
us.encrypted = 0;
|
||||
|
||||
|
||||
s=(unz64_s*)ALLOC(sizeof(unz64_s));
|
||||
if( s != NULL)
|
||||
{
|
||||
|
|
@ -735,6 +755,7 @@ local unzFile unzOpenInternal (const void *path,
|
|||
return (unzFile)s;
|
||||
}
|
||||
|
||||
|
||||
extern unzFile ZEXPORT unzOpen2 (const char *path,
|
||||
zlib_filefunc_def* pzlib_filefunc32_def)
|
||||
{
|
||||
|
|
@ -793,6 +814,7 @@ extern int ZEXPORT unzClose (unzFile file)
|
|||
return UNZ_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Write info about the ZipFile in the *pglobal_info structure.
|
||||
No preparation of the structure is needed
|
||||
|
|
@ -875,6 +897,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
|||
ZLIB_FILEFUNC_SEEK_SET)!=0)
|
||||
err=UNZ_ERRNO;
|
||||
|
||||
|
||||
/* we check the magic */
|
||||
if (err==UNZ_OK)
|
||||
{
|
||||
|
|
@ -979,6 +1002,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
|||
else
|
||||
lSeek += file_info.size_file_extra;
|
||||
|
||||
|
||||
if ((err==UNZ_OK) && (file_info.size_file_extra != 0))
|
||||
{
|
||||
uLong acc = 0;
|
||||
|
|
@ -1072,6 +1096,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
|||
else
|
||||
lSeek+=file_info.size_file_comment;
|
||||
|
||||
|
||||
if ((err==UNZ_OK) && (pfile_info!=NULL))
|
||||
*pfile_info=file_info;
|
||||
|
||||
|
|
@ -1081,6 +1106,8 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
|||
return err;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Write info about the ZipFile in the *pglobal_info structure.
|
||||
No preparation of the structure is needed
|
||||
|
|
@ -1129,6 +1156,7 @@ extern int ZEXPORT unzGetCurrentFileInfo (unzFile file,
|
|||
|
||||
pfile_info->tmu_date = file_info64.tmu_date,
|
||||
|
||||
|
||||
pfile_info->compressed_size = (uLong)file_info64.compressed_size;
|
||||
pfile_info->uncompressed_size = (uLong)file_info64.uncompressed_size;
|
||||
|
||||
|
|
@ -1184,6 +1212,7 @@ extern int ZEXPORT unzGoToNextFile (unzFile file)
|
|||
return err;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Try locate the file szFileName in the zipfile.
|
||||
For the iCaseSensitivity signification, see unzStringFileNameCompare
|
||||
|
|
@ -1205,6 +1234,7 @@ extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCas
|
|||
ZPOS64_T num_fileSaved;
|
||||
ZPOS64_T pos_in_central_dirSaved;
|
||||
|
||||
|
||||
if (file==NULL)
|
||||
return UNZ_PARAMERROR;
|
||||
|
||||
|
|
@ -1248,6 +1278,7 @@ extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCas
|
|||
return err;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
///////////////////////////////////////////
|
||||
// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net)
|
||||
|
|
@ -1360,6 +1391,7 @@ local int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVa
|
|||
s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
|
||||
return UNZ_ERRNO;
|
||||
|
||||
|
||||
if (err==UNZ_OK)
|
||||
{
|
||||
if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
|
||||
|
|
@ -1562,6 +1594,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
|
|||
pfile_in_zip_read_info->rest_read_uncompressed =
|
||||
s->cur_file_info.uncompressed_size ;
|
||||
|
||||
|
||||
pfile_in_zip_read_info->pos_in_zipfile =
|
||||
s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
|
||||
iSizeVar;
|
||||
|
|
@ -1593,6 +1626,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
|
|||
}
|
||||
# endif
|
||||
|
||||
|
||||
return UNZ_OK;
|
||||
}
|
||||
|
||||
|
|
@ -1653,6 +1687,7 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len)
|
|||
if (pfile_in_zip_read_info==NULL)
|
||||
return UNZ_PARAMERROR;
|
||||
|
||||
|
||||
if (pfile_in_zip_read_info->read_buffer == NULL)
|
||||
return UNZ_END_OF_LIST_OF_FILE;
|
||||
if (len==0)
|
||||
|
|
@ -1696,6 +1731,7 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len)
|
|||
uReadThis)!=uReadThis)
|
||||
return UNZ_ERRNO;
|
||||
|
||||
|
||||
# ifndef NOUNCRYPT
|
||||
if(s->encrypted)
|
||||
{
|
||||
|
|
@ -1707,6 +1743,7 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len)
|
|||
}
|
||||
# endif
|
||||
|
||||
|
||||
pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
|
||||
|
||||
pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
|
||||
|
|
@ -1837,6 +1874,7 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len)
|
|||
return err;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Give the current position in uncompressed data
|
||||
*/
|
||||
|
|
@ -1871,6 +1909,7 @@ extern ZPOS64_T ZEXPORT unztell64 (unzFile file)
|
|||
return pfile_in_zip_read_info->total_out_64;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
return 1 if the end of file was reached, 0 elsewhere
|
||||
*/
|
||||
|
|
@ -1892,6 +1931,8 @@ extern int ZEXPORT unzeof (unzFile file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Read extra field from the current file (opened by unzOpenCurrentFile)
|
||||
This is the local-header version of the extra field (sometimes, there is
|
||||
|
|
@ -1966,6 +2007,7 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file)
|
|||
if (pfile_in_zip_read_info==NULL)
|
||||
return UNZ_PARAMERROR;
|
||||
|
||||
|
||||
if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
|
||||
(!pfile_in_zip_read_info->raw))
|
||||
{
|
||||
|
|
@ -1973,6 +2015,7 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file)
|
|||
err=UNZ_CRCERROR;
|
||||
}
|
||||
|
||||
|
||||
TRYFREE(pfile_in_zip_read_info->read_buffer);
|
||||
pfile_in_zip_read_info->read_buffer = NULL;
|
||||
if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED)
|
||||
|
|
@ -1982,6 +2025,7 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file)
|
|||
BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream);
|
||||
#endif
|
||||
|
||||
|
||||
pfile_in_zip_read_info->stream_initialised = 0;
|
||||
TRYFREE(pfile_in_zip_read_info);
|
||||
|
||||
|
|
@ -1990,6 +2034,7 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file)
|
|||
return err;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Get the global comment string of the ZipFile, in the szComment buffer.
|
||||
uSizeBuf is the size of the szComment buffer.
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ typedef unzFile__ *unzFile;
|
|||
typedef voidp unzFile;
|
||||
#endif
|
||||
|
||||
|
||||
#define UNZ_OK (0)
|
||||
#define UNZ_END_OF_LIST_OF_FILE (-100)
|
||||
#define UNZ_ERRNO (Z_ERRNO)
|
||||
|
|
@ -161,6 +162,7 @@ extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
|
|||
(like 1 on Unix, 2 on Windows)
|
||||
*/
|
||||
|
||||
|
||||
extern unzFile ZEXPORT unzOpen OF((const char *path));
|
||||
extern unzFile ZEXPORT unzOpen64 OF((const void *path));
|
||||
/*
|
||||
|
|
@ -178,6 +180,7 @@ extern unzFile ZEXPORT unzOpen64 OF((const void *path));
|
|||
does not describe the reality
|
||||
*/
|
||||
|
||||
|
||||
extern unzFile ZEXPORT unzOpen2 OF((const char *path,
|
||||
zlib_filefunc_def* pzlib_filefunc_def));
|
||||
/*
|
||||
|
|
@ -209,6 +212,7 @@ extern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file,
|
|||
No preparation of the structure is needed
|
||||
return UNZ_OK if there is no problem. */
|
||||
|
||||
|
||||
extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
|
||||
char *szComment,
|
||||
uLong uSizeBuf));
|
||||
|
|
@ -218,6 +222,7 @@ extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
|
|||
return the number of byte copied or an error code <0
|
||||
*/
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/* Unzip package allow you browse the directory of the zipfile */
|
||||
|
||||
|
|
@ -246,6 +251,7 @@ extern int ZEXPORT unzLocateFile OF((unzFile file,
|
|||
UNZ_END_OF_LIST_OF_FILE if the file is not found
|
||||
*/
|
||||
|
||||
|
||||
/* ****************************************** */
|
||||
/* Ryan supplied functions */
|
||||
/* unz_file_info contain information about a file in the zipfile */
|
||||
|
|
@ -309,12 +315,14 @@ extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
|
|||
(commentBufferSize is the size of the buffer)
|
||||
*/
|
||||
|
||||
|
||||
/** Addition for GDAL : START */
|
||||
|
||||
extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file));
|
||||
|
||||
/** Addition for GDAL : END */
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/* for reading the content of the current zipfile, you can open it, read data
|
||||
from it, and close it (you can close it before reading all the file)
|
||||
|
|
@ -361,6 +369,7 @@ extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
|
|||
but you CANNOT set method parameter as NULL
|
||||
*/
|
||||
|
||||
|
||||
extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
|
||||
/*
|
||||
Close the file in zip opened with unzOpenCurrentFile
|
||||
|
|
@ -419,6 +428,8 @@ extern uLong ZEXPORT unzGetOffset (unzFile file);
|
|||
extern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos);
|
||||
extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
backendsdir = join_paths(prefix, libdir, meson.project_name(), binary_major_version, 'backends')
|
||||
|
||||
foreach sub : backend_subdirs
|
||||
subdir(sub)
|
||||
endforeach
|
||||
|
|
@ -34,6 +34,7 @@ GType pdf_document_get_type (void) G_GNUC_CONST;
|
|||
|
||||
G_MODULE_EXPORT GType register_atril_backend (GTypeModule *module);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __PDF_DOCUMENT_H__ */
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
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,
|
||||
)
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
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,
|
||||
)
|
||||
|
|
@ -201,6 +201,7 @@ pixbuf_document_document_thumbnails_iface_init (EvDocumentThumbnailsInterface *i
|
|||
iface->get_dimensions = pixbuf_document_thumbnails_get_dimensions;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
pixbuf_document_init (PixbufDocument *pixbuf_document)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
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,
|
||||
)
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
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,
|
||||
)
|
||||
|
|
@ -361,6 +361,7 @@ tiff_document_render_pixbuf (EvDocument *document,
|
|||
if (width <= 0 || height <= 0)
|
||||
return NULL;
|
||||
|
||||
|
||||
if (width >= INT_MAX / 4)
|
||||
/* overflow */
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -449,6 +449,7 @@ PlaceImage(TIFF2PSContext *ctx, double pagewidth, double pageheight,
|
|||
return splitpage;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
tiff2ps_process_page(TIFF2PSContext* ctx, TIFF* tif, double pw, double ph,
|
||||
double lm, double bm, gboolean cnt)
|
||||
|
|
@ -591,6 +592,7 @@ tiff2ps_process_page(TIFF2PSContext* ctx, TIFF* tif, double pw, double ph,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static char DuplexPreamble[] = "\
|
||||
%%BeginFeature: *Duplex True\n\
|
||||
systemdict begin\n\
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
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,
|
||||
)
|
||||
|
|
@ -176,6 +176,7 @@ xps_document_get_info (EvDocument *document)
|
|||
EV_DOCUMENT_INFO_N_PAGES |
|
||||
EV_DOCUMENT_INFO_PAPER_SIZE;
|
||||
|
||||
|
||||
if (gxps_document_get_n_pages (xps->doc) > 0) {
|
||||
ev_document_get_page_size (document, 0,
|
||||
&(info->paper_width),
|
||||
|
|
@ -482,6 +483,7 @@ xps_document_document_links_iface_init (EvDocumentLinksInterface *iface)
|
|||
iface->find_link_page = xps_document_links_find_link_page;
|
||||
}
|
||||
|
||||
|
||||
/* EvDocumentPrint */
|
||||
static void
|
||||
xps_document_print_print_page (EvDocumentPrint *document,
|
||||
|
|
|
|||
44
configure.ac
44
configure.ac
|
|
@ -3,8 +3,8 @@
|
|||
# *****************************************************************************
|
||||
|
||||
m4_define([ev_major_version], [1])
|
||||
m4_define([ev_minor_version], [28])
|
||||
m4_define([ev_micro_version], [2])
|
||||
m4_define([ev_minor_version], [25])
|
||||
m4_define([ev_micro_version], [1])
|
||||
m4_define([ev_extra_version], [])
|
||||
m4_define([ev_version], [ev_major_version.ev_minor_version.ev_micro_version()ev_extra_version])
|
||||
|
||||
|
|
@ -91,9 +91,8 @@ GLIB_GSETTINGS
|
|||
|
||||
dnl Specify required versions of dependencies
|
||||
CAIRO_REQUIRED=1.14.0
|
||||
GLIB_REQUIRED=2.54.0
|
||||
GLIB_REQUIRED=2.62.0
|
||||
GTK_REQUIRED=3.22.0
|
||||
MATE_DESKTOP_REQUIRED=1.27.1
|
||||
WEBKIT_REQUIRED=2.6.0
|
||||
LIBSECRET_REQUIRED=0.5
|
||||
LIBXML_REQUIRED=2.5.0
|
||||
|
|
@ -120,7 +119,7 @@ PKG_CHECK_MODULES(BACKEND, cairo >= $CAIRO_REQUIRED gtk+-3.0 >= $GTK_REQUIRED)
|
|||
PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-3.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
|
||||
PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
|
||||
|
||||
PKG_CHECK_MODULES([SHELL_CORE],[libxml-2.0 >= $LIBXML_REQUIRED gtk+-3.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gthread-2.0 x11 mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED])
|
||||
PKG_CHECK_MODULES([SHELL_CORE],[libxml-2.0 >= $LIBXML_REQUIRED gtk+-3.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gthread-2.0 x11])
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
|
|
@ -581,11 +580,8 @@ AC_ARG_ENABLE(comics,
|
|||
[enable_comics=$enableval],
|
||||
[enable_comics=yes])
|
||||
|
||||
COMICS_DEPS="libarchive"
|
||||
if test "x$enable_comics" = "xyes"; then
|
||||
AC_DEFINE([ENABLE_COMICS], [1], [Enable support for comics.])
|
||||
PKG_CHECK_MODULES([COMICS], [$COMICS_DEPS])
|
||||
AC_SUBST(COMICS_LIBS)
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_COMICS, test x$enable_comics = xyes)
|
||||
|
||||
|
|
@ -626,13 +622,7 @@ AC_ARG_ENABLE(epub,
|
|||
|
||||
have_webkit="no"
|
||||
if test "x$enable_epub" = "xyes"; then
|
||||
dnl select the available WebKit2Gtk4 version, with a preference towards 4.1
|
||||
webkit_pkg=webkit2gtk-4.1
|
||||
PKG_CHECK_EXISTS([$webkit_pkg >= $WEBKIT_REQUIRED], [],
|
||||
[PKG_CHECK_EXISTS([webkit2gtk-4.0 >= $WEBKIT_REQUIRED],
|
||||
[webkit_pkg=webkit2gtk-4.0])])
|
||||
|
||||
PKG_CHECK_MODULES(EPUB, $webkit_pkg >= $WEBKIT_REQUIRED \
|
||||
PKG_CHECK_MODULES(EPUB, webkit2gtk-4.0 >= $WEBKIT_REQUIRED \
|
||||
libxml-2.0 >= $LIBXML_REQUIRED zlib,have_webkit=yes,have_webkit=no)
|
||||
|
||||
if test "x$have_webkit" = "xyes"; then
|
||||
|
|
@ -664,7 +654,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/*;"
|
||||
|
|
@ -742,6 +732,28 @@ data/atril.appdata.xml.in
|
|||
data/atril.desktop.in
|
||||
data/Makefile
|
||||
data/icons/Makefile
|
||||
data/icons/16x16/Makefile
|
||||
data/icons/16x16/apps/Makefile
|
||||
data/icons/16x16/actions/Makefile
|
||||
data/icons/16x16/mimetypes/Makefile
|
||||
data/icons/22x22/Makefile
|
||||
data/icons/22x22/apps/Makefile
|
||||
data/icons/22x22/actions/Makefile
|
||||
data/icons/22x22/mimetypes/Makefile
|
||||
data/icons/24x24/Makefile
|
||||
data/icons/24x24/apps/Makefile
|
||||
data/icons/24x24/actions/Makefile
|
||||
data/icons/24x24/mimetypes/Makefile
|
||||
data/icons/32x32/Makefile
|
||||
data/icons/32x32/actions/Makefile
|
||||
data/icons/32x32/mimetypes/Makefile
|
||||
data/icons/48x48/Makefile
|
||||
data/icons/48x48/apps/Makefile
|
||||
data/icons/48x48/actions/Makefile
|
||||
data/icons/scalable/Makefile
|
||||
data/icons/scalable/apps/Makefile
|
||||
data/icons/scalable/actions/Makefile
|
||||
data/icons/scalable/mimetypes/Makefile
|
||||
help/Makefile
|
||||
help/reference/Makefile
|
||||
help/reference/libdocument/Makefile
|
||||
|
|
|
|||
|
|
@ -541,6 +541,7 @@ configure_item_cursor (GtkToolItem *item,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
configure_item_tooltip (GtkToolItem *item)
|
||||
{
|
||||
|
|
@ -556,6 +557,7 @@ configure_item_tooltip (GtkToolItem *item)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
connect_widget_signals (GtkWidget *proxy, EggEditableToolbar *etoolbar)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ static const GtkTargetEntry source_drag_types[] = {
|
|||
{EGG_TOOLBAR_ITEM_TYPE, GTK_TARGET_SAME_APP, 0},
|
||||
};
|
||||
|
||||
|
||||
static void egg_toolbar_editor_finalize (GObject *object);
|
||||
static void update_editor_sheet (EggToolbarEditor *editor);
|
||||
|
||||
|
|
@ -149,11 +150,6 @@ egg_toolbar_editor_disconnect_model (EggToolbarEditor *t)
|
|||
{
|
||||
handler = priv->sig_handlers[i];
|
||||
|
||||
#if GLIB_CHECK_VERSION(2,62,0)
|
||||
if ((handler == 0) || !g_signal_handler_is_connected (model, handler))
|
||||
continue;
|
||||
g_clear_signal_handler (&handler, model);
|
||||
#else
|
||||
if (handler != 0)
|
||||
{
|
||||
if (g_signal_handler_is_connected (model, handler))
|
||||
|
|
@ -163,7 +159,6 @@ egg_toolbar_editor_disconnect_model (EggToolbarEditor *t)
|
|||
|
||||
priv->sig_handlers[i] = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ typedef struct EggToolbarEditorClass EggToolbarEditorClass;
|
|||
#define EGG_IS_TOOLBAR_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TOOLBAR_EDITOR))
|
||||
#define EGG_TOOLBAR_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TOOLBAR_EDITOR, EggToolbarEditorClass))
|
||||
|
||||
|
||||
typedef struct EggToolbarEditor EggToolbarEditor;
|
||||
typedef struct EggToolbarEditorPrivate EggToolbarEditorPrivate;
|
||||
|
||||
|
|
@ -50,6 +51,7 @@ struct EggToolbarEditorClass
|
|||
GtkBoxClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType egg_toolbar_editor_get_type (void);
|
||||
GtkWidget *egg_toolbar_editor_new (GtkUIManager *manager,
|
||||
EggToolbarsModel *model);
|
||||
|
|
|
|||
|
|
@ -27,9 +27,7 @@
|
|||
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlsave.h>
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
static void egg_toolbars_model_finalize (GObject *object);
|
||||
|
|
@ -215,6 +213,7 @@ is_unique (EggToolbarsModel *model,
|
|||
EggToolbarsItem *idata2;
|
||||
GNode *toolbar, *item;
|
||||
|
||||
|
||||
for(toolbar = g_node_first_child (model->priv->toolbars);
|
||||
toolbar != NULL; toolbar = g_node_next_sibling (toolbar))
|
||||
{
|
||||
|
|
@ -331,6 +330,7 @@ egg_toolbars_model_set_flags (EggToolbarsModel *model,
|
|||
0, toolbar_position);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
egg_toolbars_model_get_data (EggToolbarsModel *model,
|
||||
GdkAtom type,
|
||||
|
|
|
|||
|
|
@ -1,98 +0,0 @@
|
|||
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
|
||||
)
|
||||
|
|
@ -34,7 +34,7 @@ struct _EphyZoomControlPrivate
|
|||
float zoom;
|
||||
float min_zoom;
|
||||
float max_zoom;
|
||||
gulong handler_id;
|
||||
guint handler_id;
|
||||
};
|
||||
|
||||
enum
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ ephy_zoom_get_zoom_level_index (float level)
|
|||
return n_zoom_levels - 1;
|
||||
}
|
||||
|
||||
|
||||
float
|
||||
ephy_zoom_get_changed_zoom_level (float level, gint steps)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
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,
|
||||
)
|
||||
41
data/atril-toolbar.xml
Normal file
41
data/atril-toolbar.xml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0"?>
|
||||
<toolbars version="1.0">
|
||||
<available>
|
||||
<toolitem name="FileOpenRecent"/>
|
||||
<toolitem name="FilePrint"/>
|
||||
<toolitem name="FileSaveAs"/>
|
||||
<toolitem name="FileSendTo"/>
|
||||
<toolitem name="ViewContinuous"/>
|
||||
<toolitem name="ViewDual"/>
|
||||
<toolitem name="ViewInvertedColors"/>
|
||||
<toolitem name="ViewReload"/>
|
||||
<toolitem name="ViewAutoscroll"/>
|
||||
<toolitem name="ViewSidebar"/>
|
||||
<toolitem name="ViewZoom"/>
|
||||
<toolitem name="ViewZoomIn"/>
|
||||
<toolitem name="ViewZoomOut"/>
|
||||
<toolitem name="ViewZoomReset"/>
|
||||
<toolitem name="ViewFitPage"/>
|
||||
<toolitem name="ViewFitWidth"/>
|
||||
<toolitem name="ViewFullscreen"/>
|
||||
<toolitem name="ViewPresentation"/>
|
||||
<toolitem name="GoPreviousPage"/>
|
||||
<toolitem name="GoNextPage"/>
|
||||
<toolitem name="GoFirstPage"/>
|
||||
<toolitem name="GoLastPage"/>
|
||||
<toolitem name="EditRotateLeft"/>
|
||||
<toolitem name="EditRotateRight"/>
|
||||
<toolitem name="EditSelectAll"/>
|
||||
<toolitem name="EditFind"/>
|
||||
<toolitem name="PageSelector"/>
|
||||
<toolitem name="Navigation"/>
|
||||
</available>
|
||||
<toolbar name="DefaultToolBar">
|
||||
<toolitem name="GoPreviousPage"/>
|
||||
<toolitem name="GoNextPage"/>
|
||||
<separator/>
|
||||
<toolitem name="PageSelector"/>
|
||||
<separator/>
|
||||
<toolitem name="ViewZoom"/>
|
||||
</toolbar>
|
||||
</toolbars>
|
||||
149
data/atril-ui.xml
Normal file
149
data/atril-ui.xml
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
<ui>
|
||||
<menubar name="MainMenu">
|
||||
<menu name="FileMenu" action="File">
|
||||
<menuitem name="FileOpenMenu" action="FileOpen"/>
|
||||
<menuitem name="FileOpenCopyMenu" action="FileOpenCopy"/>
|
||||
<menuitem name="FileSaveAsMenu" action="FileSaveAs"/>
|
||||
<menuitem name="FileSendToMenu" action="FileSendTo"/>
|
||||
<separator/>
|
||||
<menuitem name="FilePrintMenu" action="FilePrint"/>
|
||||
<separator/>
|
||||
<menuitem name="FilePropertiesMenu" action="FileProperties"/>
|
||||
<separator/>
|
||||
<placeholder name="RecentFilesMenu"/>
|
||||
<separator/>
|
||||
<menuitem name="FileCloseWindowMenu" action="FileCloseWindow"/>
|
||||
</menu>
|
||||
|
||||
<menu name="EditMenu" action="Edit">
|
||||
<menuitem name="EditCopyMenu" action="EditCopy"/>
|
||||
<separator/>
|
||||
<menuitem name="EditSelectAllMenu" action="EditSelectAll"/>
|
||||
<separator/>
|
||||
<menuitem name="EditFindMenu" action="EditFind"/>
|
||||
<menuitem name="EditFindNextMenu" action="EditFindNext"/>
|
||||
<menuitem name="EditFindPreviousMenu" action="EditFindPrevious"/>
|
||||
<separator/>
|
||||
<menuitem name="EditRotateLeftMenu" action="EditRotateLeft"/>
|
||||
<menuitem name="EditRotateRightMenu" action="EditRotateRight"/>
|
||||
<separator/>
|
||||
<menuitem name="EditToolbarMenu" action="EditToolbar"/>
|
||||
<separator/>
|
||||
<menuitem name="EditSaveSettingsMenu" action="EditSaveSettings"/>
|
||||
</menu>
|
||||
|
||||
<menu name="ViewMenu" action="View">
|
||||
<menuitem name="ViewToolbarMenu" action="ViewToolbar"/>
|
||||
<menuitem name="ViewSidebarMenu" action="ViewSidebar"/>
|
||||
<separator/>
|
||||
<menuitem name="ViewFullscreenMenu" action="ViewFullscreen"/>
|
||||
<menuitem name="ViewPresentationMenu" action="ViewPresentation"/>
|
||||
<separator/>
|
||||
<menuitem name="ViewContinuousMenu" action="ViewContinuous"/>
|
||||
<menuitem name="ViewDualMenu" action="ViewDual"/>
|
||||
<menuitem name="ViewDualOddLeftMenu" action="ViewDualOddLeft"/>
|
||||
<separator/>
|
||||
<menuitem name="ViewInvertedColors" action="ViewInvertedColors"/>
|
||||
<separator/>
|
||||
<menuitem name="ViewCaretNavigationMenu" action="ViewCaretNavigation"/>
|
||||
<separator/>
|
||||
<menuitem name="ViewZoomInMenu" action="ViewZoomIn"/>
|
||||
<menuitem name="ViewZoomOutMenu" action="ViewZoomOut"/>
|
||||
<menuitem name="ViewZoomResetMenu" action="ViewZoomReset"/>
|
||||
<menuitem name="ViewFitPageMenu" action="ViewFitPage"/>
|
||||
<menuitem name="ViewFitWidthMenu" action="ViewFitWidth"/>
|
||||
<menuitem name="ViewExpandWindowMenu" action="ViewExpandWindow"/>
|
||||
<separator/>
|
||||
<menuitem name="ViewReload" action="ViewReload"/>
|
||||
</menu>
|
||||
|
||||
<menu name="GoMenu" action="Go">
|
||||
<menuitem name="GoPreviousPageMenu" action="GoPreviousPage"/>
|
||||
<menuitem name="GoNextPageMenu" action="GoNextPage"/>
|
||||
<separator/>
|
||||
<menuitem name="GoFirstPageMenu" action="GoFirstPage"/>
|
||||
<menuitem name="GoLastPageMenu" action="GoLastPage"/>
|
||||
</menu>
|
||||
|
||||
<menu name="BookmarksMenu" action="Bookmarks">
|
||||
<menuitem name="BookmarksAddMenu" action="BookmarksAdd"/>
|
||||
<separator/>
|
||||
<placeholder name="BookmarksItems"/>
|
||||
</menu>
|
||||
|
||||
<menu name="HelpMenu" action="Help">
|
||||
<menuitem name="HelpContentsMenu" action="HelpContents"/>
|
||||
<menuitem name="HelpAboutMenu" action="HelpAbout"/>
|
||||
</menu>
|
||||
</menubar>
|
||||
|
||||
<popup name="DocumentPopup" action="DocumentPopupAction">
|
||||
<menuitem name="OpenLink" action="OpenLink"/>
|
||||
<menuitem name="CopyLinkAddress" action="CopyLinkAddress"/>
|
||||
<menuitem name="GoLink" action="GoLink"/>
|
||||
<menuitem name="OpenLinkNewWindow" action="OpenLinkNewWindow"/>
|
||||
<separator/>
|
||||
<menuitem name="GoPreviousPage" action="GoPreviousPage"/>
|
||||
<menuitem name="GoNextPage" action="GoNextPage"/>
|
||||
<menuitem name="ViewReload" action="ViewReload"/>
|
||||
<menuitem name="ViewAutoscroll" action="ViewAutoscroll"/>
|
||||
<separator/>
|
||||
<menuitem name="EditCopy" action="EditCopy"/>
|
||||
<menuitem name="EditSelectAllPopup" action="EditSelectAll"/>
|
||||
<separator/>
|
||||
<menuitem name="SaveImageAs" action="SaveImageAs"/>
|
||||
<menuitem name="CopyImage" action="CopyImage"/>
|
||||
<separator/>
|
||||
<menuitem name="OpenAttachment" action="OpenAttachment"/>
|
||||
<menuitem name="SaveAttachmentAs" action="SaveAttachmentAs"/>
|
||||
<separator/>
|
||||
<menuitem name="AnnotProperties" action="AnnotProperties"/>
|
||||
<menuitem name="RemoveAnnot" action="RemoveAnnot"/>
|
||||
</popup>
|
||||
|
||||
<popup name="AttachmentPopup" action="AttachmentPopupAction">
|
||||
<menuitem name="OpenAttachment" action="OpenAttachment"/>
|
||||
<separator/>
|
||||
<menuitem name="SaveAttachmentAs" action="SaveAttachmentAs"/>
|
||||
</popup>
|
||||
|
||||
<popup name="ToolbarPopup" action="ToolbarPopupAction">
|
||||
<menuitem name="EditToolbarMenu" action="EditToolbar"/>
|
||||
</popup>
|
||||
|
||||
<accelerator name="PageDownAccel" action="PageDown"/>
|
||||
<accelerator name="PageUpAccel" action="PageUp"/>
|
||||
<accelerator name="GoBackwardFastAccel" action="GoBackwardFast"/>
|
||||
<accelerator name="GoForwardFastAccel" action="GoForwardFast"/>
|
||||
<accelerator name="EscapeAccel" action="Escape"/>
|
||||
<accelerator name="SlashAccel" action="Slash"/>
|
||||
<accelerator name="F3Accel" action="F3"/>
|
||||
<accelerator name="pAccel" action="p"/>
|
||||
<accelerator name="nAccel" action="n"/>
|
||||
<accelerator name="FocusPageSelectorAccel" action="FocusPageSelector"/>
|
||||
<accelerator name="PlusAccel" action="Plus"/>
|
||||
<accelerator name="MinusAccel" action="Minus"/>
|
||||
<accelerator name="Equal" action="Equal"/>
|
||||
<accelerator name="CtrlEqualAccel" action="CtrlEqual"/>
|
||||
<accelerator name="KpPlusAccel" action="KpPlus"/>
|
||||
<accelerator name="KpMinusAccel" action="KpMinus"/>
|
||||
<accelerator name="CtrlKpPlusAccel" action="CtrlKpPlus"/>
|
||||
<accelerator name="CtrlKpMinusAccel" action="CtrlKpMinus"/>
|
||||
<accelerator name="CtrlKpZeroAccel" action="CtrlKpZero"/>
|
||||
<accelerator name="CtrlInsertAccel" action="CtrlInsert" />
|
||||
<accelerator name="FitPageAccel" action ="FitPage" />
|
||||
<accelerator name="FitWidthAccel" action ="FitWidth" />
|
||||
<accelerator name="F7Accel" action="F7" />
|
||||
|
||||
<toolbar name="FullscreenToolbar">
|
||||
<toolitem name="GoPreviousPage" action="GoPreviousPage"/>
|
||||
<toolitem name="GoNextPage" action="GoNextPage"/>
|
||||
<separator/>
|
||||
<toolitem name="PageSelector" action="PageSelector"/>
|
||||
<separator/>
|
||||
<toolitem name="ViewZoom" action="ViewZoom"/>
|
||||
<separator expand="true"/>
|
||||
<toolitem name="StartPresentation" action="StartPresentation"/>
|
||||
<toolitem name="LeaveFullscreen" action="LeaveFullscreen"/>
|
||||
</toolbar>
|
||||
</ui>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
.\" Man page for Atril
|
||||
.TH ATRIL 1 "10 May 2023" "MATE Desktop Environment"
|
||||
.TH ATRIL 1 "30 January 2014" "MATE Desktop Environment"
|
||||
.\" Please adjust this date when revising the manpage.
|
||||
.\"
|
||||
.SH "NAME"
|
||||
|
|
@ -7,7 +7,7 @@ Atril \- The MATE Document Viewer
|
|||
.SH "SYNTAX"
|
||||
.B atril [OPTIONS...] [FILES...]
|
||||
.SH "DESCRIPTION"
|
||||
Atril is the official Document Viewer of the MATE Desktop Environment, it is a simple multi-page document viewer. It can display and print PostScript (PS), Encapsulated PostScript (EPS), DJVU, DVI, epub, XPS and Portable Document Format (PDF) files.
|
||||
Atril is the official Document Viewer of the MATE Desktop Environment, it is a simple multi-page document viewer. It can display and print PostScript (PS), Encapsulated PostScript (EPS), DJVU, DVI, XPS and Portable Document Format (PDF) files.
|
||||
.TP
|
||||
When supported by the document, it also allows searching for text, copying text to the clipboard, hypertext navigation, and table-of-contents bookmarks.
|
||||
.TP
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB |
3
data/icons/16x16/Makefile.am
Normal file
3
data/icons/16x16/Makefile.am
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
SUBDIRS = actions apps mimetypes
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
27
data/icons/16x16/actions/Makefile.am
Normal file
27
data/icons/16x16/actions/Makefile.am
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
themedir = $(pkgdatadir)/icons/hicolor
|
||||
size = 16x16
|
||||
context = actions
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
view-page-continuous.png \
|
||||
view-page-facing.png \
|
||||
zoom.png \
|
||||
zoom-fit-height.png \
|
||||
zoom-fit-width.png \
|
||||
object-rotate-left.png \
|
||||
object-rotate-right.png
|
||||
|
||||
noinst_DATA = \
|
||||
view-page-continuous.xcf \
|
||||
view-page-facing.xcf \
|
||||
zoom.svg \
|
||||
zoom-fit-page.svg \
|
||||
zoom-fit-width.svg
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
16
data/icons/16x16/apps/Makefile.am
Normal file
16
data/icons/16x16/apps/Makefile.am
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
themedir = $(datadir)/icons/hicolor
|
||||
size = 16x16
|
||||
context = apps
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
atril.png
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
16
data/icons/16x16/mimetypes/Makefile.am
Normal file
16
data/icons/16x16/mimetypes/Makefile.am
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
themedir = $(pkgdatadir)/icons/hicolor
|
||||
size = 16x16
|
||||
context = mimetypes
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
x-office-presentation.png
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
3
data/icons/22x22/Makefile.am
Normal file
3
data/icons/22x22/Makefile.am
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
SUBDIRS = actions apps mimetypes
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
28
data/icons/22x22/actions/Makefile.am
Normal file
28
data/icons/22x22/actions/Makefile.am
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
themedir = $(pkgdatadir)/icons/hicolor
|
||||
size = 22x22
|
||||
context = actions
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
eye.png \
|
||||
object-rotate-left.png \
|
||||
object-rotate-right.png \
|
||||
view-page-continuous.png \
|
||||
view-page-facing.png \
|
||||
zoom.png \
|
||||
zoom-fit-page.png \
|
||||
zoom-fit-width.png
|
||||
|
||||
noinst_DATA = \
|
||||
view-page-continuous.xcf \
|
||||
view-page-facing.xcf \
|
||||
zoom.svg \
|
||||
zoom-fit-page.svg \
|
||||
zoom-fit-width.svg
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
16
data/icons/22x22/apps/Makefile.am
Normal file
16
data/icons/22x22/apps/Makefile.am
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
themedir = $(datadir)/icons/hicolor
|
||||
size = 22x22
|
||||
context = apps
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
atril.png
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
16
data/icons/22x22/mimetypes/Makefile.am
Normal file
16
data/icons/22x22/mimetypes/Makefile.am
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
themedir = $(pkgdatadir)/icons/hicolor
|
||||
size = 22x22
|
||||
context = mimetypes
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
x-office-presentation.png
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
3
data/icons/24x24/Makefile.am
Normal file
3
data/icons/24x24/Makefile.am
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
SUBDIRS = actions apps mimetypes
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
23
data/icons/24x24/actions/Makefile.am
Normal file
23
data/icons/24x24/actions/Makefile.am
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
themedir = $(pkgdatadir)/icons/hicolor
|
||||
size = 24x24
|
||||
context = actions
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
stock_filters-invert.png \
|
||||
view-page-continuous.png \
|
||||
view-page-facing.png \
|
||||
zoom.png \
|
||||
zoom-fit-height.png \
|
||||
zoom-fit-width.png \
|
||||
object-rotate-left.png \
|
||||
object-rotate-right.png
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
16
data/icons/24x24/apps/Makefile.am
Normal file
16
data/icons/24x24/apps/Makefile.am
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
themedir = $(datadir)/icons/hicolor
|
||||
size = 24x24
|
||||
context = apps
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
atril.png
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
16
data/icons/24x24/mimetypes/Makefile.am
Normal file
16
data/icons/24x24/mimetypes/Makefile.am
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
themedir = $(pkgdatadir)/icons/hicolor
|
||||
size = 24x24
|
||||
context = mimetypes
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
x-office-presentation.png
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
3
data/icons/32x32/Makefile.am
Normal file
3
data/icons/32x32/Makefile.am
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
SUBDIRS = actions mimetypes
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
19
data/icons/32x32/actions/Makefile.am
Normal file
19
data/icons/32x32/actions/Makefile.am
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
themedir = $(pkgdatadir)/icons/hicolor
|
||||
size = 32x32
|
||||
context = actions
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
object-rotate-left.png \
|
||||
object-rotate-right.png \
|
||||
view-page-continuous.png \
|
||||
view-page-facing.png
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
16
data/icons/32x32/mimetypes/Makefile.am
Normal file
16
data/icons/32x32/mimetypes/Makefile.am
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
themedir = $(pkgdatadir)/icons/hicolor
|
||||
size = 32x32
|
||||
context = mimetypes
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
x-office-presentation.png
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
4
data/icons/48x48/Makefile.am
Normal file
4
data/icons/48x48/Makefile.am
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
SUBDIRS = actions apps
|
||||
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
20
data/icons/48x48/actions/Makefile.am
Normal file
20
data/icons/48x48/actions/Makefile.am
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
themedir = $(pkgdatadir)/icons/hicolor
|
||||
size = 48x48
|
||||
context = actions
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
close.png \
|
||||
view-page-continuous.png \
|
||||
view-page-facing.png \
|
||||
resize-se.png \
|
||||
resize-sw.png
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
16
data/icons/48x48/apps/Makefile.am
Normal file
16
data/icons/48x48/apps/Makefile.am
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
themedir = $(datadir)/icons/hicolor
|
||||
size = 48x48
|
||||
context = apps
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
atril.png
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB |
|
|
@ -1,66 +1,4 @@
|
|||
iconsdir = $(datadir)/icons/hicolor
|
||||
pkgiconsdir = $(pkgdatadir)/icons/hicolor
|
||||
SUBDIRS = 16x16 22x22 24x24 32x32 48x48 scalable
|
||||
|
||||
nobase_dist_icons_DATA = \
|
||||
16x16/apps/atril.png \
|
||||
22x22/apps/atril.png \
|
||||
24x24/apps/atril.png \
|
||||
48x48/apps/atril.png \
|
||||
64x64/apps/atril.png \
|
||||
128x128/apps/atril.png \
|
||||
scalable/apps/atril.svg
|
||||
|
||||
nobase_dist_pkgicons_DATA = \
|
||||
16x16/actions/object-rotate-left.png \
|
||||
16x16/actions/object-rotate-right.png \
|
||||
16x16/actions/view-page-continuous.png \
|
||||
16x16/actions/view-page-facing.png \
|
||||
16x16/actions/zoom.png \
|
||||
16x16/actions/zoom-fit-height.png \
|
||||
16x16/actions/zoom-fit-width.png \
|
||||
16x16/mimetypes/x-office-presentation.png \
|
||||
22x22/actions/eye.png \
|
||||
22x22/actions/object-rotate-left.png \
|
||||
22x22/actions/object-rotate-right.png \
|
||||
22x22/actions/view-page-continuous.png \
|
||||
22x22/actions/view-page-facing.png \
|
||||
22x22/actions/zoom.png \
|
||||
22x22/actions/zoom-fit-page.png \
|
||||
22x22/actions/zoom-fit-width.png \
|
||||
22x22/mimetypes/x-office-presentation.png \
|
||||
24x24/actions/object-rotate-left.png \
|
||||
24x24/actions/object-rotate-right.png \
|
||||
24x24/actions/stock_filters-invert.png \
|
||||
24x24/actions/view-page-continuous.png \
|
||||
24x24/actions/view-page-facing.png \
|
||||
24x24/actions/zoom.png \
|
||||
24x24/actions/zoom-fit-height.png \
|
||||
24x24/actions/zoom-fit-width.png \
|
||||
24x24/mimetypes/x-office-presentation.png \
|
||||
32x32/actions/object-rotate-left.png \
|
||||
32x32/actions/object-rotate-right.png \
|
||||
32x32/actions/view-page-continuous.png \
|
||||
32x32/actions/view-page-facing.png \
|
||||
32x32/mimetypes/x-office-presentation.png \
|
||||
48x48/actions/close.png \
|
||||
48x48/actions/view-page-continuous.png \
|
||||
48x48/actions/view-page-facing.png \
|
||||
48x48/actions/resize-se.png \
|
||||
48x48/actions/resize-sw.png \
|
||||
scalable/actions/object-rotate-left.svg \
|
||||
scalable/actions/object-rotate-right.svg \
|
||||
scalable/mimetypes/x-office-presentation.svg
|
||||
|
||||
dist_noinst_DATA = \
|
||||
16x16/actions/view-page-continuous.xcf \
|
||||
16x16/actions/view-page-facing.xcf \
|
||||
16x16/actions/zoom.svg \
|
||||
16x16/actions/zoom-fit-page.svg \
|
||||
16x16/actions/zoom-fit-width.svg \
|
||||
22x22/actions/view-page-continuous.xcf \
|
||||
22x22/actions/view-page-facing.xcf \
|
||||
22x22/actions/zoom.svg \
|
||||
22x22/actions/zoom-fit-page.svg \
|
||||
22x22/actions/zoom-fit-width.svg
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
|
|
|||
|
|
@ -1,73 +0,0 @@
|
|||
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
|
||||
3
data/icons/scalable/Makefile.am
Normal file
3
data/icons/scalable/Makefile.am
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
SUBDIRS = actions apps mimetypes
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
17
data/icons/scalable/actions/Makefile.am
Normal file
17
data/icons/scalable/actions/Makefile.am
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
themedir = $(pkgdatadir)/icons/hicolor
|
||||
size = scalable
|
||||
context = actions
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
object-rotate-left.svg \
|
||||
object-rotate-right.svg
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
16
data/icons/scalable/apps/Makefile.am
Normal file
16
data/icons/scalable/apps/Makefile.am
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
themedir = $(datadir)/icons/hicolor
|
||||
size = scalable
|
||||
context = apps
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
atril.svg
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
16
data/icons/scalable/mimetypes/Makefile.am
Normal file
16
data/icons/scalable/mimetypes/Makefile.am
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
themedir = $(pkgdatadir)/icons/hicolor
|
||||
size = scalable
|
||||
context = mimetypes
|
||||
|
||||
iconsdir = $(themedir)/$(size)/$(context)
|
||||
|
||||
icons_DATA = \
|
||||
x-office-presentation.svg
|
||||
|
||||
noinst_DATA =
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icons_DATA) \
|
||||
$(noinst_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
|
||||
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())
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2023-08-31 17:43+0200\n"
|
||||
"POT-Creation-Date: 2021-03-29 20:47+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
|
|||
4920
help/ca/ca.po
4920
help/ca/ca.po
File diff suppressed because it is too large
Load diff
4025
help/cs/cs.po
4025
help/cs/cs.po
File diff suppressed because it is too large
Load diff
4842
help/da/da.po
4842
help/da/da.po
File diff suppressed because it is too large
Load diff
4237
help/de/de.po
4237
help/de/de.po
File diff suppressed because it is too large
Load diff
4412
help/el/el.po
4412
help/el/el.po
File diff suppressed because it is too large
Load diff
4553
help/en_GB/en_GB.po
4553
help/en_GB/en_GB.po
File diff suppressed because it is too large
Load diff
4579
help/es/es.po
4579
help/es/es.po
File diff suppressed because it is too large
Load diff
4430
help/fr/fr.po
4430
help/fr/fr.po
File diff suppressed because it is too large
Load diff
4150
help/gl/gl.po
4150
help/gl/gl.po
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue