Return a copy of the original page setup if the dialog was canceled.

2006-04-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintoperation-unix.c (gtk_print_run_page_setup_dialog):
	Return a copy of the original page setup if the dialog was canceled.
This commit is contained in:
Matthias Clasen 2006-04-24 14:37:45 +00:00 committed by Matthias Clasen
parent 4141a92fff
commit 3d07d219e5
3 changed files with 21 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2006-04-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprintoperation-unix.c (gtk_print_run_page_setup_dialog):
Return a copy of the original page setup if the dialog was canceled.
2006-04-24 Alexander Larsson <alexl@redhat.com> 2006-04-24 Alexander Larsson <alexl@redhat.com>
* gtk/gtkprintjob.h: * gtk/gtkprintjob.h:

View File

@ -1,3 +1,8 @@
2006-04-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprintoperation-unix.c (gtk_print_run_page_setup_dialog):
Return a copy of the original page setup if the dialog was canceled.
2006-04-24 Alexander Larsson <alexl@redhat.com> 2006-04-24 Alexander Larsson <alexl@redhat.com>
* gtk/gtkprintjob.h: * gtk/gtkprintjob.h:

View File

@ -245,12 +245,18 @@ gtk_print_run_page_setup_dialog (GtkWindow *parent,
page_setup); page_setup);
gtk_page_setup_unix_dialog_set_print_settings (GTK_PAGE_SETUP_UNIX_DIALOG (dialog), gtk_page_setup_unix_dialog_set_print_settings (GTK_PAGE_SETUP_UNIX_DIALOG (dialog),
settings); settings);
gtk_dialog_run (GTK_DIALOG (dialog)); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
new_page_setup = gtk_page_setup_unix_dialog_get_page_setup (GTK_PAGE_SETUP_UNIX_DIALOG (dialog));
new_page_setup = gtk_page_setup_unix_dialog_get_page_setup (GTK_PAGE_SETUP_UNIX_DIALOG (dialog)); else
{
if (page_setup)
new_page_setup = gtk_page_setup_copy (page_setup);
else
new_page_setup = gtk_page_setup_new ();
}
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
return new_page_setup; return new_page_setup;
} }