Commit f35565c8 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

plug-ins/print/print-draw-page.c plug-ins/print/print-page-layout.c don't

2006-12-27  Sven Neumann  <sven@gimp.org>

	* plug-ins/print/print-draw-page.c
	* plug-ins/print/print-page-layout.c
	* plug-ins/print/print.[ch]: don't set the resolution and unit
on
	the image, only initialize the dialog with these values.
parent 682b7ec5
2006-12-27 Sven Neumann <sven@gimp.org>
* app/tools/gimpimagemaptool.c (gimp_image_map_tool_load_save):
show a message in the statusbar when settings are saved.
2006-12-26 Sven Neumann <sven@gimp.org>
* plug-ins/print/print-draw-page.c
* plug-ins/print/print-page-layout.c
* plug-ins/print/print.[ch]: don't set the resolution and unit on
the image, only initialize the dialog with these values.
2006-12-27 Sven Neumann <sven@gimp.org>
* app/tools/gimpimagemaptool.c (gimp_image_map_tool_load_save):
show a message in the statusbar when settings are saved.
2006-12-26 Sven Neumann <sven@gimp.org>
* plug-ins/common/tileit.c: corrected label (bug #389779).
......
......@@ -58,13 +58,10 @@ draw_page_cairo (GtkPrintContext *context,
gint image_rowstride;
gdouble scale_x;
gdouble scale_y;
gdouble x0 = 0;
gdouble y0 = 0;
gdouble x0 = 0;
gdouble y0 = 0;
guchar *pixels;
cairo_surface_t *surface;
gint32 image_id = data->image_id;
gdouble image_xres;
gdouble image_yres;
cr = gtk_print_context_get_cairo_context (context);
cr_width = gtk_print_context_get_width (context);
......@@ -72,17 +69,16 @@ draw_page_cairo (GtkPrintContext *context,
cr_dpi_x = gtk_print_context_get_dpi_x (context);
cr_dpi_y = gtk_print_context_get_dpi_y (context);
gimp_image_get_resolution (image_id, &image_xres, &image_yres);
pixels = get_image_pixels (data, &image_width, &image_height,
&image_rowstride);
scale_x = cr_dpi_x / image_xres;
scale_y = cr_dpi_y / image_yres;
scale_x = cr_dpi_x / data->xres;
scale_y = cr_dpi_y / data->yres;
if (scale_x * image_width > cr_width + EPSILON)
{
g_message (_("Image width (%lg in) is larger than printable width (%lg in)."),
image_width / image_xres, cr_width / cr_dpi_x);
image_width / data->xres, cr_width / cr_dpi_x);
gtk_print_operation_cancel (data->operation);
return FALSE;
}
......@@ -90,7 +86,7 @@ draw_page_cairo (GtkPrintContext *context,
if (scale_y * image_height > cr_height + EPSILON)
{
g_message (_("Image height (%lg in) is larger than printable height (%lg in)."),
image_height / image_yres, cr_height / cr_dpi_y);
image_height / data->yres, cr_height / cr_dpi_y);
gtk_print_operation_cancel (data->operation);
return FALSE;
}
......
......@@ -399,7 +399,6 @@ print_size_info_set_resolution (PrintSizeInfo *info,
data->xres = xres;
data->yres = yres;
data->print_size_changed = TRUE;
g_signal_handlers_block_by_func (info->resolution_entry,
print_size_info_resolution_changed,
......
......@@ -167,12 +167,11 @@ print_image (gint32 image_ID,
data = g_new0 (PrintData, 1);
data->num_pages = 1;
data->image_id = image_ID;
data->drawable_id = drawable_ID;
data->operation = operation;
data->print_size_changed = FALSE;
data->num_pages = 1;
data->image_id = image_ID;
data->drawable_id = drawable_ID;
data->operation = operation;
data->unit = gimp_image_get_unit (data->image_id);
gimp_image_get_resolution (data->image_id, &data->xres, &data->yres);
load_print_settings (data);
......@@ -290,15 +289,6 @@ custom_widget_apply (GtkPrintOperation *operation,
GtkWidget *widget,
PrintData *data)
{
if (data->print_size_changed)
{
gimp_image_undo_group_start (data->image_id);
gimp_image_set_resolution (data->image_id, data->xres, data->yres);
gimp_image_set_unit (data->image_id, data->unit);
gimp_image_undo_group_end (data->image_id);
}
}
......
......@@ -29,7 +29,6 @@ typedef struct
guchar *caption;
gdouble xres;
gdouble yres;
gboolean print_size_changed;
GtkPageOrientation orientation;
} PrintData;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment