pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

zathura-pdf-mupdf: fix search command (`/')



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Sat Nov 26 15:18:26 2016 +0100
Changeset:	7afca6deba86b27617f64b52a0b33e75fb15727b

Modified Files:
	zathura-pdf-mupdf/TODO
	zathura-pdf-mupdf/distinfo
	zathura-pdf-mupdf/patches/patch-utils.c

Log Message:
zathura-pdf-mupdf: fix search command (`/')

As the warning pointed out previously a device was dropped without closing it,
use fz_close_device() to fix that. Now search command works again.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7afca6deba86b27617f64b52a0b33e75fb15727b

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 zathura-pdf-mupdf/TODO                  | 2 --
 zathura-pdf-mupdf/distinfo              | 2 +-
 zathura-pdf-mupdf/patches/patch-utils.c | 8 ++++++++
 3 files changed, 9 insertions(+), 3 deletions(-)

diffs:
diff --git a/zathura-pdf-mupdf/TODO b/zathura-pdf-mupdf/TODO
index 2258c28..74e186b 100644
--- a/zathura-pdf-mupdf/TODO
+++ b/zathura-pdf-mupdf/TODO
@@ -5,5 +5,3 @@ print/zathura-pdf-mupdf:
 - Gtk-WARNING **: Allocating size to zathura [address] without calling
   gtk_widget_get_preferred_width/height().  How does the code know the size to
   allocate? [seems to happen when `Tab' is pressed, i.e. in the `Index mode']
-- warning: dropping unclosed device [probably related to the `search' command
-  (i.e. via `/') that no longer works]
diff --git a/zathura-pdf-mupdf/distinfo b/zathura-pdf-mupdf/distinfo
index 16fe0c4..1e1386e 100644
--- a/zathura-pdf-mupdf/distinfo
+++ b/zathura-pdf-mupdf/distinfo
@@ -12,4 +12,4 @@ SHA1 (patch-page.c) = bc3bd7325f4005986182949c5e66b1ee3040431b
 SHA1 (patch-plugin.h) = 8b12c096d265b397ae9f3a8aee7057a23dea3def
 SHA1 (patch-render.c) = c65ec3d6e9622149d987798b69c680c886b7f970
 SHA1 (patch-search.c) = 1cbed6cc8a8cf672e6330bd2e91e0976f90bc352
-SHA1 (patch-utils.c) = f27a00e812133b93fbdd7922906c091d78412138
+SHA1 (patch-utils.c) = 914ca7ea673be3bcb1a76661762ac7e343f57264
diff --git a/zathura-pdf-mupdf/patches/patch-utils.c b/zathura-pdf-mupdf/patches/patch-utils.c
index cc235ca..f929b94 100644
--- a/zathura-pdf-mupdf/patches/patch-utils.c
+++ b/zathura-pdf-mupdf/patches/patch-utils.c
@@ -13,3 +13,11 @@ Update to mupdf-1.10 API.
  
      /* Disable FZ_IGNORE_IMAGE to collect image blocks */
      fz_disable_device_hints(mupdf_page->ctx, text_device, FZ_IGNORE_IMAGE);
+@@ -23,6 +23,7 @@ mupdf_page_extract_text(mupdf_document_t
+     fz_scale(&ctm, 1.0, 1.0);
+     fz_run_page(mupdf_page->ctx, mupdf_page->page, text_device, &ctm, NULL);
+   } fz_always (mupdf_document->ctx) {
++    fz_close_device(mupdf_page->ctx, text_device);
+     fz_drop_device(mupdf_page->ctx, text_device);
+   } fz_catch(mupdf_document->ctx) {
+   }


Home | Main Index | Thread Index | Old Index