[evolution/wip/camel-more-gobject] Adapt to eds changes
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/camel-more-gobject] Adapt to eds changes
- Date: Mon, 12 Sep 2016 16:47:20 +0000 (UTC)
commit f13e6d5c0bfb7904ba6fa4b7d08ef4dd42c10006
Author: Milan Crha <mcrha redhat com>
Date: Mon Sep 12 18:46:41 2016 +0200
Adapt to eds changes
The code builds. There is no guarantee that it does what it should do.
libemail-engine/e-mail-folder-utils.c | 37 ++++-----
libemail-engine/e-mail-session-utils.c | 32 ++-----
libemail-engine/e-mail-session.c | 2 +-
libemail-engine/e-mail-utils.c | 6 +-
libemail-engine/mail-folder-cache.c | 35 +++++---
libemail-engine/mail-ops.c | 11 +--
mail/e-mail-browser.c | 5 +-
mail/e-mail-display.c | 2 +-
mail/e-mail-folder-pane.c | 2 +-
mail/e-mail-notes.c | 8 +-
mail/e-mail-reader-utils.c | 72 ++++++++++-------
mail/e-mail-reader.c | 7 +-
mail/e-mail-tag-editor.c | 139 +++++++++++++-------------------
mail/e-mail-tag-editor.h | 10 +--
mail/em-composer-utils.c | 4 +-
mail/em-utils.c | 54 +++++++-----
mail/importers/mail-importer.c | 4 +-
mail/message-list.c | 43 +++++++---
modules/mdn/evolution-mdn.c | 19 ++---
plugins/dbx-import/dbx-importer.c | 2 +-
plugins/pst-import/pst-importer.c | 2 +-
plugins/templates/e-templates-store.c | 4 +-
plugins/templates/templates.c | 2 +-
23 files changed, 244 insertions(+), 258 deletions(-)
---
diff --git a/libemail-engine/e-mail-folder-utils.c b/libemail-engine/e-mail-folder-utils.c
index 0bb12bf..53a10a6 100644
--- a/libemail-engine/e-mail-folder-utils.c
+++ b/libemail-engine/e-mail-folder-utils.c
@@ -49,23 +49,16 @@ struct _AsyncContext {
static void
async_context_free (AsyncContext *context)
{
- if (context->message != NULL)
- g_object_unref (context->message);
-
- if (context->info != NULL)
- camel_message_info_unref (context->info);
-
- if (context->part != NULL)
- g_object_unref (context->part);
-
if (context->hash_table != NULL)
g_hash_table_unref (context->hash_table);
if (context->ptr_array != NULL)
g_ptr_array_unref (context->ptr_array);
- if (context->destination != NULL)
- g_object_unref (context->destination);
+ g_clear_object (&context->message);
+ g_clear_object (&context->info);
+ g_clear_object (&context->part);
+ g_clear_object (&context->destination);
g_free (context->fwd_subject);
g_free (context->message_uid);
@@ -148,7 +141,7 @@ e_mail_folder_append_message (CamelFolder *folder,
context->message = g_object_ref (message);
if (info != NULL)
- context->info = camel_message_info_ref (info);
+ context->info = g_object_ref (info);
simple = g_simple_async_result_new (
G_OBJECT (folder), callback, user_data,
@@ -251,7 +244,7 @@ mail_folder_expunge_pop3_stores (CamelFolder *folder,
if (info != NULL) {
flags = camel_message_info_get_flags (info);
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
/* Only interested in deleted messages. */
@@ -794,7 +787,7 @@ e_mail_folder_find_duplicate_messages_sync (CamelFolder *folder,
g_hash_table_iter_init (&iter, hash_table);
while (g_hash_table_iter_next (&iter, &key, &value)) {
- const CamelSummaryMessageID *message_id;
+ CamelSummaryMessageID message_id;
CamelMessageFlags flags;
CamelMessageInfo *info;
gboolean duplicate;
@@ -804,13 +797,13 @@ e_mail_folder_find_duplicate_messages_sync (CamelFolder *folder,
if (!info)
continue;
- message_id = camel_message_info_get_message_id (info);
+ message_id.id.id = camel_message_info_get_message_id (info);
flags = camel_message_info_get_flags (info);
/* Skip messages marked for deletion. */
if (flags & CAMEL_MESSAGE_DELETED) {
g_queue_push_tail (&trash, key);
- camel_message_info_unref (info);
+ g_clear_object (&info);
continue;
}
@@ -818,13 +811,13 @@ e_mail_folder_find_duplicate_messages_sync (CamelFolder *folder,
if (digest == NULL) {
g_queue_push_tail (&trash, key);
- camel_message_info_unref (info);
+ g_clear_object (&info);
continue;
}
/* Determine if the message a duplicate. */
- value = g_hash_table_lookup (unique_ids, &message_id->id.id);
+ value = g_hash_table_lookup (unique_ids, &message_id.id.id);
duplicate = (value != NULL) && g_str_equal (digest, value);
if (!duplicate) {
@@ -834,13 +827,13 @@ e_mail_folder_find_duplicate_messages_sync (CamelFolder *folder,
* of 64-bit integers and have the hash
* table keys point to array elements. */
v_int64 = g_new0 (gint64, 1);
- *v_int64 = (gint64) message_id->id.id;
+ *v_int64 = (gint64) message_id.id.id;
g_hash_table_insert (unique_ids, v_int64, g_strdup (digest));
g_queue_push_tail (&trash, key);
}
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
/* Delete all non-duplicate messages from the hash table. */
@@ -1397,8 +1390,8 @@ mail_folder_strip_message (CamelFolder *folder,
CAMEL_MESSAGE_DELETED,
CAMEL_MESSAGE_DELETED);
- camel_message_info_unref (orig_info);
- camel_message_info_unref (copy_info);
+ g_clear_object (&orig_info);
+ g_clear_object (©_info);
}
return success;
diff --git a/libemail-engine/e-mail-session-utils.c b/libemail-engine/e-mail-session-utils.c
index eb9f426..dabdeab 100644
--- a/libemail-engine/e-mail-session-utils.c
+++ b/libemail-engine/e-mail-session-utils.c
@@ -66,26 +66,13 @@ struct _AsyncContext {
static void
async_context_free (AsyncContext *context)
{
- if (context->folder != NULL)
- g_object_unref (context->folder);
-
- if (context->message != NULL)
- g_object_unref (context->message);
-
- if (context->info != NULL)
- camel_message_info_unref (context->info);
-
- if (context->from != NULL)
- g_object_unref (context->from);
-
- if (context->recipients != NULL)
- g_object_unref (context->recipients);
-
- if (context->driver != NULL)
- g_object_unref (context->driver);
-
- if (context->transport != NULL)
- g_object_unref (context->transport);
+ g_clear_object (&context->folder);
+ g_clear_object (&context->message);
+ g_clear_object (&context->info);
+ g_clear_object (&context->from);
+ g_clear_object (&context->recipients);
+ g_clear_object (&context->driver);
+ g_clear_object (&context->transport);
if (context->cancellable != NULL) {
camel_operation_pop_message (context->cancellable);
@@ -194,7 +181,7 @@ e_mail_session_append_to_local_folder (EMailSession *session,
context->message = g_object_ref (message);
if (info != NULL)
- context->info = camel_message_info_ref (info);
+ context->info = g_object_ref (info);
simple = g_simple_async_result_new (
G_OBJECT (session), callback, user_data,
@@ -913,8 +900,7 @@ e_mail_session_send_to (EMailSession *session,
info = camel_message_info_new_from_header (
NULL, CAMEL_MIME_PART (message)->headers);
- ((CamelMessageInfoBase *) info)->size =
- get_message_size (message, cancellable);
+ camel_message_info_set_size (info, get_message_size (message, cancellable));
camel_message_info_set_flags (info, CAMEL_MESSAGE_SEEN |
(camel_mime_message_has_attachment (message) ? CAMEL_MESSAGE_ATTACHMENTS : 0), ~0);
diff --git a/libemail-engine/e-mail-session.c b/libemail-engine/e-mail-session.c
index e38c813..4f5aadc 100644
--- a/libemail-engine/e-mail-session.c
+++ b/libemail-engine/e-mail-session.c
@@ -1488,7 +1488,7 @@ mail_session_forward_to_sync (CamelSession *session,
g_mutex_unlock (&priv->preparing_flush_lock);
}
- camel_message_info_unref (info);
+ g_clear_object (&info);
g_object_unref (source);
diff --git a/libemail-engine/e-mail-utils.c b/libemail-engine/e-mail-utils.c
index 862ec00..64ae039 100644
--- a/libemail-engine/e-mail-utils.c
+++ b/libemail-engine/e-mail-utils.c
@@ -306,7 +306,7 @@ guess_mail_account_from_folder (ESourceRegistry *registry,
location = camel_vee_folder_get_location (CAMEL_VEE_FOLDER (folder),
(CamelVeeMessageInfo *) mi, NULL);
if (location)
store = camel_folder_get_parent_store (location);
- camel_message_info_unref (mi);
+ g_clear_object (&mi);
}
}
@@ -795,7 +795,7 @@ em_utils_get_real_folder_and_message_uid (CamelFolder *folder,
else
g_free (real_uid);
- camel_message_info_unref (mi);
+ g_clear_object (&mi);
if (out_real_folder)
*out_real_folder = g_object_ref (real_folder);
@@ -803,7 +803,7 @@ em_utils_get_real_folder_and_message_uid (CamelFolder *folder,
return;
}
- camel_message_info_unref (mi);
+ g_clear_object (&mi);
}
}
diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
index 96093b2..37882f6 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -861,31 +861,37 @@ folder_cache_check_ignore_thread (CamelFolder *folder,
GCancellable *cancellable,
GError **error)
{
- const CamelSummaryReferences *references;
+ GArray *references;
gboolean has_ignore_thread = FALSE, first_ignore_thread = FALSE, found_first_msgid = FALSE;
guint64 first_msgid;
GString *expr = NULL;
- gint ii;
+ guint ii;
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
g_return_val_if_fail (info != NULL, FALSE);
- references = camel_message_info_get_references (info);
- if (!references || references->size <= 0)
+ references = camel_message_info_dup_references (info);
+ if (!references || references->len <= 0) {
+ if (references)
+ g_array_unref (references);
return FALSE;
+ }
+
+ first_msgid = g_array_index (references, guint64, 0);
- first_msgid = references->references[0].id.id;
+ for (ii = 0; ii < references->len; ii++) {
+ CamelSummaryMessageID msgid;
- for (ii = 0; ii < references->size; ii++) {
- if (references->references[ii].id.id == 0)
+ msgid.id.id = g_array_index (references, guint64, ii);
+ if (!msgid.id.id)
continue;
if (!expr)
expr = g_string_new ("(match-all (or ");
g_string_append_printf (expr, "(= \"msgid\" \"%lu %lu\")",
- (gulong) references->references[ii].id.part.hi,
- (gulong) references->references[ii].id.part.lo);
+ (gulong) msgid.id.part.hi,
+ (gulong) msgid.id.part.lo);
}
if (expr) {
@@ -903,19 +909,18 @@ folder_cache_check_ignore_thread (CamelFolder *folder,
if (!refrinfo)
continue;
- if (first_msgid && camel_message_info_get_message_id (refrinfo) &&
- camel_message_info_get_message_id (refrinfo)->id.id == first_msgid) {
+ if (first_msgid && camel_message_info_get_message_id (refrinfo) ==
first_msgid) {
/* The first msgid in the references is In-ReplyTo, which is the
master;
the rest is just a guess. */
found_first_msgid = TRUE;
first_ignore_thread = camel_message_info_get_user_flag (refrinfo,
"ignore-thread");
- camel_message_info_unref (refrinfo);
+ g_clear_object (&refrinfo);
break;
}
has_ignore_thread = has_ignore_thread || camel_message_info_get_user_flag
(refrinfo, "ignore-thread");
- camel_message_info_unref (refrinfo);
+ g_clear_object (&refrinfo);
}
camel_folder_search_free (folder, uids);
@@ -924,6 +929,8 @@ folder_cache_check_ignore_thread (CamelFolder *folder,
g_string_free (expr, TRUE);
}
+ g_array_unref (references);
+
return (found_first_msgid && first_ignore_thread) || (!found_first_msgid && has_ignore_thread);
}
@@ -1021,7 +1028,7 @@ folder_cache_process_folder_changes_thread (CamelFolder *folder,
}
}
- camel_message_info_unref (info);
+ g_clear_object (&info);
if (local_error) {
g_propagate_error (error, local_error);
diff --git a/libemail-engine/mail-ops.c b/libemail-engine/mail-ops.c
index 5661415..0e9aa53 100644
--- a/libemail-engine/mail-ops.c
+++ b/libemail-engine/mail-ops.c
@@ -703,7 +703,7 @@ mail_send_message (struct _send_queue_msg *m,
/* Now check for posting, failures are ignored */
info = camel_message_info_new (NULL);
- ((CamelMessageInfoBase *) info)->size = get_message_size (message, cancellable);
+ camel_message_info_set_size (info, get_message_size (message, cancellable));
camel_message_info_set_flags (info, CAMEL_MESSAGE_SEEN |
(camel_mime_message_has_attachment (message) ? CAMEL_MESSAGE_ATTACHMENTS : 0), ~0);
@@ -904,11 +904,8 @@ exit:
g_object_unref (folder);
}
- if (info != NULL)
- camel_message_info_unref (info);
-
- if (service != NULL)
- g_object_unref (service);
+ g_clear_object (&info);
+ g_clear_object (&service);
g_object_unref (recipients);
g_object_unref (from);
@@ -980,7 +977,7 @@ send_queue_exec (struct _send_queue_msg *m,
if ((camel_message_info_get_flags (info) & CAMEL_MESSAGE_DELETED) == 0 &&
(!delay_send || camel_message_info_get_date_sent (info) <= delay_send))
send_uids->pdata[j++] = uids->pdata[i];
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
}
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index 2186a72..37a507c 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -295,8 +295,7 @@ mail_browser_message_selected_cb (EMailBrowser *browser,
if (g_settings_get_boolean (settings, "mark-seen"))
camel_message_info_set_flags (info, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
g_clear_object (&settings);
-
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
g_clear_object (&folder);
@@ -914,7 +913,7 @@ mail_browser_set_message (EMailReader *reader,
gtk_window_set_title (
GTK_WINDOW (reader),
camel_message_info_get_subject (info));
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
g_clear_object (&folder);
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index eed7d74..ce0b7db 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -2066,7 +2066,7 @@ e_mail_display_claim_attachment (EMailFormatter *formatter,
if (info) {
if (!camel_message_info_get_user_flag (info, E_MAIL_NOTES_USER_FLAG))
camel_message_info_set_user_flag (info,
E_MAIL_NOTES_USER_FLAG, TRUE);
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
}
}
diff --git a/mail/e-mail-folder-pane.c b/mail/e-mail-folder-pane.c
index 8a6c7bd..a958d49 100644
--- a/mail/e-mail-folder-pane.c
+++ b/mail/e-mail-folder-pane.c
@@ -141,7 +141,7 @@ mail_paned_view_open_selected_mail (EMailPanedView *view)
g_ptr_array_add (views, g_strdup (uid));
}
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
n_views = views->len;
diff --git a/mail/e-mail-notes.c b/mail/e-mail-notes.c
index 94a8396..6f80036 100644
--- a/mail/e-mail-notes.c
+++ b/mail/e-mail-notes.c
@@ -623,7 +623,9 @@ e_mail_notes_replace_message_in_folder_sync (CamelFolder *folder,
CamelMessageInfo *clone;
gchar *appended_uid = NULL;
- clone = camel_message_info_clone (mi);
+ clone = camel_message_info_clone (mi, NULL);
+ camel_message_info_set_abort_notifications (clone, TRUE);
+
camel_message_info_set_user_flag (clone, E_MAIL_NOTES_USER_FLAG, has_note);
success = camel_folder_append_message_sync (folder, message, clone,
@@ -632,8 +634,8 @@ e_mail_notes_replace_message_in_folder_sync (CamelFolder *folder,
if (success)
camel_message_info_set_flags (mi, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED);
- camel_message_info_unref (clone);
- camel_message_info_unref (mi);
+ g_clear_object (&clone);
+ g_clear_object (&mi);
g_free (appended_uid);
} else {
g_set_error_literal (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC, _("Cannot find message in its
folder summary"));
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index c850bba..22e1ea0 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -936,15 +936,15 @@ mark_ignore_thread_data_free (gpointer ptr)
static void
insert_to_checked_msgids (GHashTable *checked_msgids,
- const CamelSummaryMessageID *msgid)
+ const CamelSummaryMessageID msgid)
{
CamelSummaryMessageID *msgid_copy;
- if (!msgid)
+ if (!msgid.id.id)
return;
msgid_copy = g_new0 (CamelSummaryMessageID, 1);
- memcpy (msgid_copy, msgid, sizeof (CamelSummaryMessageID));
+ msgid_copy->id.id = msgid.id.id;
g_hash_table_insert (checked_msgids, msgid_copy, GINT_TO_POINTER (1));
}
@@ -961,7 +961,7 @@ mark_ignore_thread_traverse_uids (CamelFolder *folder,
{
GSList *to_check;
GPtrArray *uids;
- gint ii;
+ guint ii;
gboolean success;
success = !g_cancellable_set_error_if_cancelled (cancellable, error);
@@ -975,8 +975,7 @@ mark_ignore_thread_traverse_uids (CamelFolder *folder,
while (to_check != NULL && !g_cancellable_set_error_if_cancelled (cancellable, error)) {
CamelMessageInfo *mi;
- const CamelSummaryMessageID *msgid;
- const CamelSummaryReferences *references;
+ CamelSummaryMessageID msgid;
const gchar *uid = to_check->data;
gchar *sexp;
GError *local_error = NULL;
@@ -992,36 +991,40 @@ mark_ignore_thread_traverse_uids (CamelFolder *folder,
mi = camel_folder_get_message_info (folder, uid);
if (!mi || !camel_message_info_get_message_id (mi)) {
- if (mi)
- camel_message_info_unref (mi);
+ g_clear_object (&mi);
camel_pstring_free (uid);
continue;
}
camel_message_info_set_user_flag (mi, "ignore-thread", ignore_thread);
- msgid = camel_message_info_get_message_id (mi);
+ msgid.id.id = camel_message_info_get_message_id (mi);
insert_to_checked_msgids (checked_msgids, msgid);
if (whole_thread) {
+ GArray *references;
+
/* Search for parents */
- references = camel_message_info_get_references (mi);
+ references = camel_message_info_dup_references (mi);
if (references) {
GString *expr = NULL;
- for (ii = 0; ii < references->size; ii++) {
- if (references->references[ii].id.id == 0 ||
- g_hash_table_contains (checked_msgids,
&references->references[ii]))
+ for (ii = 0; ii < references->len; ii++) {
+ CamelSummaryMessageID ref_msgid;
+
+ ref_msgid.id.id = g_array_index (references, guint64, ii);
+ if (!ref_msgid.id.id ||
+ g_hash_table_contains (checked_msgids, &ref_msgid))
continue;
- insert_to_checked_msgids (checked_msgids,
&references->references[ii]);
+ insert_to_checked_msgids (checked_msgids, ref_msgid);
if (!expr)
expr = g_string_new ("(match-all (or ");
g_string_append_printf (expr, "(= \"msgid\" \"%lu %lu\")",
- (gulong) references->references[ii].id.part.hi,
- (gulong) references->references[ii].id.part.lo);
+ (gulong) ref_msgid.id.part.hi,
+ (gulong) ref_msgid.id.part.lo);
}
if (expr) {
@@ -1043,17 +1046,19 @@ mark_ignore_thread_traverse_uids (CamelFolder *folder,
if (local_error) {
g_propagate_error (error, local_error);
- camel_message_info_unref (mi);
+ g_clear_object (&mi);
camel_pstring_free (uid);
success = FALSE;
break;
}
}
+
+ g_array_unref (references);
}
}
/* Search for children */
- sexp = g_strdup_printf ("(match-all (= \"references\" \"%lu %lu\"))", (gulong)
msgid->id.part.hi, (gulong) msgid->id.part.lo);
+ sexp = g_strdup_printf ("(match-all (= \"references\" \"%lu %lu\"))", (gulong)
msgid.id.part.hi, (gulong) msgid.id.part.lo);
uids = camel_folder_search_by_expression (folder, sexp, cancellable, &local_error);
if (uids) {
for (ii = 0; ii < uids->len; ii++) {
@@ -1061,25 +1066,34 @@ mark_ignore_thread_traverse_uids (CamelFolder *folder,
if (refruid && !g_hash_table_contains (checked_uids, refruid)) {
CamelMessageInfo *refrmi = camel_folder_get_message_info (folder,
refruid);
+ guint64 msg_id = 0;
+
+ if (refrmi)
+ msg_id = camel_message_info_get_message_id (refrmi);
+
+ if (refrmi && msg_id && !g_hash_table_contains (checked_msgids,
&msg_id)) {
+ GArray *references;
- if (refrmi && camel_message_info_get_message_id (refrmi) &&
- !g_hash_table_contains (checked_msgids,
camel_message_info_get_message_id (refrmi))) {
/* The 'references' filter search can return false positives
*/
- references = camel_message_info_get_references (refrmi);
+ references = camel_message_info_dup_references (refrmi);
if (references) {
- gint jj;
+ guint jj;
+
+ for (jj = 0; jj < references->len; jj++) {
+ guint64 ref_msgid;
- for (jj = 0; jj < references->size; jj++) {
- if (references->references[jj].id.id ==
msgid->id.id) {
+ ref_msgid = g_array_index (references,
guint64, jj);
+ if (ref_msgid == msgid.id.id) {
to_check = g_slist_prepend (to_check,
(gpointer) camel_pstring_strdup (refruid));
break;
}
}
+
+ g_array_unref (references);
}
}
- if (refrmi)
- camel_message_info_unref (refrmi);
+ g_clear_object (&refrmi);
}
}
@@ -1087,7 +1101,7 @@ mark_ignore_thread_traverse_uids (CamelFolder *folder,
}
g_free (sexp);
- camel_message_info_unref (mi);
+ g_clear_object (&mi);
camel_pstring_free (uid);
if (local_error) {
@@ -1300,7 +1314,7 @@ e_mail_reader_open_selected (EMailReader *reader)
g_ptr_array_add (views, g_strdup (uid));
}
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
for (ii = 0; ii < views->len; ii++) {
@@ -2663,7 +2677,7 @@ e_mail_reader_save_messages (EMailReader *reader)
subject = camel_message_info_get_subject (info);
if (subject != NULL)
suggestion = g_strconcat (subject, ".mbox", NULL);
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
if (suggestion == NULL) {
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 8fe32f4..748de59 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -208,8 +208,7 @@ action_mail_add_sender_cb (GtkAction *action,
g_object_unref (cia);
exit:
- if (info != NULL)
- camel_message_info_unref (info);
+ g_clear_object (&info);
g_ptr_array_unref (uids);
g_clear_object (&folder);
@@ -3054,7 +3053,7 @@ mail_reader_manage_followup_flag (EMailReader *reader,
g_object_unref (alert);
}
- camel_message_info_unref (info);
+ g_clear_object (&info);
if (!alert_added)
mail_reader_remove_followup_alert (reader);
@@ -4644,7 +4643,7 @@ e_mail_reader_check_state (EMailReader *reader)
has_notignore_thread = has_notignore_thread ||
!camel_message_info_get_user_flag (info, "ignore-thread");
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
have_enabled_account =
diff --git a/mail/e-mail-tag-editor.c b/mail/e-mail-tag-editor.c
index 7414d7e..2901dc3 100644
--- a/mail/e-mail-tag-editor.c
+++ b/mail/e-mail-tag-editor.c
@@ -119,75 +119,6 @@ mail_tag_editor_realize (GtkWidget *widget)
gtk_container_set_border_width (GTK_CONTAINER (action_area), 12);
}
-static CamelTag *
-mail_tag_editor_get_tag_list (EMailTagEditor *editor)
-{
- CamelTag *tag_list = NULL;
- time_t date;
- gchar *text = NULL;
- GtkWidget *entry;
-
- entry = gtk_bin_get_child (GTK_BIN (editor->priv->combo_entry));
- if (entry)
- text = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
- camel_tag_set (&tag_list, "follow-up", text);
- g_free (text);
-
- date = e_date_edit_get_time (editor->priv->target_date);
- if (date != (time_t) -1) {
- text = camel_header_format_date (date, 0);
- camel_tag_set (&tag_list, "due-by", text);
- g_free (text);
- } else
- camel_tag_set (&tag_list, "due-by", "");
-
- if (e_mail_tag_editor_get_completed (editor)) {
- text = camel_header_format_date (
- editor->priv->completed_date, 0);
- camel_tag_set (&tag_list, "completed-on", text);
- g_free (text);
- } else
- camel_tag_set (&tag_list, "completed-on", "");
-
- return tag_list;
-}
-
-static void
-mail_tag_editor_set_tag_list (EMailTagEditor *editor,
- CamelTag *tag_list)
-{
- GtkWidget *child;
- const gchar *text;
- time_t date;
-
- /* Extract the GtkEntry from the GtkComboBoxEntry. */
- child = gtk_bin_get_child (GTK_BIN (editor->priv->combo_entry));
-
- /* XXX This is kind of cheating. Since we only store the
- * translated tag there's no sure-fire way to determine
- * the corresponding combo box index (e.g. the tag may
- * have been set while running in a different locale). */
- text = camel_tag_get (&tag_list, "follow-up");
- if (text != NULL)
- gtk_entry_set_text (GTK_ENTRY (child), text);
-
- text = camel_tag_get (&tag_list, "due-by");
- if (text != NULL && *text != '\0') {
- date = camel_header_decode_date (text, NULL);
- e_date_edit_set_time (editor->priv->target_date, date);
- } else
- e_date_edit_set_time (editor->priv->target_date, (time_t) -1);
-
- text = camel_tag_get (&tag_list, "completed-on");
- if (text != NULL && *text != '\0') {
- date = camel_header_decode_date (text, NULL);
- if (date != (time_t) 0) {
- e_mail_tag_editor_set_completed (editor, TRUE);
- editor->priv->completed_date = date;
- }
- }
-}
-
static void
e_mail_tag_editor_class_init (EMailTagEditorClass *class)
{
@@ -203,9 +134,6 @@ e_mail_tag_editor_class_init (EMailTagEditorClass *class)
widget_class = GTK_WIDGET_CLASS (class);
widget_class->realize = mail_tag_editor_realize;
- class->get_tag_list = mail_tag_editor_get_tag_list;
- class->set_tag_list = mail_tag_editor_set_tag_list;
-
g_object_class_install_property (
object_class,
PROP_COMPLETED,
@@ -333,32 +261,79 @@ e_mail_tag_editor_set_completed (EMailTagEditor *editor,
g_object_notify (G_OBJECT (editor), "completed");
}
-CamelTag *
+CamelNameValueArray *
e_mail_tag_editor_get_tag_list (EMailTagEditor *editor)
{
- EMailTagEditorClass *class;
+ CamelNameValueArray *tag_list;
+ time_t date;
+ gchar *text = NULL;
+ GtkWidget *entry;
g_return_val_if_fail (E_IS_MAIL_TAG_EDITOR (editor), NULL);
- class = E_MAIL_TAG_EDITOR_GET_CLASS (editor);
- g_return_val_if_fail (class->get_tag_list != NULL, NULL);
+ tag_list = camel_name_value_array_new ();
+
+ entry = gtk_bin_get_child (GTK_BIN (editor->priv->combo_entry));
+ if (entry)
+ text = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
+ camel_name_value_array_set_named (tag_list, TRUE, "follow-up", text);
+ g_free (text);
- return class->get_tag_list (editor);
+ date = e_date_edit_get_time (editor->priv->target_date);
+ if (date != (time_t) -1) {
+ text = camel_header_format_date (date, 0);
+ camel_name_value_array_set_named (tag_list, TRUE, "due-by", text);
+ g_free (text);
+ } else
+ camel_name_value_array_set_named (tag_list, TRUE, "due-by", "");
+
+ if (e_mail_tag_editor_get_completed (editor)) {
+ text = camel_header_format_date (editor->priv->completed_date, 0);
+ camel_name_value_array_set_named (tag_list, TRUE, "completed-on", text);
+ g_free (text);
+ } else
+ camel_name_value_array_set_named (tag_list, TRUE, "completed-on", "");
+
+ return tag_list;
}
void
e_mail_tag_editor_set_tag_list (EMailTagEditor *editor,
- CamelTag *tag_list)
+ const CamelNameValueArray *tag_list)
{
- EMailTagEditorClass *class;
+ GtkWidget *child;
+ const gchar *text;
+ time_t date;
g_return_if_fail (E_IS_MAIL_TAG_EDITOR (editor));
g_return_if_fail (tag_list != NULL);
- class = E_MAIL_TAG_EDITOR_GET_CLASS (editor);
- g_return_if_fail (class->set_tag_list != NULL);
+ /* Extract the GtkEntry from the GtkComboBoxEntry. */
+ child = gtk_bin_get_child (GTK_BIN (editor->priv->combo_entry));
+
+ /* XXX This is kind of cheating. Since we only store the
+ * translated tag there's no sure-fire way to determine
+ * the corresponding combo box index (e.g. the tag may
+ * have been set while running in a different locale). */
+ text = camel_name_value_array_get_named (tag_list, TRUE, "follow-up");
+ if (text != NULL)
+ gtk_entry_set_text (GTK_ENTRY (child), text);
+
+ text = camel_name_value_array_get_named (tag_list, TRUE, "due-by");
+ if (text != NULL && *text != '\0') {
+ date = camel_header_decode_date (text, NULL);
+ e_date_edit_set_time (editor->priv->target_date, date);
+ } else
+ e_date_edit_set_time (editor->priv->target_date, (time_t) -1);
- class->set_tag_list (editor, tag_list);
+ text = camel_name_value_array_get_named (tag_list, TRUE, "completed-on");
+ if (text != NULL && *text != '\0') {
+ date = camel_header_decode_date (text, NULL);
+ if (date != (time_t) 0) {
+ e_mail_tag_editor_set_completed (editor, TRUE);
+ editor->priv->completed_date = date;
+ }
+ }
}
void
diff --git a/mail/e-mail-tag-editor.h b/mail/e-mail-tag-editor.h
index b5c7af2..324c435 100644
--- a/mail/e-mail-tag-editor.h
+++ b/mail/e-mail-tag-editor.h
@@ -58,11 +58,6 @@ struct _EMailTagEditor {
struct _EMailTagEditorClass {
GtkDialogClass parent_class;
-
- /* virtual methods */
- CamelTag * (*get_tag_list) (EMailTagEditor *editor);
- void (*set_tag_list) (EMailTagEditor *editor,
- CamelTag *tags);
};
GType e_mail_tag_editor_get_type (void);
@@ -70,9 +65,10 @@ GtkWidget * e_mail_tag_editor_new (void);
gboolean e_mail_tag_editor_get_completed (EMailTagEditor *editor);
void e_mail_tag_editor_set_completed (EMailTagEditor *editor,
gboolean completed);
-CamelTag * e_mail_tag_editor_get_tag_list (EMailTagEditor *editor);
+CamelNameValueArray *
+ e_mail_tag_editor_get_tag_list (EMailTagEditor *editor);
void e_mail_tag_editor_set_tag_list (EMailTagEditor *editor,
- CamelTag *tag_list);
+ const CamelNameValueArray *tag_list);
void e_mail_tag_editor_add_message (EMailTagEditor *editor,
const gchar *from,
const gchar *subject);
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 5eb1cd9..3154438 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -1010,7 +1010,7 @@ composer_save_to_drafts_append_mail (AsyncContext *async_context,
composer_save_to_drafts_cleanup,
async_context);
- camel_message_info_unref (info);
+ g_clear_object (&info);
g_object_unref (drafts_folder);
}
@@ -1225,7 +1225,7 @@ em_utils_composer_save_to_outbox_cb (EMsgComposer *composer,
composer_save_to_outbox_completed,
async_context);
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
typedef struct _PrintAsyncContext {
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 721d44f..803cdd2 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -238,8 +238,8 @@ em_utils_flag_for_followup (EMailReader *reader,
EMailDisplay *display;
GtkWidget *editor;
GtkWindow *window;
- CamelTag *tags;
- gint i;
+ CamelNameValueArray *tags;
+ guint ii, tags_len;
g_return_if_fail (E_IS_MAIL_READER (reader));
g_return_if_fail (CAMEL_IS_FOLDER (folder));
@@ -250,10 +250,10 @@ em_utils_flag_for_followup (EMailReader *reader,
editor = e_mail_tag_editor_new ();
gtk_window_set_transient_for (GTK_WINDOW (editor), window);
- for (i = 0; i < uids->len; i++) {
+ for (ii = 0; ii < uids->len; ii++) {
CamelMessageInfo *info;
- info = camel_folder_get_message_info (folder, uids->pdata[i]);
+ info = camel_folder_get_message_info (folder, uids->pdata[ii]);
if (info == NULL)
continue;
@@ -263,7 +263,7 @@ em_utils_flag_for_followup (EMailReader *reader,
camel_message_info_get_from (info),
camel_message_info_get_subject (info));
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
/* special-case... */
@@ -274,12 +274,13 @@ em_utils_flag_for_followup (EMailReader *reader,
message_uid = g_ptr_array_index (uids, 0);
info = camel_folder_get_message_info (folder, message_uid);
if (info) {
- tags = (CamelTag *) camel_message_info_get_user_tags (info);
+ tags = camel_message_info_dup_user_tags (info);
if (tags)
- e_mail_tag_editor_set_tag_list (
- E_MAIL_TAG_EDITOR (editor), tags);
- camel_message_info_unref (info);
+ e_mail_tag_editor_set_tag_list (E_MAIL_TAG_EDITOR (editor), tags);
+
+ camel_name_value_array_free (tags);
+ g_clear_object (&info);
}
}
@@ -290,25 +291,35 @@ em_utils_flag_for_followup (EMailReader *reader,
if (tags == NULL)
goto exit;
+ tags_len = camel_name_value_array_get_length (tags);
+
camel_folder_freeze (folder);
- for (i = 0; i < uids->len; i++) {
+ for (ii = 0; ii < uids->len; ii++) {
CamelMessageInfo *info;
- CamelTag *iter;
+ guint jj;
- info = camel_folder_get_message_info (folder, uids->pdata[i]);
+ info = camel_folder_get_message_info (folder, uids->pdata[ii]);
if (info == NULL)
continue;
- for (iter = tags; iter != NULL; iter = iter->next)
- camel_message_info_set_user_tag (
- info, iter->name, iter->value);
+ camel_message_info_freeze_notifications (info);
+
+ for (jj = 0; jj < tags_len; jj++) {
+ const gchar *name = NULL, *value = NULL;
+
+ if (!camel_name_value_array_get (tags, jj, &name, &value))
+ continue;
+
+ camel_message_info_set_user_tag (info, name, value);
+ }
- camel_message_info_unref (info);
+ camel_message_info_thaw_notifications (info);
+ g_clear_object (&info);
}
camel_folder_thaw (folder);
- camel_tag_list_free (&tags);
+ camel_name_value_array_free (tags);
display = e_mail_reader_get_mail_display (reader);
e_mail_display_reload (display);
@@ -345,7 +356,7 @@ em_utils_flag_for_followup_clear (GtkWindow *parent,
camel_message_info_set_user_tag (mi, "follow-up", NULL);
camel_message_info_set_user_tag (mi, "due-by", NULL);
camel_message_info_set_user_tag (mi, "completed-on", NULL);
- camel_message_info_unref (mi);
+ g_clear_object (&mi);
}
}
@@ -385,7 +396,7 @@ em_utils_flag_for_followup_completed (GtkWindow *parent,
tag = camel_message_info_get_user_tag (mi, "follow-up");
if (tag && tag[0])
camel_message_info_set_user_tag (mi, "completed-on", now);
- camel_message_info_unref (mi);
+ g_clear_object (&mi);
}
}
@@ -710,7 +721,7 @@ em_utils_selection_set_uidlist (GtkSelectionData *selection_data,
g_free (folder_uri);
}
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
} else {
folder_uri = e_mail_folder_uri_from_folder (folder);
@@ -865,8 +876,7 @@ em_utils_build_export_basename (CamelFolder *folder,
basename = g_strdup_printf ("%s_%s%s", datetmp, subject, extension);
- if (info != NULL)
- camel_message_info_unref (info);
+ g_clear_object (&info);
return basename;
}
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index cb88c1d..6f1e835 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -133,7 +133,7 @@ import_mbox_add_message (CamelFolder *folder,
camel_folder_append_message_sync (
folder, msg, info, NULL,
cancellable, error);
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
static void
@@ -356,7 +356,7 @@ import_kmail_folder (struct _import_mbox_msg *m,
camel_folder_append_message_sync (
folder, msg, info, NULL,
cancellable, error);
- camel_message_info_unref (info);
+ g_clear_object (&info);
g_object_unref (msg);
g_object_unref (mp);
} else {
diff --git a/mail/message-list.c b/mail/message-list.c
index 227bc8f..3ce2f4b 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -519,8 +519,7 @@ regen_data_unref (RegenData *regen_data)
length = regen_data->summary->len;
for (ii = 0; ii < length; ii++)
- camel_message_info_unref (
- regen_data->summary->pdata[ii]);
+ g_clear_object (®en_data->summary->pdata[ii]);
g_ptr_array_free (regen_data->summary, TRUE);
}
@@ -1663,7 +1662,8 @@ add_all_labels_foreach (ETreeModel *etm,
CamelMessageInfo *msg_info;
const gchar *old_label;
gchar *new_label;
- const CamelFlag *flag;
+ const CamelNamedFlags *flags;
+ guint ii, len;
if (!etm)
msg_info = (CamelMessageInfo *) path;
@@ -1671,8 +1671,12 @@ add_all_labels_foreach (ETreeModel *etm,
msg_info = ((GNode *) path)->data;
g_return_val_if_fail (msg_info != NULL, FALSE);
- for (flag = camel_message_info_get_user_flags (msg_info); flag; flag = flag->next)
- add_label_if_known (ld, flag->name);
+ camel_message_info_property_lock (msg_info);
+ flags = camel_message_info_get_user_flags (msg_info);
+ len = camel_named_flags_get_length (flags);
+
+ for (ii = 0; ii < len; ii++)
+ add_label_if_known (ld, camel_named_flags_get (flags, ii));
old_label = camel_message_info_get_user_tag (msg_info, "label");
if (old_label != NULL) {
@@ -1683,6 +1687,8 @@ add_all_labels_foreach (ETreeModel *etm,
add_label_if_known (ld, new_label);
}
+ camel_message_info_property_unlock (msg_info);
+
return FALSE;
}
@@ -3169,6 +3175,7 @@ message_list_value_at (ETreeModel *tree_model,
{
MessageList *message_list;
CamelMessageInfo *msg_info;
+ gpointer result;
message_list = MESSAGE_LIST (tree_model);
@@ -3179,7 +3186,11 @@ message_list_value_at (ETreeModel *tree_model,
msg_info = ((GNode *) path)->data;
g_return_val_if_fail (msg_info != NULL, NULL);
- return ml_tree_value_at_ex (tree_model, path, col, msg_info, message_list);
+ camel_message_info_property_lock (msg_info);
+ result = ml_tree_value_at_ex (tree_model, path, col, msg_info, message_list);
+ camel_message_info_property_unlock (msg_info);
+
+ return result;
}
static gpointer
@@ -3785,8 +3796,7 @@ clear_info (gchar *key,
GNode *node,
MessageList *message_list)
{
- camel_message_info_unref (node->data);
- node->data = NULL;
+ g_clear_object (&node->data);
}
static void
@@ -4104,7 +4114,7 @@ ml_uid_nodemap_insert (MessageList *message_list,
flags = camel_message_info_get_flags (info);
date = camel_message_info_get_date_received (info);
- camel_message_info_ref (info);
+ g_object_ref (info);
g_hash_table_insert (message_list->uid_nodemap, (gpointer) uid, node);
/* Track the latest seen and unseen messages shown, used in
@@ -4152,7 +4162,7 @@ ml_uid_nodemap_remove (MessageList *message_list,
}
g_hash_table_remove (message_list->uid_nodemap, uid);
- camel_message_info_unref (info);
+ g_clear_object (&info);
g_object_unref (folder);
}
@@ -4550,8 +4560,8 @@ mail_folder_hide_by_flag (CamelFolder *folder,
else
camel_folder_change_info_change_uid (
newchanges, changes->uid_changed->pdata[i]);
- if (info)
- camel_message_info_unref (info);
+
+ g_clear_object (&info);
}
if (newchanges->uid_added->len > 0 || newchanges->uid_removed->len > 0) {
@@ -5486,20 +5496,25 @@ cmp_array_uids (gconstpointer a,
struct sort_column_data *scol = g_ptr_array_index (sort_data->sort_columns, i);
if (md1->values->len <= i) {
+ camel_message_info_property_lock (md1->mi);
v1 = ml_tree_value_at_ex (
NULL, NULL,
scol->col->spec->compare_col,
md1->mi, sort_data->message_list);
+ camel_message_info_property_unlock (md1->mi);
g_ptr_array_add (md1->values, v1);
} else {
v1 = g_ptr_array_index (md1->values, i);
}
if (md2->values->len <= i) {
+ camel_message_info_property_lock (md2->mi);
v2 = ml_tree_value_at_ex (
NULL, NULL,
scol->col->spec->compare_col,
md2->mi, sort_data->message_list);
+ camel_message_info_property_unlock (md2->mi);
+
g_ptr_array_add (md2->values, v2);
} else {
v2 = g_ptr_array_index (md2->values, i);
@@ -5540,7 +5555,7 @@ free_message_info_data (gpointer uid,
g_ptr_array_free (data->values, TRUE);
}
- camel_message_info_unref (data->mi);
+ g_clear_object (&data->mi);
g_free (data);
}
@@ -5716,7 +5731,7 @@ message_list_regen_tweak_search_results (MessageList *message_list,
search_results,
(gpointer) camel_pstring_strdup (uid));
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
static void
diff --git a/modules/mdn/evolution-mdn.c b/modules/mdn/evolution-mdn.c
index 96744d5..aec127d 100644
--- a/modules/mdn/evolution-mdn.c
+++ b/modules/mdn/evolution-mdn.c
@@ -78,9 +78,7 @@ G_DEFINE_DYNAMIC_TYPE (EMdn, e_mdn, E_TYPE_EXTENSION)
static void
mdn_context_free (MdnContext *context)
{
- if (context->info != NULL)
- camel_message_info_unref (context->info);
-
+ g_clear_object (&context->info);
g_object_unref (context->source);
g_object_unref (context->reader);
g_object_unref (context->folder);
@@ -415,7 +413,7 @@ mdn_notify_sender (ESource *identity_source,
NULL, (GAsyncReadyCallback) mdn_receipt_done,
g_object_ref (session));
- camel_message_info_unref (receipt_info);
+ g_clear_object (&receipt_info);
g_free (message_date);
g_free (message_id);
@@ -436,8 +434,7 @@ mdn_notify_action_cb (GtkAction *action,
MDN_SENDING_MODE_MANUAL);
/* Make sure the newly-added user flag gets saved. */
- camel_message_info_unref (context->info);
- context->info = NULL;
+ g_clear_object (&context->info);
}
static void
@@ -525,7 +522,7 @@ mdn_message_loaded_cb (EMailReader *reader,
context->reader = g_object_ref (reader);
context->folder = g_object_ref (folder);
context->message = g_object_ref (message);
- context->info = camel_message_info_ref (info);
+ context->info = g_object_ref (info);
context->notify_to = notify_to;
notify_to = NULL;
@@ -558,9 +555,7 @@ mdn_message_loaded_cb (EMailReader *reader,
g_object_unref (source);
exit:
- if (info != NULL)
- camel_message_info_unref (info);
-
+ g_clear_object (&info);
g_clear_object (&folder);
g_free (notify_to);
}
@@ -618,9 +613,7 @@ mdn_message_seen_cb (EMailReader *reader,
g_object_unref (source);
exit:
- if (info != NULL)
- camel_message_info_unref (info);
-
+ g_clear_object (&info);
g_clear_object (&folder);
g_free (notify_to);
}
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c
index c338930..69b06d4 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -685,7 +685,7 @@ dbx_import_file (DbxImporter *m)
success = camel_folder_append_message_sync (
folder, msg, info, NULL,
cancellable, &m->base.error);
- camel_message_info_unref (info);
+ g_clear_object (&info);
g_object_unref (msg);
if (!success) {
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index 5aacb4b..751ec0a 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -1401,7 +1401,7 @@ pst_process_email (PstImporter *m,
/* FIXME Not passing a GCancellable or GError here. */
success = camel_folder_append_message_sync (
m->folder, msg, info, NULL, NULL, NULL);
- camel_message_info_unref (info);
+ g_clear_object (&info);
g_object_unref (msg);
/* FIXME Not passing a GCancellable or GError here. */
diff --git a/plugins/templates/e-templates-store.c b/plugins/templates/e-templates-store.c
index dbae0ff..0dadae9 100644
--- a/plugins/templates/e-templates-store.c
+++ b/plugins/templates/e-templates-store.c
@@ -469,7 +469,7 @@ tmpl_folder_data_update_sync (TmplFolderData *tfd,
changed = tmpl_folder_data_remove_message (tfd, camel_message_info_get_uid
(info)) || changed;
}
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
}
@@ -479,7 +479,7 @@ tmpl_folder_data_update_sync (TmplFolderData *tfd,
info = camel_folder_summary_get (tfd->folder->summary, uid);
if (info) {
changed = tmpl_folder_data_change_message (tfd, info) || changed;
- camel_message_info_unref (info);
+ g_clear_object (&info);
}
}
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index 3f98a6e..6657201 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -1185,7 +1185,7 @@ save_template_async_data_free (gpointer ptr)
g_clear_object (&sta->composer);
g_clear_object (&sta->session);
g_clear_object (&sta->message);
- camel_message_info_unref (sta->info);
+ g_clear_object (&sta->info);
g_free (sta->templates_folder_uri);
g_free (sta);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]