* Two build fixes due to major API changes in tinymail
[modest] / src / modest-mail-operation-queue.c
index cf536b9..4f8270e 100644 (file)
@@ -139,8 +139,9 @@ modest_mail_operation_queue_finalize (GObject *obj)
        g_mutex_lock (priv->queue_lock);
 
        if (priv->op_queue) {
+               /* Cancel all */
                if (!g_queue_is_empty (priv->op_queue))
-                       g_queue_foreach (priv->op_queue, (GFunc) g_object_unref, NULL);
+                       modest_mail_operation_queue_cancel_all (MODEST_MAIL_OPERATION_QUEUE (obj));
                g_queue_free (priv->op_queue);
        }
 
@@ -201,16 +202,9 @@ modest_mail_operation_queue_remove (ModestMailOperationQueue *self,
        g_signal_emit (self, signals[QUEUE_CHANGED_SIGNAL], 0,
                       mail_op, MODEST_MAIL_OPERATION_QUEUE_OPERATION_REMOVED);
 
-       /* TODO: errors? */
-       {
-               const GError *err = modest_mail_operation_get_error (mail_op);
-               if (err)
-                       g_warning (err->message);
-       }
-
        /* Free object */
+       modest_runtime_verify_object_last_ref (mail_op, "");
        g_object_unref (G_OBJECT (mail_op));
-       modest_runtime_verify_object_death (mail_op, "");
 }