rpms/evince/F-12 evince-aspect-ratio.patch, NONE, 1.1 evince.spec, 1.173, 1.174
Marek Kašík
mkasik at fedoraproject.org
Thu Oct 29 14:25:39 UTC 2009
- Previous message (by thread): rpms/syslinux/devel .cvsignore,1.25,1.26 sources,1.27,1.28
- Next message (by thread): rpms/fedora-logos/F-12 .cvsignore, 1.90, 1.91 fedora-logos.spec, 1.135, 1.136 sources, 1.105, 1.106
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mkasik
Update of /cvs/pkgs/rpms/evince/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15783
Modified Files:
evince.spec
Added Files:
evince-aspect-ratio.patch
Log Message:
* Thu Oct 29 2009 Marek Kasik <mkasik at redhat.com> - 2.28.1-5
- Add backported patch evince-aspect-ratio.patch (#531430).
- Preserve aspect ratio of scaled pages and set page orientation
- automatically (gnome bugs #599468 and #599470)
evince-aspect-ratio.patch:
ev-print-operation.c | 34 ++++++++++++++++++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
--- NEW FILE evince-aspect-ratio.patch ---
--- shell/ev-print-operation.c.aspect-ratio 2009-10-29 15:01:28.000000000 +0100
+++ shell/ev-print-operation.c 2009-10-29 15:01:40.000000000 +0100
@@ -1638,13 +1638,36 @@ print_job_cancelled (EvJobPrint
}
static void
+ev_print_operation_print_request_page_setup (EvPrintOperationPrint *print,
+ GtkPrintContext *context,
+ gint page_nr,
+ GtkPageSetup *setup)
+{
+ EvPrintOperation *op = EV_PRINT_OPERATION (print);
+ gdouble width, height;
+ EvPage *page;
+
+ page = ev_document_get_page (op->document, page_nr);
+
+ ev_document_get_page_size (op->document, page,
+ &width, &height);
+
+ if (width > height)
+ gtk_page_setup_set_orientation (setup, GTK_PAGE_ORIENTATION_LANDSCAPE);
+ else
+ gtk_page_setup_set_orientation (setup, GTK_PAGE_ORIENTATION_PORTRAIT);
+
+ g_object_unref (page);
+}
+
+static void
ev_print_operation_print_draw_page (EvPrintOperationPrint *print,
GtkPrintContext *context,
gint page)
{
EvPrintOperation *op = EV_PRINT_OPERATION (print);
cairo_t *cr;
- gdouble cr_width, cr_height;
+ gdouble cr_width, cr_height, scale;
gint width, height;
gtk_print_operation_set_defer_drawing (print->op);
@@ -1667,7 +1690,11 @@ ev_print_operation_print_draw_page (EvPr
ev_page_cache_get_size (ev_page_cache_get (op->document),
page, 0, 1.0,
&width, &height);
- cairo_scale (cr, cr_width / (gdouble)width, cr_height / (gdouble)height);
+ if (cr_width / (gdouble)width < cr_height / (gdouble)height)
+ scale = cr_width / (gdouble)width;
+ else
+ scale = cr_height / (gdouble)height;
+ cairo_scale (cr, scale, scale);
ev_job_print_set_cairo (EV_JOB_PRINT (print->job_print), cr);
ev_job_scheduler_push_job (print->job_print, EV_JOB_PRIORITY_NONE);
@@ -1720,6 +1747,9 @@ ev_print_operation_print_init (EvPrintOp
g_signal_connect_swapped (print->op, "status_changed",
G_CALLBACK (ev_print_operation_print_status_changed),
print);
+ g_signal_connect_swapped (print->op, "request_page_setup",
+ G_CALLBACK (ev_print_operation_print_request_page_setup),
+ print);
gtk_print_operation_set_allow_async (print->op, TRUE);
}
Index: evince.spec
===================================================================
RCS file: /cvs/pkgs/rpms/evince/F-12/evince.spec,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -p -r1.173 -r1.174
--- evince.spec 27 Oct 2009 04:21:54 -0000 1.173
+++ evince.spec 29 Oct 2009 14:25:39 -0000 1.174
@@ -6,7 +6,7 @@
Name: evince
Version: 2.28.1
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Document viewer
License: GPLv2+ and GFDL
@@ -22,6 +22,8 @@ Patch1: 0001-Provide-some-indica
Patch2: evince-thumbnail-allocation.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=599726
Patch3: seriesid-clash.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=531430
+Patch4: evince-aspect-ratio.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -115,6 +117,7 @@ This package contains a backend to let e
%patch1 -p1 -b .search-not-available
%patch2 -p0 -b .thumbnail-allocation
%patch3 -p1 -b .seriesid
+%patch4 -p0 -b .aspect-ratio
%build
%configure --disable-static --disable-scrollkeeper \
@@ -269,6 +272,11 @@ fi
%{_libdir}/evince/1/backends/djvudocument.evince-backend
%changelog
+* Thu Oct 29 2009 Marek Kasik <mkasik at redhat.com> - 2.28.1-5
+- Add backported patch evince-aspect-ratio.patch (#531430).
+- Preserve aspect ratio of scaled pages and set page orientation
+- automatically (gnome bugs #599468 and #599470)
+
* Tue Oct 27 2009 Matthias Clasen <mclasen at redhat.com> - 2.28.1-4
- Avoid a help file seriesid clash
- Previous message (by thread): rpms/syslinux/devel .cvsignore,1.25,1.26 sources,1.27,1.28
- Next message (by thread): rpms/fedora-logos/F-12 .cvsignore, 1.90, 1.91 fedora-logos.spec, 1.135, 1.136 sources, 1.105, 1.106
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list