diff -Nru djview4-4.10.5/config/acinclude.m4 djview4-4.10.6/config/acinclude.m4 --- djview4-4.10.5/config/acinclude.m4 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/config/acinclude.m4 2016-02-29 11:55:55.000000000 +0000 @@ -16,8 +16,7 @@ dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111 USA +dnl along with this program. If not, see . dnl diff -Nru djview4-4.10.5/configure.ac djview4-4.10.6/configure.ac --- djview4-4.10.5/configure.ac 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/configure.ac 2016-02-29 11:55:55.000000000 +0000 @@ -20,7 +20,7 @@ # ---------------------------------------- m4_define([v_maj], [4]) -m4_define([v_min], [10.5]) +m4_define([v_min], [10.6]) m4_define([v_ver], [v_maj.v_min]) diff -Nru djview4-4.10.5/COPYING djview4-4.10.6/COPYING --- djview4-4.10.5/COPYING 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/COPYING 2016-02-29 11:55:55.000000000 +0000 @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -15,7 +15,7 @@ General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,8 +55,8 @@ The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -110,7 +110,7 @@ License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -255,7 +255,7 @@ of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -277,9 +277,9 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -291,7 +291,7 @@ the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 19yy + Copyright (C) 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 @@ -303,17 +303,16 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + 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. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -336,5 +335,5 @@ This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff -Nru djview4-4.10.5/COPYRIGHT djview4-4.10.6/COPYRIGHT --- djview4-4.10.5/COPYRIGHT 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/COPYRIGHT 2016-02-29 11:55:55.000000000 +0000 @@ -14,8 +14,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA02111, USA. +along with this program. If not, see . ==================================================================== diff -Nru djview4-4.10.5/debian/changelog djview4-4.10.6/debian/changelog --- djview4-4.10.5/debian/changelog 2016-01-09 17:37:24.000000000 +0000 +++ djview4-4.10.6/debian/changelog 2016-06-13 15:22:59.000000000 +0000 @@ -1,3 +1,15 @@ +djview4 (4.10.6-1) unstable; urgency=medium + + [ Leon Bottou ] + * high dpi display support + + [ Barak A. Pearlmutter ] + * new upstream version + * trivial debian/control updates + * enable hardening in debian/rules + + -- Barak A. Pearlmutter Mon, 13 Jun 2016 16:21:43 +0100 + djview4 (4.10.5-1) unstable; urgency=medium [ Leon Bottou ] diff -Nru djview4-4.10.5/debian/control djview4-4.10.6/debian/control --- djview4-4.10.5/debian/control 2015-11-25 09:41:36.000000000 +0000 +++ djview4-4.10.6/debian/control 2016-06-13 15:22:59.000000000 +0000 @@ -13,10 +13,10 @@ qtbase5-dev, qt5-qmake, libqt5opengl5-dev, qttools5-dev-tools, libtiff-dev, netpbm, librsvg2-bin, imagemagick -Vcs-Git: git://anonscm.debian.org/collab-maint/djview4.git -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/djview4.git +Vcs-Git: https://anonscm.debian.org/collab-maint/djview4.git +Vcs-Browser: https://anonscm.debian.org/gitweb/?p=collab-maint/djview4.git Homepage: http://djvu.sourceforge.net/ -Standards-Version: 3.9.6 +Standards-Version: 3.9.8 Package: djview4 Architecture: any diff -Nru djview4-4.10.5/debian/patches/debian-changes djview4-4.10.6/debian/patches/debian-changes --- djview4-4.10.5/debian/patches/debian-changes 2016-01-09 17:52:56.000000000 +0000 +++ djview4-4.10.6/debian/patches/debian-changes 2016-06-13 15:23:13.000000000 +0000 @@ -5,15 +5,16 @@ information below has been extracted from the changelog. Adjust it or drop it. . - djview4 (4.10.5-1) unstable; urgency=medium + djview4 (4.10.6-1) unstable; urgency=medium . [ Leon Bottou ] - * workaround qt55 xembed bug (closes: #804888) + * high dpi display support . [ Barak A. Pearlmutter ] - * new upstream release, which works around qt5 bug + * new upstream version + * trivial debian/control updates + * enable hardening in debian/rules Author: Barak A. Pearlmutter -Bug-Debian: https://bugs.debian.org/804888 --- The information above should follow the Patch Tagging Guidelines, please @@ -28,189 +29,72 @@ Reviewed-By: Last-Update: ---- djview4-4.10.5.orig/COPYRIGHT -+++ djview4-4.10.5/COPYRIGHT -@@ -14,8 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICU - 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., 59 Temple Place, Suite 330, Boston, MA02111, USA. -+along with this program. If not, see . - - ==================================================================== - ---- djview4-4.10.5.orig/src/djview_cs.ts -+++ djview4-4.10.5/src/djview_cs.ts -@@ -259,7 +259,7 @@ - - - -- Find next occurence of search text in the document. -+ Find next occurrence of search text in the document. - Hledá v dokumentu další výskyt hledaného textu. - - -@@ -276,7 +276,7 @@ - - - -- Find previous occurence of search text in the document. -+ Find previous occurrence of search text in the document. - Hledá v dokumentu předchozí výskyt hledaného textu. - - ---- djview4-4.10.5.orig/src/djview_de.ts -+++ djview4-4.10.5/src/djview_de.ts -@@ -271,7 +271,7 @@ - - - -- Find next occurence of search text in the document. -+ Find next occurrence of search text in the document. - Zeigt die nächste Fundstelle des Suchtextes im Dokument. - - -@@ -288,7 +288,7 @@ - - - -- Find previous occurence of search text in the document. -+ Find previous occurrence of search text in the document. - Zeigt die vorherige Fundstelle des Suchtextes im Dokument. - - ---- djview4-4.10.5.orig/src/djview_es.ts -+++ djview4-4.10.5/src/djview_es.ts -@@ -282,7 +282,7 @@ - - - -- Find next occurence of search text in the document. -+ Find next occurrence of search text in the document. - Buscar siguiente ocurrencia de texto en la búsqueda del documento. - - -@@ -299,7 +299,7 @@ - - - -- Find previous occurence of search text in the document. -+ Find previous occurrence of search text in the document. - Buscar anterior ocurrencia de texto en la búsqueda del documento. - - ---- djview4-4.10.5.orig/src/djview_fr.ts -+++ djview4-4.10.5/src/djview_fr.ts -@@ -237,7 +237,7 @@ - - - -- Find next occurence of search text in the document. -+ Find next occurrence of search text in the document. - Montre l'apparition suivante du texte recherché dans le document. - - -@@ -254,7 +254,7 @@ - - - -- Find previous occurence of search text in the document. -+ Find previous occurrence of search text in the document. - Montre l'apparition précédente du texte recherché dans le document. - - ---- djview4-4.10.5.orig/src/djview_ru.ts -+++ djview4-4.10.5/src/djview_ru.ts -@@ -503,7 +503,7 @@ Filename '%1' has no suffix. - - -- Find next occurence of search text in the document. -+ Find next occurrence of search text in the document. - Найти следующее вхождение текста в документе. - - -@@ -514,7 +514,7 @@ Filename '%1' has no suffix. - - -- Find previous occurence of search text in the document. -+ Find previous occurrence of search text in the document. - Найти предыдущее вхождение текста в документе. - - ---- djview4-4.10.5.orig/src/djview_uk.ts -+++ djview4-4.10.5/src/djview_uk.ts -@@ -159,12 +159,12 @@ - - - -- Find next occurence of search text in the document. -+ Find next occurrence of search text in the document. - Шукати наступне входження тексту до документа. - - - -- Find previous occurence of search text in the document. -+ Find previous occurrence of search text in the document. - Шукати попереднє входження тексту до документа. - - ---- djview4-4.10.5.orig/src/djview_zh_cn.ts -+++ djview4-4.10.5/src/djview_zh_cn.ts -@@ -282,7 +282,7 @@ - - - -- Find next occurence of search text in the document. -+ Find next occurrence of search text in the document. - 在文档中查找文本的下一个实例。 - - -@@ -299,7 +299,7 @@ - - - -- Find previous occurence of search text in the document. -+ Find previous occurrence of search text in the document. - 在文档中查找文本的前一个实例。 - - ---- djview4-4.10.5.orig/src/djview_zh_tw.ts -+++ djview4-4.10.5/src/djview_zh_tw.ts -@@ -282,7 +282,7 @@ - - - -- Find next occurence of search text in the document. -+ Find next occurrence of search text in the document. - 在文件中尋找字檔的下一個實例。 - - -@@ -299,7 +299,7 @@ - - - -- Find previous occurence of search text in the document. -+ Find previous occurrence of search text in the document. - 在文件中尋找字檔的前一個實例。 - - ---- djview4-4.10.5.orig/src/qdjview.cpp -+++ djview4-4.10.5/src/qdjview.cpp -@@ -498,12 +498,12 @@ QDjView::createActions() - - actionFindNext = makeAction(tr("Find &Next", "Edit|")) - << QKeySequence(tr("F3", "Edit|Find Next")) -- << tr("Find next occurence of search text in the document.") -+ << tr("Find next occurrence of search text in the document.") - << Trigger(findWidget, SLOT(findNext())); - - actionFindPrev = makeAction(tr("Find &Previous", "Edit|")) - << QKeySequence(tr("Shift+F3", "Edit|Find Previous")) -- << tr("Find previous occurence of search text in the document.") -+ << tr("Find previous occurrence of search text in the document.") - << Trigger(findWidget, SLOT(findPrev())); - - actionSelect = makeAction(tr("&Select", "Edit|"), false) +--- djview4-4.10.6.orig/nsdejavu/nsdejavu.1.in ++++ djview4-4.10.6/nsdejavu/nsdejavu.1.in +@@ -213,7 +213,7 @@ tag: + .SH INTERFACING THE DJVIEW PLUGIN WITH JAVASCRIPT + Recent versions of the + .B djview4 +-plugin can be controlled from the JavaScript intepreter of ++plugin can be controlled from the JavaScript interpreter of + browsers implementing the Mozilla NPRuntime API. + To access the plugin object, + include the attribute +--- djview4-4.10.6.orig/src/djview.cpp ++++ djview4-4.10.6/src/djview.cpp +@@ -137,7 +137,12 @@ QDjViewApplication::QDjViewApplication(i + extern void qt_mac_set_native_menubar(bool); + qt_mac_set_native_menubar(false); + #endif +- ++ ++ // Enable highdpi pixmaps ++#if QT_VERSION >= 0x50200 ++ setAttribute(Qt::AA_UseHighDpiPixmaps, true); ++#endif ++ + // Wire session management signals + connect(this, SIGNAL(saveStateRequest(QSessionManager&)), + this, SLOT(saveSessionState(QSessionManager&)) ); +--- djview4-4.10.6.orig/src/qdjviewsidebar.cpp ++++ djview4-4.10.6/src/qdjviewsidebar.cpp +@@ -603,9 +603,14 @@ QDjViewThumbnails::Model::makeIcon(int p + if (doc) + { + // render thumbnail +- int w = size; +- int h = size; +- QImage img(size, size, QImage::Format_RGB32); ++#if QT_VERSION >= 0x50200 ++ int dpr = djview->devicePixelRatio(); ++#else ++ int dpr = 1; ++#endif ++ int w = size * dpr; ++ int h = size * dpr; ++ QImage img(size*dpr, size*dpr, QImage::Format_RGB32); + int status = ddjvu_thumbnail_status(*doc, pageno, 0); + if (status == DDJVU_JOB_NOTSTARTED) + { +@@ -614,9 +619,9 @@ QDjViewThumbnails::Model::makeIcon(int p + else if (ddjvu_thumbnail_render(*doc, pageno, &w, &h, format, + img.bytesPerLine(), (char*)img.bits() )) + { +- QPixmap pixmap(size,size); ++ QPixmap pixmap(size*dpr,size*dpr); + pixmap.fill(); +- QPoint dst((size-w)/2, (size-h)/2); ++ QPoint dst((size*dpr-w)/2, (size*dpr-h)/2); + QRect src(0,0,w,h); + QPainter painter; + painter.begin(&pixmap); +@@ -625,6 +630,9 @@ QDjViewThumbnails::Model::makeIcon(int p + painter.setPen(Qt::darkGray); + painter.drawRect(dst.x(), dst.y(), w-1, h-1); + painter.end(); ++#if QT_VERSION >= 0x50200 ++ pixmap.setDevicePixelRatio(dpr); ++#endif + return QIcon(pixmap); + } + } diff -Nru djview4-4.10.5/debian/rules djview4-4.10.6/debian/rules --- djview4-4.10.5/debian/rules 2015-11-25 09:41:36.000000000 +0000 +++ djview4-4.10.6/debian/rules 2016-06-13 15:22:59.000000000 +0000 @@ -2,6 +2,8 @@ export QT_SELECT = 5 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + plugindir=/usr/lib/mozilla/plugins override_dh_auto_install: diff -Nru djview4-4.10.5/djview4.spec djview4-4.10.6/djview4.spec --- djview4-4.10.5/djview4.spec 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/djview4.spec 2016-02-29 11:55:55.000000000 +0000 @@ -1,5 +1,5 @@ %define release 1 -%define version 4.10 +%define version 4.10.6 Summary: DjVu viewer Name: djview4 diff -Nru djview4-4.10.5/mac/make_djview_bundle.sh djview4-4.10.6/mac/make_djview_bundle.sh --- djview4-4.10.5/mac/make_djview_bundle.sh 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/mac/make_djview_bundle.sh 2016-02-29 11:55:55.000000000 +0000 @@ -69,10 +69,11 @@ run ln -s "$target" "$bundle/$d" || exit done -# merge MacOS and bin directories +# merge MacOS, bin, and plugins directories run mv $bundle/bin/* $bundle/MacOS || exit run rmdir $bundle/bin || exit run ln -s ./MacOS $bundle/bin || exit +run ln -s ./MacOS $bundle/plugins || exit # copy needed homebrew libraries for lib in $(otool -L $bundle/MacOS/ddjvu | awk '/^\t/{print $1}') ; do @@ -83,12 +84,31 @@ run cp "$lib" "./$bundle/lib/$libname" || exit ;; esac done -for lib in $(otool -L $bundle/MacOS/djview | awk '/^\t/{print $1}') ; do + +# copy needed qt plugins +( cd "$QTDIR" ; \ + ls -1 plugins/{platforms,imageformats,printsupport}/*.dylib | \ + grep -v _debug.dylib ) | \ +while read plugin ; do + run mkdir -p $bundle/$(dirname "$plugin") || exit + run cp "$QTDIR/$plugin" $bundle/"$plugin" || exit +done + +# copy needed libraries +for lib in \ + $(otool -L $bundle/MacOS/djview | awk '/^\t/{print $1}') \ + $(otool -L $bundle/MacOS/platforms/libqcocoa.dylib | awk '/^\t/{print $1}') +do case "$lib" in $BREWDIR/*) libname=$(basename "$lib") test -r "./$bundle/lib/$libname" || \ run cp "$lib" "./$bundle/lib/$libname" || exit ;; + @rpath/*) + libname=$(basename "$lib") + lib="$QTDIR/lib${lib/#@rpath//}" + test -r "./$bundle/lib/$libname" || \ + run cp "$lib" "./$bundle/lib/$libname" || exit ;; $QTDIR/*) libname=$(basename "$lib") test -r "./$bundle/lib/$libname" || \ @@ -96,15 +116,6 @@ esac done -# copy needed qt plugins -( cd "$QTDIR" ; \ - ls -1 plugins/{platforms,imageformats,printsupport}/*.dylib | \ - grep -v _debug.dylib ) | \ -while read plugin ; do - run mkdir -p $bundle/$(dirname "$plugin") || exit - run cp "$QTDIR/$plugin" $bundle/"$plugin" || exit -done - # copy translations languages=$(ls -1 ../src/*.qm | sed -e 's/^[^_]*_//' -e 's/\.qm$//') run rm $bundle/Resources/empty.lproj diff -Nru djview4-4.10.5/mac/make_djview_dmg.sh djview4-4.10.6/mac/make_djview_dmg.sh --- djview4-4.10.5/mac/make_djview_dmg.sh 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/mac/make_djview_dmg.sh 2016-02-29 11:55:55.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash -dmgname="DjVuLibre-3.5.27+DjView-4.10.2-intel64" +dmgname="DjVuLibre-3.5.27+DjView-4.10.6-intel64" cd $(dirname $0) if ! test -d DjView.app ; then diff -Nru djview4-4.10.5/NEWS djview4-4.10.6/NEWS --- djview4-4.10.5/NEWS 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/NEWS 2016-02-29 11:55:55.000000000 +0000 @@ -1,4 +1,13 @@ +NEW SINCE VERSION 4.10 +------------------- +- Support for pinch gestures +- New shortcuts on mac +- Support for high dpi displays +- Spanish translations +- Bug fixes +- Workaround for qt5.5 embed bug + NEW IN VERSION 4.10 ------------------- - Bug fixes: layout, usability, preferences, locale selection diff -Nru djview4-4.10.5/src/djview_cs.ts djview4-4.10.6/src/djview_cs.ts --- djview4-4.10.5/src/djview_cs.ts 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/djview_cs.ts 2016-02-29 11:55:55.000000000 +0000 @@ -259,7 +259,7 @@ - Find next occurence of search text in the document. + Find next occurrence of search text in the document. Hledá v dokumentu další výskyt hledaného textu. @@ -276,7 +276,7 @@ - Find previous occurence of search text in the document. + Find previous occurrence of search text in the document. Hledá v dokumentu předchozí výskyt hledaného textu. diff -Nru djview4-4.10.5/src/djview_de.ts djview4-4.10.6/src/djview_de.ts --- djview4-4.10.5/src/djview_de.ts 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/djview_de.ts 2016-02-29 11:55:55.000000000 +0000 @@ -271,7 +271,7 @@ - Find next occurence of search text in the document. + Find next occurrence of search text in the document. Zeigt die nächste Fundstelle des Suchtextes im Dokument. @@ -288,7 +288,7 @@ - Find previous occurence of search text in the document. + Find previous occurrence of search text in the document. Zeigt die vorherige Fundstelle des Suchtextes im Dokument. diff -Nru djview4-4.10.5/src/djview_es.ts djview4-4.10.6/src/djview_es.ts --- djview4-4.10.5/src/djview_es.ts 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/djview_es.ts 2016-02-29 11:55:55.000000000 +0000 @@ -282,7 +282,7 @@ - Find next occurence of search text in the document. + Find next occurrence of search text in the document. Buscar siguiente ocurrencia de texto en la búsqueda del documento. @@ -299,7 +299,7 @@ - Find previous occurence of search text in the document. + Find previous occurrence of search text in the document. Buscar anterior ocurrencia de texto en la búsqueda del documento. diff -Nru djview4-4.10.5/src/djview_fr.ts djview4-4.10.6/src/djview_fr.ts --- djview4-4.10.5/src/djview_fr.ts 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/djview_fr.ts 2016-02-29 11:55:55.000000000 +0000 @@ -237,7 +237,7 @@ - Find next occurence of search text in the document. + Find next occurrence of search text in the document. Montre l'apparition suivante du texte recherché dans le document. @@ -254,7 +254,7 @@ - Find previous occurence of search text in the document. + Find previous occurrence of search text in the document. Montre l'apparition précédente du texte recherché dans le document. diff -Nru djview4-4.10.5/src/djview.plist djview4-4.10.6/src/djview.plist --- djview4-4.10.5/src/djview.plist 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/djview.plist 2016-02-29 11:55:55.000000000 +0000 @@ -92,5 +92,9 @@ + NSPrincipalClass + NSApplication + NSHighResolutionCapable + True diff -Nru djview4-4.10.5/src/djview_ru.ts djview4-4.10.6/src/djview_ru.ts --- djview4-4.10.5/src/djview_ru.ts 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/djview_ru.ts 2016-02-29 11:55:55.000000000 +0000 @@ -503,7 +503,7 @@ - Find next occurence of search text in the document. + Find next occurrence of search text in the document. Найти следующее вхождение текста в документе. @@ -514,7 +514,7 @@ - Find previous occurence of search text in the document. + Find previous occurrence of search text in the document. Найти предыдущее вхождение текста в документе. diff -Nru djview4-4.10.5/src/djview_uk.ts djview4-4.10.6/src/djview_uk.ts --- djview4-4.10.5/src/djview_uk.ts 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/djview_uk.ts 2016-02-29 11:55:55.000000000 +0000 @@ -159,12 +159,12 @@ - Find next occurence of search text in the document. + Find next occurrence of search text in the document. Шукати наступне входження тексту до документа. - Find previous occurence of search text in the document. + Find previous occurrence of search text in the document. Шукати попереднє входження тексту до документа. diff -Nru djview4-4.10.5/src/djview_zh_cn.ts djview4-4.10.6/src/djview_zh_cn.ts --- djview4-4.10.5/src/djview_zh_cn.ts 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/djview_zh_cn.ts 2016-02-29 11:55:55.000000000 +0000 @@ -282,7 +282,7 @@ - Find next occurence of search text in the document. + Find next occurrence of search text in the document. 在文档中查找文本的下一个实例。 @@ -299,7 +299,7 @@ - Find previous occurence of search text in the document. + Find previous occurrence of search text in the document. 在文档中查找文本的前一个实例。 diff -Nru djview4-4.10.5/src/djview_zh_tw.ts djview4-4.10.6/src/djview_zh_tw.ts --- djview4-4.10.5/src/djview_zh_tw.ts 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/djview_zh_tw.ts 2016-02-29 11:55:55.000000000 +0000 @@ -282,7 +282,7 @@ - Find next occurence of search text in the document. + Find next occurrence of search text in the document. 在文件中尋找字檔的下一個實例。 @@ -299,7 +299,7 @@ - Find previous occurence of search text in the document. + Find previous occurrence of search text in the document. 在文件中尋找字檔的前一個實例。 diff -Nru djview4-4.10.5/src/Makefile.am djview4-4.10.6/src/Makefile.am --- djview4-4.10.5/src/Makefile.am 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/Makefile.am 2016-02-29 11:55:55.000000000 +0000 @@ -74,6 +74,7 @@ mostlyclean-qmake: -test "${srcdir}" == "." || ${RM} djview.pro -test -f Makefile.qmake && ${MAKE} -f Makefile.qmake clean + -$(RM) Makefile.qmake0 -$(RM) Makefile.qmake .PHONY: mostlyclean-qmake mostlyclean-qm diff -Nru djview4-4.10.5/src/qdjview.cpp djview4-4.10.6/src/qdjview.cpp --- djview4-4.10.5/src/qdjview.cpp 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/qdjview.cpp 2016-02-29 11:55:55.000000000 +0000 @@ -498,12 +498,12 @@ actionFindNext = makeAction(tr("Find &Next", "Edit|")) << QKeySequence(tr("F3", "Edit|Find Next")) - << tr("Find next occurence of search text in the document.") + << tr("Find next occurrence of search text in the document.") << Trigger(findWidget, SLOT(findNext())); actionFindPrev = makeAction(tr("Find &Previous", "Edit|")) << QKeySequence(tr("Shift+F3", "Edit|Find Previous")) - << tr("Find previous occurence of search text in the document.") + << tr("Find previous occurrence of search text in the document.") << Trigger(findWidget, SLOT(findPrev())); actionSelect = makeAction(tr("&Select", "Edit|"), false) @@ -726,7 +726,7 @@ actionViewSideBar = makeAction(tr("Show &Sidebar", "Settings|"), true) << QKeySequence(tr("F9", "Settings|Show sidebar")) #ifdef Q_OS_DARWIN - << QKeySequence(tr("Ctrl+F9", "Settings|Show sidebar")) + << QKeySequence(tr("Alt+Ctrl+S", "Settings|Show sidebar")) #endif << tr("Show/hide the side bar.") << Trigger(this, SLOT(showSideBar(bool))); @@ -735,13 +735,16 @@ << tr("Show &Toolbar", "Settings|") << QKeySequence(tr("F10", "Settings|Show toolbar")) #ifdef Q_OS_DARWIN - << QKeySequence(tr("Ctrl+F10", "Settings|Show toolbar")) + << QKeySequence(tr("Alt+Ctrl+T", "Settings|Show toolbar")) #endif << tr("Show/hide the standard tool bar.") << Trigger(this, SLOT(updateActionsLater())); actionViewStatusBar = makeAction(tr("Show Stat&usbar", "Settings|"), true) << tr("Show/hide the status bar.") +#ifdef Q_OS_DARWIN + << QKeySequence(tr("Alt+Ctrl+/", "Settings|Show toolbar")) +#endif << Trigger(statusBar,SLOT(setVisible(bool))) << Trigger(this, SLOT(updateActionsLater())); @@ -749,7 +752,7 @@ = makeAction(tr("&Full Screen","View|"), false) << QKeySequence(tr("F11","View|FullScreen")) #ifdef Q_OS_DARWIN - << QKeySequence(tr("Ctrl+F11","View|FullScreen")) + << QKeySequence(tr("Meta+Ctrl+F","View|FullScreen")) #endif << QIcon(":/images/icon_fullscreen.png") << tr("Toggle full screen mode.") @@ -758,6 +761,9 @@ actionViewSlideShow = makeAction(tr("&Slide Show","View|"), false) << QKeySequence(tr("Shift+F11","View|Slideshow")) +#ifdef Q_OS_DARWIN + << QKeySequence(tr("Shift+Ctrl+F", "Settings|Show toolbar")) +#endif << QIcon(":/images/icon_slideshow.png") << tr("Toggle slide show mode.") << Trigger(this, SLOT(performViewSlideShow(bool))); @@ -789,7 +795,6 @@ #ifdef Q_OS_DARWIN << QIcon(":/images/icon_righttoleft.png") #endif - << QKeySequence(tr("Ctrl+Shift+F6", "Layout|RightToLeft")) << QKeySequence(tr("Shift+F6", "Layout|RightToLeft")) << tr("Show pages right-to-left in side-by-side mode.") << Trigger(widget, SLOT(setRightToLeft(bool))) diff -Nru djview4-4.10.5/src/qdjviewprefs.cpp djview4-4.10.6/src/qdjviewprefs.cpp --- djview4-4.10.5/src/qdjviewprefs.cpp 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/qdjviewprefs.cpp 2016-02-29 11:55:55.000000000 +0000 @@ -179,6 +179,8 @@ forEmbeddedPlugin.zoom = 100; forEmbeddedPlugin.nsBorderBrush = QBrush(Qt::white); forEmbeddedPlugin.nsBorderSize = 0; + forStandalone.options |= LAYOUT_CONTINUOUS; + forFullScreen.options |= LAYOUT_CONTINUOUS; } diff -Nru djview4-4.10.5/src/qdjvuwidget.cpp djview4-4.10.6/src/qdjvuwidget.cpp --- djview4-4.10.5/src/qdjvuwidget.cpp 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/qdjvuwidget.cpp 2016-02-29 11:55:55.000000000 +0000 @@ -129,9 +129,16 @@ } static inline void -qrect_to_rect(const QRect &qrect, ddjvu_rect_t &rect) +qrect_to_rect(const QRect &qrect, ddjvu_rect_t &rect, int scale=1) { qrect.getRect(&rect.x, &rect.y, (int*)&rect.w, (int*)&rect.h); + if (scale > 1) + { + rect.x *= scale; + rect.y *= scale; + rect.w *= scale; + rect.h *= scale; + } } static inline int @@ -817,6 +824,7 @@ int sdpi; // screen dpi ddjvu_format_t *renderFormat; // ddjvu format QList pixelCache; // pixel cache + int devicePixelRatio; // device pixel ratio for cached images // gui bool keyboardEnabled; // obey keyboard commands bool mouseEnabled; // obey mouse commands @@ -1007,6 +1015,7 @@ currentLinkDisplayed = false; allLinksDisplayed = false; pixelCacheSize = 256 * 1024; + devicePixelRatio = 1; // cursors cursHandOpen = qcursor_by_name(":/images/cursor_hand_open.png"); cursHandClosed = qcursor_by_name(":/images/cursor_hand_closed.png"); @@ -4436,6 +4445,15 @@ return true; if (p->dpi<=0 || p->page==0) return false; + // invalidate cache when device pixel ratio changes +#if QT_VERSION >= 0x50200 + int dpr = paint.device()->devicePixelRatio(); + if (devicePixelRatio != dpr) + pixelCache.clear(); + devicePixelRatio = dpr; +#else + int dpr = 1; +#endif // caching QList cachelist; QRegion remainder = region; @@ -4479,6 +4497,8 @@ QRect d = dr.boundingRect(); displayed += d; QRect s = d.translated(-r.topLeft()); + if (dpr > 1) + s.setRect(s.left()*dpr, s.top()*dpr, s.width()*dpr, s.height()*dpr); #if QDJVUWIDGET_PIXMAP_CACHE if (hastransient) paint.drawImage(d.topLeft(), img, s, Qt::ThresholdDither); @@ -4503,10 +4523,13 @@ int rot; ddjvu_rect_t pr, rr; QRect r = rects[i].translated(visibleRect.topLeft()); - QImage img(r.width(), r.height(), QImage::Format_RGB32); + QImage img(r.width()*dpr, r.height()*dpr, QImage::Format_RGB32); +#if QT_VERSION >= 0x50200 + img.setDevicePixelRatio(dpr); +#endif QDjVuPage *dp = p->page; - qrect_to_rect(r, rr); - qrect_to_rect(p->rect, pr); + qrect_to_rect(r, rr, dpr); + qrect_to_rect(p->rect, pr, dpr); #if DDJVUAPI_VERSION < 18 p->initialRot = ddjvu_page_get_initial_rotation(*dp); #endif @@ -4527,6 +4550,8 @@ QRect d = dr.boundingRect(); displayed += d; QRect s = d.translated(-r.topLeft()); + if (dpr > 1) + s.setRect(s.left()*dpr, s.top()*dpr, s.width()*dpr, s.height()*dpr); paint.drawImage(d.topLeft(), img, s, Qt::ThresholdDither); } return true; @@ -5598,8 +5623,13 @@ QDjVuLens::moveEvent(QMoveEvent *event) { refocus(); +#if QT_VERSION >= 0x50200 + int dpr = devicePixelRatio(); +#else + int dpr = 1; +#endif QPoint delta = event->pos() - event->oldPos(); - QRect r = rect().adjusted(1,1,-1,-1); + QRect r = rect().adjusted(dpr,dpr,-dpr,-dpr); scroll(-mag*delta.x(), -mag*delta.y(), r); } @@ -5633,6 +5663,11 @@ mode = DDJVU_RENDER_BACKGROUND; else if (priv->display == DISPLAY_FG) mode = DDJVU_RENDER_FOREGROUND; +#if QT_VERSION >= 0x50200 + int dpr = devicePixelRatio(); +#else + int dpr = 1; +#endif foreach(p, priv->pageVisible) { QRect prect = mapper.mapped(p->viewRect); @@ -5650,9 +5685,12 @@ ddjvu_rect_t pr, rr; QDjVuPage *dp = p->page; QRect &r = rects[i]; - qrect_to_rect(prect, pr); - qrect_to_rect(r, rr); - QImage img(r.width(), r.height(), QImage::Format_RGB32); + QImage img(r.width()*dpr, r.height()*dpr, QImage::Format_RGB32); +#if QT_VERSION >= 0x50200 + img.setDevicePixelRatio(dpr); +#endif + qrect_to_rect(prect, pr, dpr); + qrect_to_rect(r, rr, dpr); rot = p->initialRot + priv->rotation; ddjvu_page_set_rotation(*dp,(ddjvu_page_rotation_t)(rot & 0x3)); if (ddjvu_page_render(*dp, mode, &pr, &rr, priv->renderFormat, diff -Nru djview4-4.10.5/src/version.h djview4-4.10.6/src/version.h --- djview4-4.10.5/src/version.h 2016-01-04 21:13:04.000000000 +0000 +++ djview4-4.10.6/src/version.h 2016-02-29 11:55:55.000000000 +0000 @@ -11,10 +11,10 @@ # define DJVIEW_APP "DjView" #endif #ifndef DJVIEW_VERSION -# define DJVIEW_VERSION 0x40a05 -# define DJVIEW_VERSION_STR "4.10.5" -# define RC_VERSION 4,10,0,0 -# define RC_VERSION_STR "4,10,5,0\0" +# define DJVIEW_VERSION 0x40a06 +# define DJVIEW_VERSION_STR "4.10.6" +# define RC_VERSION 4,10,6,0 +# define RC_VERSION_STR "4,10,6,0\0" #endif #endif