Don't get stuck in a recursive mainloop if a synchronous preview is

2007-04-29  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkprintoperation.c (print_pages_idle): Don't get
        stuck in a recursive mainloop if a synchronous preview
        is cancelled.

svn path=/trunk/; revision=17721
This commit is contained in:
Matthias Clasen 2007-04-30 02:47:41 +00:00 committed by Matthias Clasen
parent b9856ac887
commit 7f95ef5ef3
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2007-04-29 Matthias Clasen <mclasen@redhat.com>
* 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 <mclasen@redhat.com>
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 <mclasen@redhat.com>

View File

@ -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);