Browse Source

xap/evince: Remove newlines in selected text.

slackware-14.2
Damien Goutte-Gattat 11 years ago
parent
commit
48e0a17da3
  1. 25
      xap/evince/evince-2.30.3-poppler.diff
  2. 2
      xap/evince/evince.SlackBuild

25
xap/evince/evince-2.30.3-poppler.diff

@ -1,9 +1,17 @@
diff -Naur evince-2.30.3.orig/backend/pdf/ev-poppler.cc evince-2.30.3/backend/pdf/ev-poppler.cc
--- evince-2.30.3.orig/backend/pdf/ev-poppler.cc 2010-06-24 10:19:28.000000000 +0200
+++ evince-2.30.3/backend/pdf/ev-poppler.cc 2011-05-25 16:48:02.010814626 +0200
@@ -1982,11 +1982,11 @@
+++ evince-2.30.3/backend/pdf/ev-poppler.cc 2011-05-26 16:28:01.115974121 +0200
@@ -1975,21 +1975,25 @@
{
PopplerPage *poppler_page;
PopplerRectangle r;
- double height;
- char *retval;
+ char *retval, *c;
poppler_page = POPPLER_PAGE (rc->page->backend_page);
poppler_page_get_size (poppler_page, NULL, &height);
- poppler_page_get_size (poppler_page, NULL, &height);
r.x1 = points->x1;
- r.y1 = height - points->y2;
+ r.y1 = points->y1;
@ -12,7 +20,16 @@ diff -Naur evince-2.30.3.orig/backend/pdf/ev-poppler.cc evince-2.30.3/backend/pd
+ r.y2 = points->y2;
- retval = poppler_page_get_text (poppler_page,
+ retval = poppler_page_get_selected_text (poppler_page,
+ retval = c = poppler_page_get_selected_text (poppler_page,
(PopplerSelectionStyle)style,
&r);
+ while ( *c ) {
+ if ( *c == '\n' )
+ *c = ' ';
+ c += 1;
+ }
+
return retval;
}

2
xap/evince/evince.SlackBuild

@ -33,7 +33,7 @@ WGET=${WGET:-http://ftp.gnome.org/pub/GNOME/sources/evince/2.30/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-evince}
BUILD=${BUILD:-2GGD}
BUILD=${BUILD:-3GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}

Loading…
Cancel
Save