[gedit/wip/improve-printing: 2/2] PrintJob: a few minor code improvements
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/improve-printing: 2/2] PrintJob: a few minor code improvements
- Date: Sat, 21 Feb 2015 11:34:34 +0000 (UTC)
commit 97c0c129816d26550a41b52376420ea1e20e9e33
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Feb 21 12:32:14 2015 +0100
PrintJob: a few minor code improvements
The 'operation' object is already cleared in dispose().
gedit/gedit-print-job.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gedit/gedit-print-job.c b/gedit/gedit-print-job.c
index 88a4ce8..04faf0a 100644
--- a/gedit/gedit-print-job.c
+++ b/gedit/gedit-print-job.c
@@ -663,11 +663,7 @@ done_cb (GtkPrintOperation *operation,
/* Avoid that job is destroyed in the handler of the "done" message. */
g_object_ref (job);
-
g_signal_emit (job, print_job_signals[DONE], 0, print_result, error);
-
- g_clear_object (&job->priv->operation);
-
g_object_unref (job);
}
@@ -694,6 +690,7 @@ gedit_print_job_print (GeditPrintJob *job,
{
gchar *job_name;
+ g_return_val_if_fail (job->priv->operation == NULL, GTK_PRINT_OPERATION_RESULT_ERROR);
g_return_val_if_fail (job->priv->compositor == NULL, GTK_PRINT_OPERATION_RESULT_ERROR);
job->priv->operation = gtk_print_operation_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]