Hold a refence on the print operation until gtk_print_job_send() is done.
2007-05-25 Matthias Clasen <mclasen@redhat.com> * gtk/gtkprintoperation-unix.c (unix_end_run): Hold a refence on the print operation until gtk_print_job_send() is done. (#440040, Chris Vine) svn path=/branches/gtk-2-10/; revision=17916
This commit is contained in:
committed by
Matthias Clasen
parent
51739cf90e
commit
e20be40451
@@ -1,3 +1,11 @@
|
||||
2007-05-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from trunk:
|
||||
|
||||
* gtk/gtkprintoperation-unix.c (unix_end_run): Hold a
|
||||
refence on the print operation until gtk_print_job_send()
|
||||
is done. (#440040, Chris Vine)
|
||||
|
||||
2007-05-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merged from trunk:
|
||||
|
||||
@@ -261,9 +261,8 @@ unix_finish_send (GtkPrintJob *job,
|
||||
gpointer user_data,
|
||||
GError *error)
|
||||
{
|
||||
GtkPrintOperationUnix *op_unix;
|
||||
|
||||
op_unix = (GtkPrintOperationUnix *) user_data;
|
||||
GtkPrintOperation *op = (GtkPrintOperation *) user_data;
|
||||
GtkPrintOperationUnix *op_unix = op->priv->platform_data;
|
||||
|
||||
if (error != NULL)
|
||||
{
|
||||
@@ -286,6 +285,8 @@ unix_finish_send (GtkPrintJob *job,
|
||||
|
||||
if (op_unix->loop)
|
||||
g_main_loop_quit (op_unix->loop);
|
||||
|
||||
g_object_unref (op);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -305,9 +306,12 @@ unix_end_run (GtkPrintOperation *op,
|
||||
|
||||
/* TODO: Check for error */
|
||||
if (op_unix->job != NULL)
|
||||
gtk_print_job_send (op_unix->job,
|
||||
unix_finish_send,
|
||||
op_unix, NULL);
|
||||
{
|
||||
g_object_ref (op);
|
||||
gtk_print_job_send (op_unix->job,
|
||||
unix_finish_send,
|
||||
op, NULL);
|
||||
}
|
||||
|
||||
if (wait)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user