aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-composer-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-04-23 22:28:53 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-04-24 23:05:27 +0800
commitbc90469e7f3bfd31dc6530c2d1ba1cc519a8a3a7 (patch)
treef5d0cc91fc1568431e0b457406a9b3ea21157e0e /mail/em-composer-utils.c
parentf862e946b83d5f70001c3d81290ecc8a0d8ca2a0 (diff)
downloadgsoc2013-evolution-bc90469e7f3bfd31dc6530c2d1ba1cc519a8a3a7.tar.gz
gsoc2013-evolution-bc90469e7f3bfd31dc6530c2d1ba1cc519a8a3a7.tar.zst
gsoc2013-evolution-bc90469e7f3bfd31dc6530c2d1ba1cc519a8a3a7.zip
Camel is now GObject-based.
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r--mail/em-composer-utils.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 7e8d2b1dad..59e4a4545e 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -105,10 +105,10 @@ emcs_set_drafts_info (struct emcs_t *emcs,
g_return_if_fail (drafts_uid != NULL);
if (emcs->drafts_folder != NULL)
- camel_object_unref (emcs->drafts_folder);
+ g_object_unref (emcs->drafts_folder);
g_free (emcs->drafts_uid);
- camel_object_ref (drafts_folder);
+ g_object_ref (drafts_folder);
emcs->drafts_folder = drafts_folder;
emcs->drafts_uid = g_strdup (drafts_uid);
}
@@ -125,10 +125,10 @@ emcs_set_folder_info (struct emcs_t *emcs,
g_return_if_fail (uid != NULL);
if (emcs->folder != NULL)
- camel_object_unref (emcs->folder);
+ g_object_unref (emcs->folder);
g_free (emcs->uid);
- camel_object_ref (folder);
+ g_object_ref (folder);
emcs->folder = folder;
emcs->uid = g_strdup (uid);
emcs->flags = flags;
@@ -139,11 +139,11 @@ static void
free_emcs (struct emcs_t *emcs)
{
if (emcs->drafts_folder != NULL)
- camel_object_unref (emcs->drafts_folder);
+ g_object_unref (emcs->drafts_folder);
g_free (emcs->drafts_uid);
if (emcs->folder != NULL)
- camel_object_unref (emcs->folder);
+ g_object_unref (emcs->folder);
g_free (emcs->uid);
g_free (emcs);
@@ -233,7 +233,7 @@ composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessag
camel_folder_set_message_flags (emcs->drafts_folder, emcs->drafts_uid,
CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN,
CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN);
- camel_object_unref (emcs->drafts_folder);
+ g_object_unref (emcs->drafts_folder);
emcs->drafts_folder = NULL;
g_free (emcs->drafts_uid);
emcs->drafts_uid = NULL;
@@ -243,7 +243,7 @@ composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessag
/* set any replied flags etc */
camel_folder_set_message_flags (emcs->folder, emcs->uid, emcs->flags, emcs->set);
camel_folder_set_message_user_flag (emcs->folder, emcs->uid, "receipt-handled", TRUE);
- camel_object_unref (emcs->folder);
+ g_object_unref (emcs->folder);
emcs->folder = NULL;
g_free (emcs->uid);
emcs->uid = NULL;
@@ -386,7 +386,7 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
e_destination_freev (recipients_bcc);
}
- camel_object_unref (cia);
+ g_object_unref (cia);
post_to_header = e_composer_header_table_get_header (table, E_COMPOSER_HEADER_POST_TO);
if (e_composer_header_get_visible (post_to_header)) {
@@ -521,7 +521,7 @@ em_utils_composer_send_cb (EMsgComposer *composer)
return;
folder = e_mail_local_get_folder (E_MAIL_FOLDER_OUTBOX);
- camel_object_ref (folder);
+ g_object_ref (folder);
/* mail the message */
e_msg_composer_set_mail_sent (composer, TRUE);
@@ -541,8 +541,8 @@ em_utils_composer_send_cb (EMsgComposer *composer)
mail_append_mail (
folder, message, info, composer_send_queued_cb, send);
- camel_object_unref (folder);
- camel_object_unref (message);
+ g_object_unref (folder);
+ g_object_unref (message);
}
struct _save_draft_info {
@@ -587,7 +587,7 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i
camel_folder_set_message_flags (emcs->drafts_folder, emcs->drafts_uid,
CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN,
CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN);
- camel_object_unref (emcs->drafts_folder);
+ g_object_unref (emcs->drafts_folder);
emcs->drafts_folder = NULL;
g_free (emcs->drafts_uid);
emcs->drafts_uid = NULL;
@@ -596,14 +596,14 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i
if (emcs->folder) {
/* set the replied flags etc */
camel_folder_set_message_flags (emcs->folder, emcs->uid, emcs->flags, emcs->set);
- camel_object_unref (emcs->folder);
+ g_object_unref (emcs->folder);
emcs->folder = NULL;
g_free (emcs->uid);
emcs->uid = NULL;
}
if (appended_uid) {
- camel_object_ref (folder);
+ g_object_ref (folder);
emcs->drafts_folder = folder;
emcs->drafts_uid = g_strdup (appended_uid);
}
@@ -626,7 +626,7 @@ save_draft_folder (gchar *uri, CamelFolder *folder, gpointer data)
if (folder) {
*save = folder;
- camel_object_ref (folder);
+ g_object_ref (folder);
}
}
@@ -672,7 +672,7 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer)
if (!folder || !account->enabled) {
if (e_alert_run_dialog_for_args ((GtkWindow *)composer, "mail:ask-default-drafts", NULL) != GTK_RESPONSE_YES) {
g_object_unref(composer);
- camel_object_unref(msg);
+ g_object_unref (msg);
if (sdi->emcs)
emcs_unref(sdi->emcs);
g_free(sdi);
@@ -680,19 +680,19 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer)
}
folder = local_drafts_folder;
- camel_object_ref (local_drafts_folder);
+ g_object_ref (local_drafts_folder);
}
} else {
folder = local_drafts_folder;
- camel_object_ref (folder);
+ g_object_ref (folder);
}
info = camel_message_info_new(NULL);
camel_message_info_set_flags(info, CAMEL_MESSAGE_DRAFT | CAMEL_MESSAGE_SEEN, ~0);
mail_append_mail (folder, msg, info, save_draft_done, sdi);
- camel_object_unref (folder);
- camel_object_unref (msg);
+ g_object_unref (folder);
+ g_object_unref (msg);
}
static void
@@ -941,13 +941,13 @@ traverse_parts (GSList *clues, CamelMimeMessage *message, CamelDataWrapper *cont
camel_data_wrapper_decode_to_stream (content, stream);
str = g_strndup ((gchar *) byte_array->data, byte_array->len);
- camel_object_unref (stream);
+ g_object_unref (stream);
if (replace_variables (clues, message, &str)) {
stream = camel_stream_mem_new_with_buffer (str, strlen (str));
camel_stream_reset (stream);
camel_data_wrapper_construct_from_stream (content, stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
}
g_free (str);
@@ -1107,7 +1107,7 @@ composer_destroy_fad_cb (gpointer user_data, GObject *deadbeef)
struct forward_attached_data *fad = (struct forward_attached_data*) user_data;
if (fad) {
- camel_object_unref (fad->folder);
+ g_object_unref (fad->folder);
em_utils_uids_free (fad->uids);
g_free (fad);
}
@@ -1121,7 +1121,7 @@ setup_forward_attached_callbacks (EMsgComposer *composer, CamelFolder *folder, G
if (!composer || !folder || !uids || !uids->len)
return;
- camel_object_ref (folder);
+ g_object_ref (folder);
fad = g_new0 (struct forward_attached_data, 1);
fad->folder = folder;
@@ -1329,7 +1329,7 @@ em_utils_forward_message (CamelMimeMessage *message, const gchar *fromuri)
subject = mail_tool_generate_forward_subject (message);
composer = forward_attached (NULL, NULL, messages, part, subject, fromuri);
- camel_object_unref (part);
+ g_object_unref (part);
g_free (subject);
break;
case MAIL_CONFIG_FORWARD_INLINE:
@@ -1570,14 +1570,14 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
_("Your message to %s about \"%s\" on %s has been read."),
self_address, message_subject, message_date);
camel_data_wrapper_construct_from_stream (receipt_text, stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
part = camel_mime_part_new ();
camel_medium_set_content (CAMEL_MEDIUM (part), receipt_text);
camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE);
- camel_object_unref (receipt_text);
+ g_object_unref (receipt_text);
camel_multipart_add_part (body, part);
- camel_object_unref (part);
+ g_object_unref (part);
/* Create the machine-readable receipt */
receipt_data = camel_data_wrapper_new ();
@@ -1598,7 +1598,7 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
"Disposition: manual-action/MDN-sent-manually; displayed\n",
ua, recipient, message_id);
camel_data_wrapper_construct_from_stream (receipt_data, stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
g_free (ua);
g_free (recipient);
@@ -1606,13 +1606,13 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
camel_medium_set_content (CAMEL_MEDIUM (part), receipt_data);
camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_7BIT);
- camel_object_unref (receipt_data);
+ g_object_unref (receipt_data);
camel_multipart_add_part (body, part);
- camel_object_unref (part);
+ g_object_unref (part);
/* Finish creating the message */
camel_medium_set_content (CAMEL_MEDIUM (receipt), CAMEL_DATA_WRAPPER (body));
- camel_object_unref (body);
+ g_object_unref (body);
/* Translators: %s is the subject of the email message */
receipt_subject = g_strdup_printf (_("Delivery Notification for: \"%s\""), message_subject);
@@ -1622,12 +1622,12 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
addr = camel_internet_address_new ();
camel_address_decode (CAMEL_ADDRESS (addr), self_address);
camel_mime_message_set_from (receipt, addr);
- camel_object_unref (addr);
+ g_object_unref (addr);
addr = camel_internet_address_new ();
camel_address_decode (CAMEL_ADDRESS (addr), receipt_address);
camel_mime_message_set_recipients (receipt, CAMEL_RECIPIENT_TYPE_TO, addr);
- camel_object_unref (addr);
+ g_object_unref (addr);
camel_medium_set_header (CAMEL_MEDIUM (receipt), "Return-Path", "<>");
camel_medium_set_header (CAMEL_MEDIUM (receipt), "X-Evolution-Account", account->uid);
@@ -2127,7 +2127,7 @@ composer_set_body (EMsgComposer *composer, CamelMimeMessage *message, EMFormat *
/* attach the original message as an attachment */
part = mail_tool_make_message_attachment (message);
e_msg_composer_attach (composer, part);
- camel_object_unref (part);
+ g_object_unref (part);
break;
case MAIL_CONFIG_REPLY_OUTLOOK:
text = em_utils_message_to_html (message, _("-----Original Message-----"), EM_FORMAT_QUOTE_HEADERS, &len, source, start_bottom ? "<BR>" : NULL, &validity_found);
@@ -2269,9 +2269,9 @@ em_utils_reply_to_message(CamelFolder *folder, const gchar *uid, CamelMimeMessag
e_msg_composer_add_message_attachments (composer, message, TRUE);
if (postto)
- camel_object_unref(postto);
- camel_object_unref(to);
- camel_object_unref(cc);
+ g_object_unref (postto);
+ g_object_unref (to);
+ g_object_unref (cc);
composer_set_body (composer, message, source);