Update to epdfview-0.1.8.
ok Brynet (maintainer), jasper@
This commit is contained in:
parent
06c795c0a2
commit
f0b81c8d71
@ -1,9 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.22 2011/06/04 19:05:23 kili Exp $
|
||||
# $OpenBSD: Makefile,v 1.23 2011/06/08 18:26:44 ajacoutot Exp $
|
||||
|
||||
COMMENT= lightweight PDF document viewer
|
||||
|
||||
DISTNAME= epdfview-0.1.7
|
||||
REVISION= 8
|
||||
DISTNAME= epdfview-0.1.8
|
||||
CATEGORIES= print
|
||||
HOMEPAGE= http://trac.emma-soft.com/epdfview/
|
||||
|
||||
@ -19,13 +18,13 @@ PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB+= GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
|
||||
WANTLIB+= Xi Xinerama Xrandr Xrender Xxf86vm atk-1.0 c cairo drm expat
|
||||
WANTLIB+= fontconfig freetype gdk-x11-2.0>=0.14 gdk_pixbuf-2.0>=0.14 gio-2.0
|
||||
WANTLIB+= glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 gtk-x11-2.0>=0.14 m
|
||||
WANTLIB+= pango-1.0 pangocairo-1.0 pangoft2-1.0 pixman-1 png poppler>=10
|
||||
WANTLIB+= poppler-glib>=3 pthread pthread-stubs stdc++ xcb xcb-render
|
||||
WANTLIB+= xcb-shm z
|
||||
WANTLIB += GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
|
||||
WANTLIB += Xi Xinerama Xrandr Xrender Xxf86vm atk-1.0 c cairo
|
||||
WANTLIB += drm expat fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0
|
||||
WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
|
||||
WANTLIB += gtk-x11-2.0 m pango-1.0 pangocairo-1.0 pangoft2-1.0
|
||||
WANTLIB += pixman-1 png poppler poppler-glib pthread pthread-stubs
|
||||
WANTLIB += stdc++ xcb xcb-render xcb-shm z
|
||||
|
||||
MODULES= devel/gettext
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (epdfview-0.1.7.tar.bz2) = GRm7GcFu8Kl9SLCoMD08ew==
|
||||
RMD160 (epdfview-0.1.7.tar.bz2) = SFOZ0ZgqP4EoMi7n4T1GIlVzuuM=
|
||||
SHA1 (epdfview-0.1.7.tar.bz2) = /0aULChbjiwodmo4zfzhoBi0oBU=
|
||||
SHA256 (epdfview-0.1.7.tar.bz2) = Cvuw80jUupFs9Y2ki0dJt8ymqQOBNrJ9xlIWGRNwSug=
|
||||
SIZE (epdfview-0.1.7.tar.bz2) = 443609
|
||||
MD5 (epdfview-0.1.8.tar.bz2) = 5QKFsBYSFpsllP6jdfU65A==
|
||||
RMD160 (epdfview-0.1.8.tar.bz2) = +URP4niGP9u1RVQ5V6h3fhEp/+0=
|
||||
SHA1 (epdfview-0.1.8.tar.bz2) = ctqJWPWM9+xVtVVB8uZ4lbQC3z8=
|
||||
SHA256 (epdfview-0.1.8.tar.bz2) = lIZIrnydeztAjXOL1PSNhzdbEZbK4RKda4RqjeDy+PA=
|
||||
SIZE (epdfview-0.1.8.tar.bz2) = 466270
|
||||
|
@ -1,15 +0,0 @@
|
||||
$OpenBSD: patch-src_IDocument_cxx,v 1.1 2010/01/12 21:45:20 jasper Exp $
|
||||
|
||||
Better error message for failed opens, r338.
|
||||
|
||||
--- src/IDocument.cxx.orig Wed Dec 30 00:38:35 2009
|
||||
+++ src/IDocument.cxx Wed Dec 30 00:39:05 2009
|
||||
@@ -82,7 +82,7 @@ IDocument::getErrorMessage (DocumentError errorCode)
|
||||
errorMessage = g_strdup (_("No error."));
|
||||
break;
|
||||
case DocumentErrorOpenFile:
|
||||
- errorMessage = g_strdup (_("File not found."));
|
||||
+ errorMessage = g_strdup (_("Could not open file."));
|
||||
break;
|
||||
case DocumentErrorBadCatalog:
|
||||
errorMessage = g_strdup (_("Couldn't read the page catalog."));
|
@ -1,32 +0,0 @@
|
||||
$OpenBSD: patch-src_MainPter_cxx,v 1.1 2010/01/12 21:45:20 jasper Exp $
|
||||
|
||||
MainPter now stores the current page's number when the
|
||||
document is reloaded and moves to the same page once
|
||||
the document is displayed. -r342
|
||||
|
||||
--- src/MainPter.cxx.orig Tue Jan 12 22:12:27 2010
|
||||
+++ src/MainPter.cxx Tue Jan 12 22:14:49 2010
|
||||
@@ -54,6 +54,7 @@ MainPter::MainPter (IDocument *document)
|
||||
m_PagePter = NULL;
|
||||
m_FindPter = NULL;
|
||||
m_PasswordTries = 3;
|
||||
+ m_ReloadPage = 1;
|
||||
#if defined (DEBUG)
|
||||
G_LOCK (fileLoaded);
|
||||
fileLoaded = FALSE;
|
||||
@@ -534,6 +535,7 @@ MainPter::reloadActivated ()
|
||||
g_assert ( m_Document->isLoaded () &&
|
||||
"Tried to reload a yet to load document.");
|
||||
// Reload
|
||||
+ m_ReloadPage = m_Document->getCurrentPageNum();
|
||||
setOpenState (m_Document->getFileName (), TRUE);
|
||||
m_Document->reload ();
|
||||
}
|
||||
@@ -928,6 +930,7 @@ void
|
||||
MainPter::notifyReload ()
|
||||
{
|
||||
setInitialState ();
|
||||
+ m_Document->goToPage(m_ReloadPage);
|
||||
#if defined (DEBUG)
|
||||
G_LOCK (fileLoaded);
|
||||
fileLoaded = TRUE;
|
@ -1,17 +0,0 @@
|
||||
$OpenBSD: patch-src_MainPter_h,v 1.1 2010/01/12 21:45:20 jasper Exp $
|
||||
|
||||
MainPter now stores the current page's number when the
|
||||
document is reloaded and moves to the same page once
|
||||
the document is displayed. -r342
|
||||
|
||||
--- src/MainPter.h.orig Tue Jan 12 22:12:36 2010
|
||||
+++ src/MainPter.h Tue Jan 12 22:14:04 2010
|
||||
@@ -102,6 +102,8 @@ namespace ePDFView
|
||||
PagePter *m_PagePter;
|
||||
/// The number of times the password has been tried for a document.
|
||||
gint m_PasswordTries;
|
||||
+ /// The page to move once the document is reloaded.
|
||||
+ gint m_ReloadPage;
|
||||
/// The main view.
|
||||
IMainView *m_View;
|
||||
|
@ -1,70 +0,0 @@
|
||||
$OpenBSD: patch-src_PDFDocument_cxx,v 1.2 2011/06/04 19:05:23 kili Exp $
|
||||
|
||||
Fixes error handling, bogus encrypted files, r339.
|
||||
Fix API breakage introduced with poppler-0.16, and a stupid bug
|
||||
calculating the value of x2.
|
||||
|
||||
--- src/PDFDocument.cxx.orig Sat Feb 28 22:00:35 2009
|
||||
+++ src/PDFDocument.cxx Sat May 14 12:43:43 2011
|
||||
@@ -246,24 +246,26 @@ PDFDocument::loadFile (const gchar *filename, const gc
|
||||
// Check if the document couldn't be opened successfully and why.
|
||||
if ( NULL == newDocument )
|
||||
{
|
||||
- // Poppler's glib wrapper passes the Poppler error code unless the
|
||||
- // error is that the file is encrypted. We want to set our own
|
||||
- // error code in this case.
|
||||
DocumentError errorCode = DocumentErrorNone;
|
||||
- if ( POPPLER_ERROR == loadError->domain )
|
||||
+ switch ( loadError->code )
|
||||
{
|
||||
- errorCode = DocumentErrorEncrypted;
|
||||
+ case POPPLER_ERROR_OPEN_FILE:
|
||||
+ case POPPLER_ERROR_INVALID:
|
||||
+ errorCode = DocumentErrorOpenFile;
|
||||
+ break;
|
||||
+
|
||||
+ case POPPLER_ERROR_BAD_CATALOG:
|
||||
+ errorCode = DocumentErrorBadCatalog;
|
||||
+ break;
|
||||
+
|
||||
+ case POPPLER_ERROR_DAMAGED:
|
||||
+ errorCode = DocumentErrorDamaged;
|
||||
+ break;
|
||||
+
|
||||
+ case POPPLER_ERROR_ENCRYPTED:
|
||||
+ errorCode = DocumentErrorEncrypted;
|
||||
+ break;
|
||||
}
|
||||
- else
|
||||
- {
|
||||
- // OK, the glib's wrapper don't pass the error code directly
|
||||
- // from Poppler. Instead returns G_FILE_ERROR_FAILED and a
|
||||
- // non translated string.
|
||||
- // Maybe I'm wrong (very probable) but that's a wrong way.
|
||||
- // So I'm reading the error code from the error string...
|
||||
- sscanf (loadError->message, "Failed to load document (error %d)",
|
||||
- (gint *)&errorCode);
|
||||
- }
|
||||
g_error_free (loadError);
|
||||
// Get our error message.
|
||||
gchar *errorMessage = IDocument::getErrorMessage (errorCode);
|
||||
@@ -678,15 +680,14 @@ PDFDocument::setTextSelection (DocumentRectangle *rect
|
||||
gdouble pageWidth, pageHeight;
|
||||
poppler_page_get_size(page, &pageWidth, &pageHeight);
|
||||
|
||||
- //for get text we must exchange y coordinate, don't ask me where logic here.
|
||||
PopplerRectangle textRect = { rect->getX1() / getZoom(),
|
||||
- (pageHeight - rect->getY2() / getZoom()),
|
||||
- rect->getX2() * getZoom() / getZoom(),
|
||||
- (pageHeight - rect->getY1() / getZoom())};
|
||||
+ rect->getY1() / getZoom(),
|
||||
+ rect->getX2() / getZoom(),
|
||||
+ rect->getY2() / getZoom()};
|
||||
repairEmpty(textRect);
|
||||
|
||||
#if defined (HAVE_POPPLER_0_6_0)
|
||||
- gchar *text = poppler_page_get_text(page, POPPLER_SELECTION_GLYPH,
|
||||
+ gchar *text = poppler_page_get_selected_text(page, POPPLER_SELECTION_GLYPH,
|
||||
&textRect);
|
||||
#else // !HAVE_POPPLER_0_6_0
|
||||
gchar *text = poppler_page_get_text(page, &textRect);
|
@ -1,44 +0,0 @@
|
||||
$OpenBSD: patch-src_gtk_MainView_cxx,v 1.1 2009/04/04 09:25:25 landry Exp $
|
||||
--- src/gtk/MainView.cxx.orig Sat Feb 28 22:00:55 2009
|
||||
+++ src/gtk/MainView.cxx Sat Apr 4 11:08:38 2009
|
||||
@@ -77,7 +77,7 @@ static void main_window_zoom_in_cb (GtkWidget *, gpoin
|
||||
static void main_window_zoom_out_cb (GtkWidget *, gpointer);
|
||||
static void main_window_zoom_width_cb (GtkToggleAction *, gpointer);
|
||||
static void main_window_set_page_mode (GtkRadioAction *, GtkRadioAction *, gpointer);
|
||||
-static void main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data);
|
||||
+static gboolean main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data);
|
||||
|
||||
#if defined (HAVE_CUPS)
|
||||
static void main_window_print_cb (GtkWidget *, gpointer);
|
||||
@@ -1479,18 +1479,25 @@ main_window_set_page_mode (GtkRadioAction *action, Gtk
|
||||
pter->setPageMode (mode);
|
||||
}
|
||||
|
||||
-void
|
||||
+gboolean
|
||||
main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data)
|
||||
{
|
||||
g_assert ( NULL != data && "The data parameter is NULL.");
|
||||
|
||||
MainPter *pter = (MainPter *)data;
|
||||
// Only zoom when the CTRL-Button is down...
|
||||
- if ( !(event->state & GDK_CONTROL_MASK) ) return;
|
||||
- if ( event->direction == GDK_SCROLL_UP ) {
|
||||
- pter->zoomInActivated ();
|
||||
- } else if ( event->direction == GDK_SCROLL_DOWN ) {
|
||||
- pter->zoomOutActivated ();
|
||||
+ if ( GDK_CONTROL_MASK == (event->state & GDK_CONTROL_MASK) )
|
||||
+ {
|
||||
+ if ( event->direction == GDK_SCROLL_UP )
|
||||
+ {
|
||||
+ pter->zoomInActivated ();
|
||||
+ }
|
||||
+ else if ( event->direction == GDK_SCROLL_DOWN )
|
||||
+ {
|
||||
+ pter->zoomOutActivated ();
|
||||
+ }
|
||||
+ return TRUE;
|
||||
}
|
||||
+ return FALSE;
|
||||
}
|
||||
|
@ -1,29 +0,0 @@
|
||||
$OpenBSD: patch-src_gtk_PageView_cxx,v 1.2 2010/12/06 10:06:48 stsp Exp $
|
||||
|
||||
The 2nd hunk is from upstream http://trac.emma-soft.com/epdfview/changeset/348
|
||||
|
||||
--- src/gtk/PageView.cxx.orig Sat Feb 28 22:00:35 2009
|
||||
+++ src/gtk/PageView.cxx Sun Dec 5 13:26:28 2010
|
||||
@@ -527,13 +527,6 @@ page_view_scrolled_cb (GtkWidget *widget, GdkEventScro
|
||||
{
|
||||
g_assert ( NULL != data && "The data parameter is NULL.");
|
||||
|
||||
- // don't scroll when the CRTL-Button is down, because then the page should
|
||||
- // actually be zoomed and not scrolled. Zooming is handelt by the MainView
|
||||
- // class.
|
||||
- if ( event->state & GDK_CONTROL_MASK )
|
||||
- {
|
||||
- return FALSE;
|
||||
- }
|
||||
PagePter *pter = (PagePter *)data;
|
||||
GtkAdjustment *adjustment =
|
||||
gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (widget));
|
||||
@@ -664,7 +657,7 @@ page_view_keypress_cb(GtkWidget *widget, GdkEventKey *
|
||||
direction = GTK_SCROLL_START;
|
||||
|
||||
case GDK_BackSpace:
|
||||
- pter->scrollToNextPage ();
|
||||
+ pter->scrollToPreviousPage ();
|
||||
direction = GTK_SCROLL_START;
|
||||
|
||||
default:
|
@ -1,5 +1,6 @@
|
||||
@comment $OpenBSD: PLIST,v 1.6 2009/12/22 15:54:32 ajacoutot Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.7 2011/06/08 18:26:44 ajacoutot Exp $
|
||||
@bin bin/epdfview
|
||||
@man man/man1/epdfview.1
|
||||
share/applications/epdfview.desktop
|
||||
share/epdfview/
|
||||
share/epdfview/pixmaps/
|
||||
@ -25,6 +26,9 @@ share/icons/hicolor/32x32/apps/epdfview.png
|
||||
share/icons/hicolor/48x48/
|
||||
share/icons/hicolor/48x48/apps/
|
||||
share/icons/hicolor/48x48/apps/epdfview.png
|
||||
share/locale/ar/
|
||||
share/locale/ar/LC_MESSAGES/
|
||||
share/locale/ar/LC_MESSAGES/epdfview.mo
|
||||
share/locale/ca/LC_MESSAGES/epdfview.mo
|
||||
share/locale/cs/LC_MESSAGES/epdfview.mo
|
||||
share/locale/de/LC_MESSAGES/epdfview.mo
|
||||
@ -32,8 +36,16 @@ share/locale/el/LC_MESSAGES/epdfview.mo
|
||||
share/locale/es/LC_MESSAGES/epdfview.mo
|
||||
share/locale/eu/LC_MESSAGES/epdfview.mo
|
||||
share/locale/fr/LC_MESSAGES/epdfview.mo
|
||||
share/locale/gl/LC_MESSAGES/epdfview.mo
|
||||
share/locale/he_IL/
|
||||
share/locale/he_IL/LC_MESSAGES/
|
||||
share/locale/he_IL/LC_MESSAGES/epdfview.mo
|
||||
share/locale/hu/LC_MESSAGES/epdfview.mo
|
||||
share/locale/it/LC_MESSAGES/epdfview.mo
|
||||
share/locale/ja/LC_MESSAGES/epdfview.mo
|
||||
share/locale/nl_NL/
|
||||
share/locale/nl_NL/LC_MESSAGES/
|
||||
share/locale/nl_NL/LC_MESSAGES/epdfview.mo
|
||||
share/locale/pl/LC_MESSAGES/epdfview.mo
|
||||
share/locale/pt_BR/LC_MESSAGES/epdfview.mo
|
||||
share/locale/pt_PT/
|
||||
|
Loading…
x
Reference in New Issue
Block a user