diff --git a/ChangeLog b/ChangeLog index eb0cab4e00..7178af325c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-04-29 Matthias Clasen + + * gtk/gtkprintoperation.c (print_pages_idle): Don't get + stuck in a recursive mainloop if a synchronous preview + is cancelled. + 2007-04-29 Matthias Clasen Make the emission of ::end-print and ::done consistent @@ -10,7 +16,7 @@ (print_pages_idle): If a preview has been cancelled, don't emit ::ready, but emit ::end-print. - tests/print-editor.c: Use ::end-print to undo allocations + * tests/print-editor.c: Use ::end-print to undo allocations from ::begin-print. 2007-04-29 Matthias Clasen diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c index ff6a879ca3..ed038152c7 100644 --- a/gtk/gtkprintoperation.c +++ b/gtk/gtkprintoperation.c @@ -1928,7 +1928,7 @@ print_pages_idle_done (gpointer user_data) if (priv->rloop && !data->is_preview) g_main_loop_quit (priv->rloop); - if (!data->is_preview || priv->cancelled) + if (!data->is_preview) g_signal_emit (data->op, signals[DONE], 0, priv->cancelled ? GTK_PRINT_OPERATION_RESULT_CANCEL : @@ -2143,10 +2143,11 @@ print_pages_idle (gpointer user_data) { _gtk_print_operation_set_status (data->op, GTK_PRINT_STATUS_FINISHED_ABORTED, NULL); + data->is_preview = FALSE; done = TRUE; } - if (done && (!data->is_preview || priv->cancelled)) + if (done && !data->is_preview) { g_signal_emit (data->op, signals[END_PRINT], 0, priv->print_context); priv->end_run (data->op, priv->is_sync, priv->cancelled);