set a default page setup on the operation if it is NULL to prevent crash
2007-08-17 Michael Natterer <mitch@gimp.org> * plug-ins/print/print-page-layout.c: set a default page setup on the operation if it is NULL to prevent crash in new installations (which don't have a setup yet). Fixes bug #467643, patch from Stefan Röllin. svn path=/trunk/; revision=23303
This commit is contained in:

committed by
Michael Natterer

parent
bf500e16d0
commit
8717f90460
@ -1,3 +1,10 @@
|
||||
2007-08-17 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* plug-ins/print/print-page-layout.c: set a default page setup on
|
||||
the operation if it is NULL to prevent crash in new installations
|
||||
(which don't have a setup yet). Fixes bug #467643, patch from
|
||||
Stefan Röllin.
|
||||
|
||||
2007-08-17 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimpperspectiveclonetool.c (motion)
|
||||
|
@ -115,6 +115,13 @@ print_page_layout_gui (PrintData *data)
|
||||
info.image_width = gimp_drawable_width (data->drawable_id);
|
||||
info.image_height = gimp_drawable_height (data->drawable_id);
|
||||
|
||||
setup = gtk_print_operation_get_default_page_setup (data->operation);
|
||||
if (! setup)
|
||||
{
|
||||
setup = gtk_page_setup_new ();
|
||||
gtk_print_operation_set_default_page_setup (data->operation, setup);
|
||||
}
|
||||
|
||||
layout = gtk_vbox_new (FALSE, 6);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (layout), 12);
|
||||
|
||||
@ -202,8 +209,6 @@ print_page_layout_gui (PrintData *data)
|
||||
NULL);
|
||||
gtk_widget_show (button);
|
||||
|
||||
setup = gtk_print_operation_get_default_page_setup (data->operation);
|
||||
|
||||
info.preview = gimp_print_preview_new (setup, data->drawable_id);
|
||||
gimp_print_preview_set_use_full_page (GIMP_PRINT_PREVIEW(info.preview),
|
||||
data->use_full_page);
|
||||
@ -873,11 +878,6 @@ print_size_info_set_page_setup (PrintSizeInfo *info)
|
||||
gdouble y;
|
||||
|
||||
setup = gtk_print_operation_get_default_page_setup (data->operation);
|
||||
if (! setup)
|
||||
{
|
||||
setup = gtk_page_setup_new ();
|
||||
gtk_print_operation_set_default_page_setup (data->operation, setup);
|
||||
}
|
||||
|
||||
print_size_info_get_page_dimensions (info,
|
||||
&page_width, &page_height,
|
||||
|
Reference in New Issue
Block a user