evince/evince-3.18.2-multipage-djvu.patch
2016-03-08 17:15:57 +01:00

46 lines
1.9 KiB
Diff

From 7850b986cf3225369170cdec545844b025bfd12e Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Tue, 16 Feb 2016 11:54:21 +0100
Subject: [PATCH] Recognize multipage DjVu MIME type
There is new image/vnd.djvu+multipage MIME type for DjVu documents
in shared-mime-info.
This MIME type is used if Evince has to guess type of the document.
Evince states that it doesn't support it in such case.
This is reproducible if the opened document doesn't have an extension.
https://bugzilla.gnome.org/show_bug.cgi?id=754467
---
browser-plugin/EvBrowserPluginMain.cpp | 1 +
configure.ac | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/browser-plugin/EvBrowserPluginMain.cpp b/browser-plugin/EvBrowserPluginMain.cpp
index fb749f4..a25bb2f 100644
--- a/browser-plugin/EvBrowserPluginMain.cpp
+++ b/browser-plugin/EvBrowserPluginMain.cpp
@@ -252,6 +252,7 @@ static const struct {
{ "application/x-cbt", "cbt" },
{ "application/x-ext-cbt", "cbt" },
{ "image/vnd.djvu", "djvu,djv" },
+ { "image/vnd.djvu+multipage", "djvu,djv" },
{ "application/x-ext-djv", "djv" },
{ "application/x-ext-djvu", "djvu" },
{ "application/oxps", "xps,oxps" },
diff --git a/configure.ac b/configure.ac
index e85e820..318cb70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -756,7 +756,7 @@ AC_SUBST(DVI_MIME_TYPES)
AC_SUBST(APPDATA_DVI_MIME_TYPES)
AM_SUBST_NOTMAKE(APPDATA_DVI_MIME_TYPES)
if test "x$enable_djvu" = "xyes"; then
- DJVU_MIME_TYPES="image/vnd.djvu;application/x-ext-djv;application/x-ext-djvu"
+ DJVU_MIME_TYPES="image/vnd.djvu;image/vnd.djvu+multipage;application/x-ext-djv;application/x-ext-djvu"
APPDATA_DJVU_MIME_TYPES=$(echo "<mimetype>$DJVU_MIME_TYPES</mimetype>" | sed -e 's/;/<\/mimetype>\n <mimetype>/g')
if test -z "$EVINCE_MIME_TYPES"; then
EVINCE_MIME_TYPES="${DJVU_MIME_TYPES}"
--
2.5.0