diff --git a/ChangeLog b/ChangeLog index ecc5736985..dbd9407a0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-24 Matthias Clasen + + * 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 * gtk/gtkprintjob.h: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ecc5736985..dbd9407a0e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2006-04-24 Matthias Clasen + + * 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 * gtk/gtkprintjob.h: diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c index 1257fc0db8..b5122ae822 100644 --- a/gtk/gtkprintoperation-unix.c +++ b/gtk/gtkprintoperation-unix.c @@ -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; }