Commit a5b179aa authored by Jeremy Bicha's avatar Jeremy Bicha

New upstream version 3.29.91

parents c99a4b13 e7826f7f
This diff is collapsed.
...@@ -46,7 +46,7 @@ header_DATA = \ ...@@ -46,7 +46,7 @@ header_DATA = \
# Appdata files # Appdata files
appdatadir = $(datadir)/metainfo appdatadir = $(datadir)/metainfo
appdata_in_files = evince.appdata.xml.in appdata_in_files = org.gnome.Evince.appdata.xml.in
nodist_appdata_DATA = $(appdata_in_files:.xml.in=.xml) nodist_appdata_DATA = $(appdata_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@ @INTLTOOL_XML_RULE@
......
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -199,8 +199,8 @@ DIST_SUBDIRS = cut-n-paste data libdocument backend libview libmisc \ ...@@ -199,8 +199,8 @@ DIST_SUBDIRS = cut-n-paste data libdocument backend libview libmisc \
properties shell po help thumbnailer previewer browser-plugin properties shell po help thumbnailer previewer browser-plugin
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(srcdir)/evince-document.pc.in $(srcdir)/evince-view.pc.in \ $(srcdir)/evince-document.pc.in $(srcdir)/evince-view.pc.in \
AUTHORS COPYING ChangeLog NEWS README TODO compile \ AUTHORS COPYING ChangeLog NEWS TODO compile config.guess \
config.guess config.sub depcomp install-sh ltmain.sh missing config.sub depcomp install-sh ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION) distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir) top_distdir = $(distdir)
...@@ -326,6 +326,8 @@ GMOFILES = @GMOFILES@ ...@@ -326,6 +326,8 @@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
GREP = @GREP@ GREP = @GREP@
GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@ GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
GSPELL_CFLAGS = @GSPELL_CFLAGS@
GSPELL_LIBS = @GSPELL_LIBS@
GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@
GSTREAMER_LIBS = @GSTREAMER_LIBS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@
GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_CHECK = @GTKDOC_CHECK@
...@@ -351,7 +353,6 @@ INSTOBJEXT = @INSTOBJEXT@ ...@@ -351,7 +353,6 @@ INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
...@@ -436,6 +437,8 @@ SHELL_LIBS = @SHELL_LIBS@ ...@@ -436,6 +437,8 @@ SHELL_LIBS = @SHELL_LIBS@
SPECTRE_CFLAGS = @SPECTRE_CFLAGS@ SPECTRE_CFLAGS = @SPECTRE_CFLAGS@
SPECTRE_LIBS = @SPECTRE_LIBS@ SPECTRE_LIBS = @SPECTRE_LIBS@
STRIP = @STRIP@ STRIP = @STRIP@
SYNCTEX_CFLAGS = @SYNCTEX_CFLAGS@
SYNCTEX_LIBS = @SYNCTEX_LIBS@
TIFF_MIME_TYPES = @TIFF_MIME_TYPES@ TIFF_MIME_TYPES = @TIFF_MIME_TYPES@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
...@@ -528,7 +531,7 @@ header_DATA = \ ...@@ -528,7 +531,7 @@ header_DATA = \
# Appdata files # Appdata files
appdatadir = $(datadir)/metainfo appdatadir = $(datadir)/metainfo
appdata_in_files = evince.appdata.xml.in appdata_in_files = org.gnome.Evince.appdata.xml.in
nodist_appdata_DATA = $(appdata_in_files:.xml.in=.xml) nodist_appdata_DATA = $(appdata_in_files:.xml.in=.xml)
# Applications # Applications
...@@ -882,7 +885,7 @@ distdir: $(DISTFILES) ...@@ -882,7 +885,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)" || chmod -R a+r "$(distdir)"
dist-gzip: distdir dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-bzip2: distdir dist-bzip2: distdir
...@@ -907,7 +910,7 @@ dist-shar: distdir ...@@ -907,7 +910,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \ @echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2 "deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-zip: distdir dist-zip: distdir
...@@ -925,7 +928,7 @@ dist dist-all: ...@@ -925,7 +928,7 @@ dist dist-all:
distcheck: dist distcheck: dist
case '$(DIST_ARCHIVES)' in \ case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \ *.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \ *.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \ *.tar.lz*) \
...@@ -935,7 +938,7 @@ distcheck: dist ...@@ -935,7 +938,7 @@ distcheck: dist
*.tar.Z*) \ *.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \ *.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \ *.zip*) \
unzip $(distdir).zip ;;\ unzip $(distdir).zip ;;\
esac esac
......
================= =================
Evince 3.28.2 Evince 3.29.91
================= =================
UI translations: Bug fixes and improvements.
* Daniel Șerbănescu (ro)
* Stas Solovey (ru)
Doc translations: =================
* Anders Jonsson (sv) Evince 3.29.90
=================
Revamped the user interface.
Bug fixes and improvements.
=================
Evince 3.29.1
=================
Bug fixes and improvements.
================= =================
Evince 3.28.0 Evince 3.28.0
...@@ -378,11 +386,14 @@ Bug fixes: ...@@ -378,11 +386,14 @@ Bug fixes:
* Fix several memory leaks (#770070 and #770069, Eric R. Schulz) * Fix several memory leaks (#770070 and #770069, Eric R. Schulz)
* Fix scaling calculation in PostScript backend (#755776, Jason * Fix scaling calculation in PostScript backend (#755776, Jason
Crain) Crain)
* Fix a crash when processing button events in EvView (#769700,
Marek Kasik)
* Fix a crash when opening a copy of a document with annotation * Fix a crash when opening a copy of a document with annotation
popup windows (#760299, Jose Aliste) popup windows (#760299, Jose Aliste)
Security Fixes:
* Fix a crash when processing button events in EvView (#769700)
CVE-2013-3718. (Marek Kasik)
Translation updates: Translation updates:
* David Medina (ca) * David Medina (ca)
...@@ -2973,11 +2984,14 @@ New Features and UI Improvements: ...@@ -2973,11 +2984,14 @@ New Features and UI Improvements:
Bug fixes: Bug fixes:
* Fix return value in g_return_val_if_fail() macro (Daniel Garcia) * Fix return value in g_return_val_if_fail() macro (Daniel Garcia)
* Fix several security issues in dvi backend: CVE-2010-2640,
CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643 (José Aliste)
* Do not use deprecated API: GdkCursor, GtkStyle, size-request * Do not use deprecated API: GdkCursor, GtkStyle, size-request
(Carlos Garcia Campos) (Carlos Garcia Campos)
Security Fixes:
* Fix several security issues in dvi backend: CVE-2010-2640,
CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643 (José Aliste)
Translation updates: Translation updates:
* Khaled Hosny (ar) * Khaled Hosny (ar)
...@@ -5212,7 +5226,7 @@ Bug Fixes: ...@@ -5212,7 +5226,7 @@ Bug Fixes:
Security Fixes: Security Fixes:
* Buffer overflow in PS backend. CVE-2006-5864. (Carlos Garcia Campos) * Buffer overflow in PS backend (#380191). CVE-2006-5864. (Carlos Garcia Campos)
Translations: Translations:
......
Evince
==================================================
Evince is a document viewer capable of displaying
multiple and single page document formats like PDF
and Postscript. For more general information about
Evince please visit our website at
https://wiki.gnome.org/Apps/Evince
This software is licensed under the GPL
Evince Requirements
==================================================
GNOME Platform libraries [ http://www.gnome.org/start/ ]
Poppler for PDF viewing [ http://poppler.freedesktop.org/ ]
GhostScript for Postscript viewing [ http://pages.cs.wisc.edu/~ghost/ ]
Evince Optional Backend Libraries
==================================================
DjVuLibre for DjVu viewing [ http://djvulibre.djvuzone.org/ ]
Rar for viewing CBR comics [ http://www.rarlab.com/ ]
This diff is collapsed.
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
srcdir=`dirname $0` srcdir=`dirname $0`
test -z "$srcdir" && srcdir=. test -z "$srcdir" && srcdir=.
PKG_NAME="evince"
(test -f $srcdir/configure.ac) || { (test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory" echo " top-level $PKG_NAME directory"
...@@ -19,5 +17,4 @@ which gnome-autogen.sh || { ...@@ -19,5 +17,4 @@ which gnome-autogen.sh || {
REQUIRED_AUTOMAKE_VERSION=1.10 REQUIRED_AUTOMAKE_VERSION=1.10
REQUIRED_GTK_DOC_VERSION=1.13 REQUIRED_GTK_DOC_VERSION=1.13
USE_GNOME2_MACROS=1
. gnome-autogen.sh . gnome-autogen.sh
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -276,6 +276,8 @@ GMOFILES = @GMOFILES@ ...@@ -276,6 +276,8 @@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
GREP = @GREP@ GREP = @GREP@
GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@ GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
GSPELL_CFLAGS = @GSPELL_CFLAGS@
GSPELL_LIBS = @GSPELL_LIBS@
GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@
GSTREAMER_LIBS = @GSTREAMER_LIBS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@
GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_CHECK = @GTKDOC_CHECK@
...@@ -301,7 +303,6 @@ INSTOBJEXT = @INSTOBJEXT@ ...@@ -301,7 +303,6 @@ INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
...@@ -386,6 +387,8 @@ SHELL_LIBS = @SHELL_LIBS@ ...@@ -386,6 +387,8 @@ SHELL_LIBS = @SHELL_LIBS@
SPECTRE_CFLAGS = @SPECTRE_CFLAGS@ SPECTRE_CFLAGS = @SPECTRE_CFLAGS@
SPECTRE_LIBS = @SPECTRE_LIBS@ SPECTRE_LIBS = @SPECTRE_LIBS@
STRIP = @STRIP@ STRIP = @STRIP@
SYNCTEX_CFLAGS = @SYNCTEX_CFLAGS@
SYNCTEX_LIBS = @SYNCTEX_LIBS@
TIFF_MIME_TYPES = @TIFF_MIME_TYPES@ TIFF_MIME_TYPES = @TIFF_MIME_TYPES@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
......
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -315,6 +315,8 @@ GMOFILES = @GMOFILES@ ...@@ -315,6 +315,8 @@ GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
GREP = @GREP@ GREP = @GREP@
GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@ GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
GSPELL_CFLAGS = @GSPELL_CFLAGS@
GSPELL_LIBS = @GSPELL_LIBS@
GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@
GSTREAMER_LIBS = @GSTREAMER_LIBS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@
GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_CHECK = @GTKDOC_CHECK@
...@@ -340,7 +342,6 @@ INSTOBJEXT = @INSTOBJEXT@ ...@@ -340,7 +342,6 @@ INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
...@@ -425,6 +426,8 @@ SHELL_LIBS = @SHELL_LIBS@ ...@@ -425,6 +426,8 @@ SHELL_LIBS = @SHELL_LIBS@
SPECTRE_CFLAGS = @SPECTRE_CFLAGS@ SPECTRE_CFLAGS = @SPECTRE_CFLAGS@
SPECTRE_LIBS = @SPECTRE_LIBS@ SPECTRE_LIBS = @SPECTRE_LIBS@
STRIP = @STRIP@ STRIP = @STRIP@
SYNCTEX_CFLAGS = @SYNCTEX_CFLAGS@
SYNCTEX_LIBS = @SYNCTEX_LIBS@
TIFF_MIME_TYPES = @TIFF_MIME_TYPES@ TIFF_MIME_TYPES = @TIFF_MIME_TYPES@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
......
...@@ -54,13 +54,61 @@ struct _ComicsDocument ...@@ -54,13 +54,61 @@ struct _ComicsDocument
GPtrArray *page_names; GPtrArray *page_names;
}; };
static GSList* get_supported_image_extensions (void);
EV_BACKEND_REGISTER (ComicsDocument, comics_document) EV_BACKEND_REGISTER (ComicsDocument, comics_document)
static gboolean #define FORMAT_UNKNOWN 0
#define FORMAT_SUPPORTED 1
#define FORMAT_UNSUPPORTED 2
/* Returns a GHashTable of:
* <key>: file extensions
* <value>: degree of support in gdk-pixbuf */
static GHashTable *
get_image_extensions(void)
{
GHashTable *extensions;
GSList *formats = gdk_pixbuf_get_formats ();
GSList *l;
guint i;
const char *known_image_formats[] = {
"png",
"jpg",
"jpeg",
"webp"
};
extensions = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, NULL);
for (l = formats; l != NULL; l = l->next) {
int i;
gchar **ext = gdk_pixbuf_format_get_extensions (l->data);
for (i = 0; ext[i] != NULL; i++) {
g_hash_table_insert (extensions,
g_strdup (ext[i]),
GINT_TO_POINTER (FORMAT_SUPPORTED));
}
g_strfreev (ext);
}
g_slist_free (formats);
/* Add known image formats that aren't supported by gdk-pixbuf */
for (i = 0; i < G_N_ELEMENTS (known_image_formats); i++) {
if (!g_hash_table_lookup (extensions, known_image_formats[i])) {
g_hash_table_insert (extensions,
g_strdup (known_image_formats[i]),
GINT_TO_POINTER (FORMAT_UNSUPPORTED));
}
}
return extensions;
}
static int
has_supported_extension (const char *name, has_supported_extension (const char *name,
GSList *supported_extensions) GHashTable *supported_extensions)
{ {
gboolean ret = FALSE; gboolean ret = FALSE;
gchar *suffix; gchar *suffix;
...@@ -70,10 +118,7 @@ has_supported_extension (const char *name, ...@@ -70,10 +118,7 @@ has_supported_extension (const char *name,
return ret; return ret;
suffix = g_ascii_strdown (suffix + 1, -1); suffix = g_ascii_strdown (suffix + 1, -1);
if (g_slist_find_custom (supported_extensions, suffix, ret = GPOINTER_TO_INT (g_hash_table_lookup (supported_extensions, suffix));
(GCompareFunc) strcmp) != NULL) {
ret = TRUE;
}
g_free (suffix); g_free (suffix);
return ret; return ret;
...@@ -103,8 +148,8 @@ comics_document_list (ComicsDocument *comics_document, ...@@ -103,8 +148,8 @@ comics_document_list (ComicsDocument *comics_document,
GError **error) GError **error)
{ {
GPtrArray *array = NULL; GPtrArray *array = NULL;
gboolean has_encrypted_files; gboolean has_encrypted_files, has_unsupported_images;
GSList *supported_extensions; GHashTable *supported_extensions = NULL;
if (!ev_archive_open_filename (comics_document->archive, comics_document->archive_path, error)) { if (!ev_archive_open_filename (comics_document->archive, comics_document->archive_path, error)) {
if (*error != NULL) { if (*error != NULL) {
...@@ -119,13 +164,15 @@ comics_document_list (ComicsDocument *comics_document, ...@@ -119,13 +164,15 @@ comics_document_list (ComicsDocument *comics_document,
goto out; goto out;
} }
supported_extensions = get_supported_image_extensions (); supported_extensions = get_image_extensions ();
has_encrypted_files = FALSE; has_encrypted_files = FALSE;
has_unsupported_images = FALSE;
array = g_ptr_array_sized_new (64); array = g_ptr_array_sized_new (64);
while (1) { while (1) {
const char *name; const char *name;
int supported;
if (!ev_archive_read_next_header (comics_document->archive, error)) { if (!ev_archive_read_next_header (comics_document->archive, error)) {
if (*error != NULL) { if (*error != NULL) {
...@@ -150,9 +197,14 @@ comics_document_list (ComicsDocument *comics_document, ...@@ -150,9 +197,14 @@ comics_document_list (ComicsDocument *comics_document,
continue; continue;
} }
if (!has_supported_extension (name, supported_extensions)) { supported = has_supported_extension (name, supported_extensions);
if (supported == FORMAT_UNKNOWN) {
g_debug ("Not adding unsupported file '%s' to the list of files in the comics", name); g_debug ("Not adding unsupported file '%s' to the list of files in the comics", name);
continue; continue;
} else if (supported == FORMAT_UNSUPPORTED) {
g_debug ("Not adding unsupported image '%s' to the list of files in the comics", name);
has_unsupported_images = TRUE;
continue;
} }
if (ev_archive_get_entry_is_encrypted (comics_document->archive)) { if (ev_archive_get_entry_is_encrypted (comics_document->archive)) {
...@@ -174,6 +226,11 @@ comics_document_list (ComicsDocument *comics_document, ...@@ -174,6 +226,11 @@ comics_document_list (ComicsDocument *comics_document,
EV_DOCUMENT_ERROR, EV_DOCUMENT_ERROR,
EV_DOCUMENT_ERROR_ENCRYPTED, EV_DOCUMENT_ERROR_ENCRYPTED,
_("Archive is encrypted")); _("Archive is encrypted"));
} else if (has_unsupported_images) {
g_set_error_literal (error,
EV_DOCUMENT_ERROR,
EV_DOCUMENT_ERROR_UNSUPPORTED_CONTENT,
_("No supported images in archive"));
} else { } else {
g_set_error_literal (error, g_set_error_literal (error,
EV_DOCUMENT_ERROR, EV_DOCUMENT_ERROR,
...@@ -183,6 +240,8 @@ comics_document_list (ComicsDocument *comics_document, ...@@ -183,6 +240,8 @@ comics_document_list (ComicsDocument *comics_document,
} }