r44147 - in /desktop/unstable/evince/debian: changelog patches/revert-69b474fce1.patch patches/series

smcv at users.alioth.debian.org smcv at users.alioth.debian.org
Fri Mar 6 08:36:36 UTC 2015


Author: smcv
Date: Fri Mar  6 08:36:36 2015
New Revision: 44147

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=44147
Log:
* Add debian/patches/revert-69b474fce1.patch (Closes: #768133)
  - from upstream git, reverts commit which broke landscape printing
  - patch from Chris Kuehl

Added:
    desktop/unstable/evince/debian/patches/revert-69b474fce1.patch
Modified:
    desktop/unstable/evince/debian/changelog
    desktop/unstable/evince/debian/patches/series

Modified: desktop/unstable/evince/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/evince/debian/changelog?rev=44147&op=diff
==============================================================================
--- desktop/unstable/evince/debian/changelog	[utf-8] (original)
+++ desktop/unstable/evince/debian/changelog	[utf-8] Fri Mar  6 08:36:36 2015
@@ -1,3 +1,13 @@
+evince (3.14.1-2) UNRELEASED; urgency=medium
+
+  * Team upload.
+
+  [ Chris Kuehl ]
+  * Add debian/patches/revert-69b474fce1.patch (Closes: #768133)
+    - from upstream git, reverts commit which broke landscape printing
+
+ -- Simon McVittie <smcv at debian.org>  Fri, 06 Mar 2015 08:31:17 +0000
+
 evince (3.14.1-1) unstable; urgency=medium
 
   * New upstream release.

Added: desktop/unstable/evince/debian/patches/revert-69b474fce1.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/evince/debian/patches/revert-69b474fce1.patch?rev=44147&op=file
==============================================================================
--- desktop/unstable/evince/debian/patches/revert-69b474fce1.patch	(added)
+++ desktop/unstable/evince/debian/patches/revert-69b474fce1.patch	[utf-8] Fri Mar  6 08:36:36 2015
@@ -0,0 +1,116 @@
+From: Carlos Garcia Campos <carlosgc at gnome.org>
+Date: Wed, 28 Jan 2015 09:27:17 +0100
+Subject: Revert "print-operation: Fix centering of documents when printing 
+ with a manual scale"
+
+This reverts commit ae7a5715131613955a37419b5da1d6d9f3c1cb1d.
+
+Fixed the centering of documents when using a manual scale, but it broke
+landscape printing, so reverting until we find a proper fix in both
+Evince and GTK+.
+
+Origin: upstream, https://git.gnome.org/browse/evince/commit/?id=69b474fce1a87a
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=739723
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768133
+
+--- a/libview/ev-print-operation.c
++++ b/libview/ev-print-operation.c
+@@ -1825,27 +1825,6 @@ _print_context_get_hard_margins (GtkPrin
+ }
+ 
+ static void
+-ev_print_operation_print_get_scaled_page_size (EvPrintOperationPrint *print,
+-                                               gint                   page,
+-                                               gdouble               *width,
+-                                               gdouble               *height)
+-{
+-        GtkPrintSettings *settings;
+-        gdouble           manual_scale;
+-
+-        ev_document_get_page_size (EV_PRINT_OPERATION (print)->document,
+-                                   page, width, height);
+-
+-        settings = gtk_print_operation_get_print_settings (print->op);
+-        manual_scale = gtk_print_settings_get_scale (settings) / 100.0;
+-        if (manual_scale == 1.0)
+-                return;
+-
+-        *width *= manual_scale;
+-        *height *= manual_scale;
+-}
+-
+-static void
+ ev_print_operation_print_draw_page (EvPrintOperationPrint *print,
+ 				    GtkPrintContext       *context,
+ 				    gint                   page)
+@@ -1855,7 +1834,6 @@ ev_print_operation_print_draw_page (EvPr
+ 	gdouble           cr_width, cr_height;
+ 	gdouble           width, height, scale;
+ 	gdouble           x_scale, y_scale;
+-        gdouble           x_offset, y_offset;
+ 	gdouble           top, bottom, left, right;
+ 
+ 	gtk_print_operation_set_defer_drawing (print->op);
+@@ -1879,16 +1857,12 @@ ev_print_operation_print_draw_page (EvPr
+ 	cr = gtk_print_context_get_cairo_context (context);
+ 	cr_width = gtk_print_context_get_width (context);
+ 	cr_height = gtk_print_context_get_height (context);
+-        ev_print_operation_print_get_scaled_page_size (print, page, &width, &height);
++	ev_document_get_page_size (op->document, page, &width, &height);
+ 
+ 	if (print->page_scale == EV_SCALE_NONE) {
+ 		/* Center document page on the printed page */
+-		if (print->autorotate) {
+-                        x_offset = (cr_width - width) / 2;
+-                        y_offset = (cr_height - height) / 2;
+-                        cairo_device_to_user (cr, &x_offset, &y_offset);
+-                        cairo_translate (cr, x_offset, y_offset);
+-                }
++		if (print->autorotate)
++			cairo_translate (cr, (cr_width - width) / 2, (cr_height - height) / 2);
+ 	} else {
+ 		_print_context_get_hard_margins (context, &top, &bottom, &left, &right);
+ 
+@@ -1901,27 +1875,29 @@ ev_print_operation_print_draw_page (EvPr
+                         scale = 1.0;
+ 
+ 		if (print->autorotate) {
+-                        x_offset = (cr_width - scale * width) / 2;
+-                        y_offset = (cr_height - scale * height) / 2;
+-                        cairo_device_to_user (cr, &x_offset, &y_offset);
+-                        cairo_translate (cr, x_offset, y_offset);
++			double left_right_sides, top_bottom_sides;
++
++			cairo_translate (cr, (cr_width - scale * width) / 2,
++					 (cr_height - scale * height) / 2);
+ 
+ 			/* Ensure document page is within the margins. The
+ 			 * scale guarantees the document will fit in the
+ 			 * margins so we just need to check each side and
+ 			 * if it overhangs the margin, translate it to the
+-                         * margin. */
+-			if (x_offset < left)
+-				cairo_translate (cr, left - x_offset, 0);
++			 * margin. */
++			left_right_sides = (cr_width - width*scale)/2;
++			top_bottom_sides = (cr_height - height*scale)/2;
++			if (left_right_sides < left)
++				cairo_translate (cr, left - left_right_sides, 0);
+ 
+-			if (x_offset < right)
+-				cairo_translate (cr, -(right - x_offset), 0);
++			if (left_right_sides < right)
++				cairo_translate (cr, -(right - left_right_sides), 0);
+ 
+-			if (y_offset < top)
+-				cairo_translate (cr, 0, top - y_offset);
++			if (top_bottom_sides < top)
++				cairo_translate (cr, 0, top - top_bottom_sides);
+ 
+-			if (y_offset < bottom)
+-				cairo_translate (cr, 0, -(bottom - y_offset));
++			if (top_bottom_sides < bottom)
++				cairo_translate (cr, 0, -(bottom - top_bottom_sides));
+ 		} else {
+ 			cairo_translate (cr, left, top);
+ 		}

Modified: desktop/unstable/evince/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/evince/debian/patches/series?rev=44147&op=diff
==============================================================================
--- desktop/unstable/evince/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/evince/debian/patches/series	[utf-8] Fri Mar  6 08:36:36 2015
@@ -0,0 +1 @@
+revert-69b474fce1.patch




More information about the pkg-gnome-commits mailing list