From f9ffe647231a7ba2bd5347d92d560b6a57fee786 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 15 May 2013 09:17:58 -0400 Subject: Convert EMailPart to a GObject. EMailPart is reference-counted, subclassed, and allows a custom finalize function. There's no excuse for it not to use GObject. --- em-format/e-mail-part-list.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'em-format/e-mail-part-list.c') diff --git a/em-format/e-mail-part-list.c b/em-format/e-mail-part-list.c index f7adcf9895..c866e6a559 100644 --- a/em-format/e-mail-part-list.c +++ b/em-format/e-mail-part-list.c @@ -161,7 +161,7 @@ mail_part_list_dispose (GObject *object) g_mutex_lock (&priv->queue_lock); while (!g_queue_is_empty (&priv->queue)) - e_mail_part_unref (g_queue_pop_head (&priv->queue)); + g_object_unref (g_queue_pop_head (&priv->queue)); g_mutex_unlock (&priv->queue_lock); /* Chain up to parent's dispose() method. */ @@ -295,7 +295,7 @@ e_mail_part_list_add_part (EMailPartList *part_list, g_queue_push_tail ( &part_list->priv->queue, - e_mail_part_ref (part)); + g_object_ref (part)); g_mutex_unlock (&part_list->priv->queue_lock); } @@ -327,7 +327,7 @@ e_mail_part_list_ref_part (EMailPartList *part_list, candidate_id = e_mail_part_get_id (candidate); if (g_strcmp0 (candidate_id, part_id) == 0) { - match = e_mail_part_ref (candidate); + match = g_object_ref (candidate); break; } } @@ -348,7 +348,7 @@ e_mail_part_list_ref_part (EMailPartList *part_list, * of #EMailPart instances is queued. * * Each #EMailPart is referenced for thread-safety and should be unreferenced - * with e_mail_part_unref(). + * with g_object_unref(). * * Returns: the number of parts added to @result_queue **/ @@ -386,7 +386,7 @@ e_mail_part_list_queue_parts (EMailPartList *part_list, if (part == NULL) continue; - g_queue_push_tail (result_queue, e_mail_part_ref (part)); + g_queue_push_tail (result_queue, g_object_ref (part)); parts_queued++; } -- cgit