Commit 3d07d219 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

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.
parent 4141a92f
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>
* gtk/gtkprintjob.h:
......
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>
* gtk/gtkprintjob.h:
......
......@@ -245,12 +245,18 @@ gtk_print_run_page_setup_dialog (GtkWindow *parent,
page_setup);
gtk_page_setup_unix_dialog_set_print_settings (GTK_PAGE_SETUP_UNIX_DIALOG (dialog),
settings);
gtk_dialog_run (GTK_DIALOG (dialog));
new_page_setup = gtk_page_setup_unix_dialog_get_page_setup (GTK_PAGE_SETUP_UNIX_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));
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);
return new_page_setup;
}
......
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