[gimp] Bug 724444 - Printing ignores dpi ratio / image proportions, always prints 1:1



commit 1093a82e798587fc0be9581e9d99a2b186eceba3
Author: Michael Natterer <mitch gimp org>
Date:   Fri Apr 18 19:46:41 2014 +0200

    Bug 724444 - Printing ignores dpi ratio / image proportions, always prints 1:1
    
    Enable the resolution chain button only if xres == yres.

 plug-ins/print/print-page-layout.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/plug-ins/print/print-page-layout.c b/plug-ins/print/print-page-layout.c
index 7292495..191ff75 100644
--- a/plug-ins/print/print-page-layout.c
+++ b/plug-ins/print/print-page-layout.c
@@ -337,7 +337,8 @@ print_size_frame (PrintData    *data,
   gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (entry), 1, data->yres);
 
   chain = gimp_chain_button_new (GIMP_CHAIN_RIGHT);
-  gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chain), TRUE);
+  if (ABS (data->xres - data->yres) < GIMP_MIN_RESOLUTION)
+    gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chain), TRUE);
   gtk_table_attach (GTK_TABLE (entry), chain, 2, 3, 0, 2,
                     GTK_SHRINK | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
   gtk_widget_show (chain);
@@ -767,18 +768,18 @@ print_size_info_set_resolution (PrintSizeInfo *info,
                                 gdouble        xres,
                                 gdouble        yres)
 {
-  PrintData    *data = info->data;
-  gdouble       offset_x;
-  gdouble       offset_y;
-  gdouble       offset_x_max;
-  gdouble       offset_y_max;
+  PrintData *data = info->data;
+  gdouble    offset_x;
+  gdouble    offset_y;
+  gdouble    offset_x_max;
+  gdouble    offset_y_max;
 
   if (info->chain && gimp_chain_button_get_active (info->chain))
     {
       if (xres != data->xres)
-          yres = xres;
+        yres = xres;
       else
-          xres = yres;
+        xres = yres;
     }
 
   data->xres = xres;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]