diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-06-15 20:19:27 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-06-15 20:19:27 +0800 |
commit | f642e03d4967c80aaad45475475752264c95de5c (patch) | |
tree | 23b2f4e862f73b86e13f92c433b8315d783b1d2e /plugins | |
parent | 2f43685f591581bc7ad051ac6464799f8e5df5bf (diff) | |
download | gsoc2013-evolution-f642e03d4967c80aaad45475475752264c95de5c.tar gsoc2013-evolution-f642e03d4967c80aaad45475475752264c95de5c.tar.gz gsoc2013-evolution-f642e03d4967c80aaad45475475752264c95de5c.tar.bz2 gsoc2013-evolution-f642e03d4967c80aaad45475475752264c95de5c.tar.lz gsoc2013-evolution-f642e03d4967c80aaad45475475752264c95de5c.tar.xz gsoc2013-evolution-f642e03d4967c80aaad45475475752264c95de5c.tar.zst gsoc2013-evolution-f642e03d4967c80aaad45475475752264c95de5c.zip |
message_list_get_selected: Give the returned array a free func.
The returned UID array now has a built-in "free" function for its
elements and should be released by callers with g_ptr_array_unref()
rather than em_utils_uids_free() or some equivalent.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mail-to-task/mail-to-task.c | 8 | ||||
-rw-r--r-- | plugins/mailing-list-actions/mailing-list-actions.c | 2 | ||||
-rw-r--r-- | plugins/templates/templates.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c index 12ff5b0c95..be27242544 100644 --- a/plugins/mail-to-task/mail-to-task.c +++ b/plugins/mail-to-task/mail-to-task.c @@ -1035,7 +1035,7 @@ do_mail_to_event (AsyncData *data) /* free memory */ if (client != NULL) g_object_unref (client); - em_utils_uids_free (uids); + g_ptr_array_unref (uids); g_object_unref (folder); g_object_unref (data->source); @@ -1127,7 +1127,7 @@ mail_to_event (ECalClientSourceType source_type, g_free (question); if (response == GTK_RESPONSE_NO) { - em_utils_uids_free (uids); + g_ptr_array_unref (uids); return; } } @@ -1195,7 +1195,6 @@ mail_to_event (ECalClientSourceType source_type, } else if (!source) { e_notice (NULL, GTK_MESSAGE_ERROR, _("No writable calendar is available.")); - em_utils_uids_free (uids); if (error) g_error_free (error); goto exit; @@ -1212,7 +1211,7 @@ mail_to_event (ECalClientSourceType source_type, data->source = g_object_ref (source); data->source_type = source_type; data->folder = e_mail_reader_ref_folder (reader); - data->uids = uids; + data->uids = g_ptr_array_ref (uids); data->with_attendees = with_attendees; if (uids->len == 1) @@ -1232,6 +1231,7 @@ mail_to_event (ECalClientSourceType source_type, exit: g_object_unref (default_source); + g_ptr_array_unref (uids); } static void diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c index efbe222307..e390e9dd2e 100644 --- a/plugins/mailing-list-actions/mailing-list-actions.c +++ b/plugins/mailing-list-actions/mailing-list-actions.c @@ -316,7 +316,7 @@ emla_list_action (EMailReader *reader, g_clear_object (&folder); - em_utils_uids_free (uids); + g_ptr_array_unref (uids); } static void diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c index d83e1fbe17..95d006028e 100644 --- a/plugins/templates/templates.c +++ b/plugins/templates/templates.c @@ -1040,7 +1040,7 @@ action_reply_with_template_cb (GtkAction *action, g_clear_object (&folder); - em_utils_uids_free (uids); + g_ptr_array_unref (uids); } static void |