[gimp] Bug 776017 - Print resolution changes not taken in account...
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 776017 - Print resolution changes not taken in account...
- Date: Tue, 20 Dec 2016 15:22:47 +0000 (UTC)
commit 7335dc8dc295f0d7b975478c3c25b4ee753244a0
Author: Jehan <jehan girinstud io>
Date: Wed Dec 14 00:55:58 2016 +0100
Bug 776017 - Print resolution changes not taken in account...
... for second printing.
Do not save in parasite the resolution used in the print plug-in when
it is the image intended resolution. This allows to take into account
changes of print resolution in successive printing. Only save it when
different since one may have reasons and we should not interfere.
plug-ins/print/print-settings.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/print/print-settings.c b/plug-ins/print/print-settings.c
index f39ec2d..5fe9c00 100644
--- a/plug-ins/print/print-settings.c
+++ b/plug-ins/print/print-settings.c
@@ -81,12 +81,20 @@ print_settings_save (PrintData *data)
/* image setup */
if (gimp_image_is_valid (data->image_id))
{
+ gdouble xres;
+ gdouble yres;
+
+ gimp_image_get_resolution (data->image_id, &xres, &yres);
+
g_key_file_set_integer (key_file, "image-setup",
"unit", data->unit);
- g_key_file_set_double (key_file, "image-setup",
- "x-resolution", data->xres);
- g_key_file_set_double (key_file, "image-setup",
- "y-resolution", data->yres);
+ if (xres != data->xres || yres != data->yres)
+ {
+ g_key_file_set_double (key_file, "image-setup",
+ "x-resolution", data->xres);
+ g_key_file_set_double (key_file, "image-setup",
+ "y-resolution", data->yres);
+ }
g_key_file_set_double (key_file, "image-setup",
"x-offset", data->offset_x);
g_key_file_set_double (key_file, "image-setup",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]