diff --git a/zathura-0.2.3-missing-or-unknown-file-type.patch b/zathura-0.2.3-missing-or-unknown-file-type.patch new file mode 100644 index 0000000..f943563 --- /dev/null +++ b/zathura-0.2.3-missing-or-unknown-file-type.patch @@ -0,0 +1,39 @@ +From cf96d52790bc8d05a9e556e33af0b6fec1a4cb0e Mon Sep 17 00:00:00 2001 +From: Moritz Lipp +Date: Tue, 28 May 2013 17:00:37 +0200 +Subject: [PATCH 1/1] Report missing plugin/unsupported file type + +--- + document.c | 1 + + zathura.c | 3 +++ + 2 files changed, 4 insertions(+) + +diff --git a/document.c b/document.c +index 2e6e557..7ca21ff 100644 +--- a/document.c ++++ b/document.c +@@ -110,6 +110,7 @@ zathura_document_open(zathura_plugin_manager_t* plugin_manager, const char* + + if (plugin == NULL) { + girara_error("unknown file type\n"); ++ error = ZATHURA_ERROR_UNKNOWN; + goto error_free; + } + +diff --git a/zathura.c b/zathura.c +index cdf4eac..a0a8f57 100644 +--- a/zathura.c ++++ b/zathura.c +@@ -562,6 +562,9 @@ document_open(zathura_t* zathura, const char* path, const char* password, + zathura_document_t* document = zathura_document_open(zathura->plugins.manager, path, password, &error); + + if (document == NULL) { ++ if (error == NULL ) { ++ girara_notify(zathura->ui.session, GIRARA_ERROR, _("Unsupported file type. Please install the necessary plugin."), false, NULL, NULL, NULL); ++ } + if (error == ZATHURA_ERROR_INVALID_PASSWORD) { + zathura_password_dialog_info_t* password_dialog_info = malloc(sizeof(zathura_password_dialog_info_t)); + if (password_dialog_info != NULL) { +-- +1.7.10.4 + diff --git a/zathura.spec b/zathura.spec index 32dedf0..30e4735 100644 --- a/zathura.spec +++ b/zathura.spec @@ -1,11 +1,12 @@ Name: zathura Version: 0.2.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A lightweight document viewer Group: Applications/Publishing License: zlib URL: http://pwmt.org/projects/%{name}/ Source0: http://pwmt.org/projects/%{name}/download/%{name}-%{version}.tar.gz +Patch0: zathura-0.2.3-missing-or-unknown-file-type.patch BuildRequires: cairo-devel BuildRequires: desktop-file-utils @@ -57,6 +58,7 @@ This package provides all Zathura plugins. sed -ie "s/install:\ all/install:\ /g" Makefile # ensure manpages are built from *.rst sources rm -f zathura.1 zathurarc.5 +%patch0 -p1 -b .unknown~ %build export CFLAGS="%{optflags}" @@ -95,6 +97,9 @@ update-desktop-database &> /dev/null || : %files plugins-all %changelog +* Tue May 28 2013 François Cami - 0.2.3-5 +- backport cf96d52790bc8d05a9e556e33af0b6fec1a4cb0e + * Tue May 28 2013 François Cami - 0.2.3-4 - rewrite summary.