aboutsummaryrefslogtreecommitdiffstats
path: root/composer
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 /composer
parentf862e946b83d5f70001c3d81290ecc8a0d8ca2a0 (diff)
downloadgsoc2013-evolution-bc90469e7f3bfd31dc6530c2d1ba1cc519a8a3a7.tar
gsoc2013-evolution-bc90469e7f3bfd31dc6530c2d1ba1cc519a8a3a7.tar.gz
gsoc2013-evolution-bc90469e7f3bfd31dc6530c2d1ba1cc519a8a3a7.tar.bz2
gsoc2013-evolution-bc90469e7f3bfd31dc6530c2d1ba1cc519a8a3a7.tar.lz
gsoc2013-evolution-bc90469e7f3bfd31dc6530c2d1ba1cc519a8a3a7.tar.xz
gsoc2013-evolution-bc90469e7f3bfd31dc6530c2d1ba1cc519a8a3a7.tar.zst
gsoc2013-evolution-bc90469e7f3bfd31dc6530c2d1ba1cc519a8a3a7.zip
Camel is now GObject-based.
Diffstat (limited to 'composer')
-rw-r--r--composer/e-composer-autosave.c4
-rw-r--r--composer/e-composer-header-table.c2
-rw-r--r--composer/e-composer-private.c6
-rw-r--r--composer/e-msg-composer.c118
4 files changed, 65 insertions, 65 deletions
diff --git a/composer/e-composer-autosave.c b/composer/e-composer-autosave.c
index ca7492faeb..a850cf9b77 100644
--- a/composer/e-composer-autosave.c
+++ b/composer/e-composer-autosave.c
@@ -388,8 +388,8 @@ autosave_snapshot_cb (GFile *file,
CAMEL_STREAM_MEM (camel_stream), buffer);
camel_data_wrapper_decode_to_stream (
CAMEL_DATA_WRAPPER (message), camel_stream);
- camel_object_unref (message);
- camel_object_unref (camel_stream);
+ g_object_unref (message);
+ g_object_unref (camel_stream);
/* Load the buffer into a GMemoryInputStream.
* But watch out for zero length MIME parts. */
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index 92e2c72515..26d9202c37 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -249,7 +249,7 @@ composer_header_table_update_destinations (EDestination **old_destinations,
}
}
- camel_object_unref (inet_address);
+ g_object_unref (inet_address);
skip_auto:
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 0ff1da73ed..a3d43dcf88 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -116,7 +116,7 @@ msg_composer_url_requested_cb (GtkHTML *html,
gtk_html_end (html, stream, GTK_HTML_STREAM_OK);
- camel_object_unref (camel_stream);
+ g_object_unref (camel_stream);
/* gtk_html_end() destroys the GtkHTMLStream, so we need to
* stop the signal emission so nothing else tries to use it. */
@@ -176,7 +176,7 @@ e_composer_private_constructed (EMsgComposer *composer)
priv->inline_images_by_url = g_hash_table_new_full (
g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
- (GDestroyNotify) camel_object_unref);
+ (GDestroyNotify) g_object_unref);
priv->charset = e_composer_get_default_charset ();
@@ -440,7 +440,7 @@ e_composer_private_dispose (EMsgComposer *composer)
g_hash_table_remove_all (composer->priv->inline_images_by_url);
if (composer->priv->redirect != NULL) {
- camel_object_unref (composer->priv->redirect);
+ g_object_unref (composer->priv->redirect);
composer->priv->redirect = NULL;
}
}
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 1705d85c3a..9d26e50fbb 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -149,7 +149,7 @@ emcu_part_to_html (CamelMimePart *part, gssize *len, EMFormat *source)
g_object_unref(emfq);
camel_stream_write((CamelStream *) mem, "", 1);
- camel_object_unref(mem);
+ g_object_unref (mem);
text = (gchar *)buf->data;
if (len)
@@ -461,9 +461,9 @@ set_recipients_from_destv (CamelMimeMessage *msg,
camel_mime_message_set_recipients (msg, header, bcc_addr);
}
- camel_object_unref (to_addr);
- camel_object_unref (cc_addr);
- camel_object_unref (bcc_addr);
+ g_object_unref (to_addr);
+ g_object_unref (cc_addr);
+ g_object_unref (bcc_addr);
}
static void
@@ -506,7 +506,7 @@ build_message_headers (EMsgComposer *composer,
} else
camel_mime_message_set_from (msg, addr);
- camel_object_unref (addr);
+ g_object_unref (addr);
}
/* Reply-To: */
@@ -519,7 +519,7 @@ build_message_headers (EMsgComposer *composer,
if (camel_address_unformat (CAMEL_ADDRESS (addr), reply_to) > 0)
camel_mime_message_set_reply_to (msg, addr);
- camel_object_unref (addr);
+ g_object_unref (addr);
}
/* To:, Cc:, Bcc: */
@@ -603,7 +603,7 @@ build_message (EMsgComposer *composer,
/* evil kludgy hack for Redirect */
if (p->redirect) {
build_message_headers (composer, p->redirect, TRUE);
- camel_object_ref (p->redirect);
+ g_object_ref (p->redirect);
return p->redirect;
}
@@ -675,13 +675,13 @@ build_message (EMsgComposer *composer,
CamelMimeFilter *filter;
filter_stream = camel_stream_filter_new (stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
stream = filter_stream;
filter = camel_mime_filter_charset_new ("UTF-8", iconv_charset);
camel_stream_filter_add (
CAMEL_STREAM_FILTER (filter_stream), filter);
- camel_object_unref (filter);
+ g_object_unref (filter);
}
if (plain_encoding == CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE) {
@@ -692,7 +692,7 @@ build_message (EMsgComposer *composer,
if (!CAMEL_IS_STREAM_FILTER (stream)) {
filter_stream = camel_stream_filter_new (stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
stream = filter_stream;
}
@@ -700,17 +700,17 @@ build_message (EMsgComposer *composer,
qp = camel_mime_filter_basic_new (
CAMEL_MIME_FILTER_BASIC_QP_ENC);
camel_stream_filter_add (CAMEL_STREAM_FILTER (stream), qp);
- camel_object_unref (qp);
+ g_object_unref (qp);
mf = camel_mime_filter_canon_new (CAMEL_MIME_FILTER_CANON_FROM);
camel_stream_filter_add (CAMEL_STREAM_FILTER (stream), mf);
- camel_object_unref (mf);
+ g_object_unref (mf);
}
/* construct the content object */
plain = camel_data_wrapper_new ();
camel_data_wrapper_construct_from_stream (plain, stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
if (plain_encoding == CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE) {
/* to not re-encode the data when pushing it to a part */
@@ -751,7 +751,7 @@ build_message (EMsgComposer *composer,
if (!CAMEL_IS_STREAM_FILTER (stream)) {
filter_stream = camel_stream_filter_new (stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
stream = filter_stream;
}
@@ -759,15 +759,15 @@ build_message (EMsgComposer *composer,
qp = camel_mime_filter_basic_new (
CAMEL_MIME_FILTER_BASIC_QP_ENC);
camel_stream_filter_add (CAMEL_STREAM_FILTER (stream), qp);
- camel_object_unref (qp);
+ g_object_unref (qp);
mf = camel_mime_filter_canon_new (CAMEL_MIME_FILTER_CANON_FROM);
camel_stream_filter_add (CAMEL_STREAM_FILTER (stream), mf);
- camel_object_unref (mf);
+ g_object_unref (mf);
}
camel_data_wrapper_construct_from_stream (html, stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
camel_data_wrapper_set_mime_type (html, "text/html; charset=utf-8");
if (pre_encode) {
@@ -783,17 +783,17 @@ build_message (EMsgComposer *composer,
part = camel_mime_part_new ();
camel_medium_set_content (CAMEL_MEDIUM (part), plain);
- camel_object_unref (plain);
+ g_object_unref (plain);
camel_mime_part_set_encoding (part, plain_encoding);
camel_multipart_add_part (body, part);
- camel_object_unref (part);
+ g_object_unref (part);
part = camel_mime_part_new ();
camel_medium_set_content (CAMEL_MEDIUM (part), html);
- camel_object_unref (html);
+ g_object_unref (html);
camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE);
camel_multipart_add_part (body, part);
- camel_object_unref (part);
+ g_object_unref (part);
/* If there are inlined images, construct a
* multipart/related containing the
@@ -810,9 +810,9 @@ build_message (EMsgComposer *composer,
part = camel_mime_part_new ();
camel_medium_set_content (CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER (body));
- camel_object_unref (body);
+ g_object_unref (body);
camel_multipart_add_part (html_with_images, part);
- camel_object_unref (part);
+ g_object_unref (part);
add_inlined_images (composer, html_with_images);
clear_current_images (composer);
@@ -838,9 +838,9 @@ build_message (EMsgComposer *composer,
camel_medium_set_content (CAMEL_MEDIUM (part), current);
if (current == plain)
camel_mime_part_set_encoding (part, plain_encoding);
- camel_object_unref (current);
+ g_object_unref (current);
camel_multipart_add_part (multipart, part);
- camel_object_unref (part);
+ g_object_unref (part);
e_attachment_store_add_to_multipart (
store, multipart, p->charset);
@@ -901,7 +901,7 @@ build_message (EMsgComposer *composer,
camel_medium_set_content (CAMEL_MEDIUM (part), current);
if (current == plain)
camel_mime_part_set_encoding (part, plain_encoding);
- camel_object_unref (current);
+ g_object_unref (current);
account = e_composer_header_table_get_account (table);
@@ -923,14 +923,14 @@ build_message (EMsgComposer *composer,
camel_cipher_sign (
cipher, pgp_userid, CAMEL_CIPHER_HASH_SHA1,
part, npart, &ex);
- camel_object_unref (cipher);
+ g_object_unref (cipher);
if (camel_exception_is_set (&ex)) {
- camel_object_unref (npart);
+ g_object_unref (npart);
goto exception;
}
- camel_object_unref (part);
+ g_object_unref (part);
part = npart;
}
@@ -949,26 +949,26 @@ build_message (EMsgComposer *composer,
camel_cipher_encrypt (
cipher, pgp_userid, recipients,
part, npart, &ex);
- camel_object_unref (cipher);
+ g_object_unref (cipher);
if (account && account->pgp_encrypt_to_self && pgp_userid)
g_ptr_array_set_size (recipients, recipients->len - 1);
if (camel_exception_is_set (&ex)) {
- camel_object_unref (npart);
+ g_object_unref (npart);
goto exception;
}
- camel_object_unref (part);
+ g_object_unref (part);
part = npart;
}
if (from)
- camel_object_unref (from);
+ g_object_unref (from);
current = camel_medium_get_content (CAMEL_MEDIUM (part));
- camel_object_ref (current);
- camel_object_unref (part);
+ g_object_ref (current);
+ g_object_unref (part);
}
#if defined (HAVE_NSS)
@@ -980,7 +980,7 @@ build_message (EMsgComposer *composer,
camel_medium_set_content ((CamelMedium *)part, current);
if (current == plain)
camel_mime_part_set_encoding (part, plain_encoding);
- camel_object_unref (current);
+ g_object_unref (current);
if (smime_sign
&& (account == NULL || account->smime_sign_key == NULL || account->smime_sign_key[0] == 0)) {
@@ -1010,14 +1010,14 @@ build_message (EMsgComposer *composer,
}
camel_cipher_sign (cipher, account->smime_sign_key, CAMEL_CIPHER_HASH_SHA1, part, npart, &ex);
- camel_object_unref (cipher);
+ g_object_unref (cipher);
if (camel_exception_is_set (&ex)) {
- camel_object_unref (npart);
+ g_object_unref (npart);
goto exception;
}
- camel_object_unref (part);
+ g_object_unref (part);
part = npart;
}
@@ -1031,7 +1031,7 @@ build_message (EMsgComposer *composer,
camel_smime_context_set_encrypt_key ((CamelSMIMEContext *)cipher, TRUE, account->smime_encrypt_key);
camel_cipher_encrypt (cipher, NULL, recipients, part, (CamelMimePart *)new, &ex);
- camel_object_unref (cipher);
+ g_object_unref (cipher);
if (camel_exception_is_set (&ex))
goto exception;
@@ -1041,16 +1041,16 @@ build_message (EMsgComposer *composer,
}
if (from)
- camel_object_unref (from);
+ g_object_unref (from);
/* we replaced the message directly, we don't want to do reparenting foo */
if (smime_encrypt) {
- camel_object_unref (part);
+ g_object_unref (part);
goto skip_content;
} else {
current = camel_medium_get_content ((CamelMedium *)part);
- camel_object_ref (current);
- camel_object_unref (part);
+ g_object_ref (current);
+ g_object_unref (part);
}
}
#endif /* HAVE_NSS */
@@ -1058,7 +1058,7 @@ build_message (EMsgComposer *composer,
camel_medium_set_content (CAMEL_MEDIUM (new), current);
if (current == plain)
camel_mime_part_set_encoding (CAMEL_MIME_PART (new), plain_encoding);
- camel_object_unref (current);
+ g_object_unref (current);
#if defined (HAVE_NSS)
skip_content:
@@ -1079,9 +1079,9 @@ skip_content:
exception:
if (part != CAMEL_MIME_PART (new))
- camel_object_unref (part);
+ g_object_unref (part);
- camel_object_unref (new);
+ g_object_unref (new);
if (ex.id != CAMEL_EXCEPTION_USER_CANCEL) {
e_alert_run_dialog_for_args ((GtkWindow *)composer, "mail-composer:no-build-message",
@@ -1408,7 +1408,7 @@ autosave_load_draft (const gchar *filename)
msg = camel_mime_message_new ();
camel_data_wrapper_construct_from_stream (
CAMEL_DATA_WRAPPER (msg), stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
composer = e_msg_composer_new_with_message (msg);
if (composer) {
@@ -2444,7 +2444,7 @@ handle_multipart_encrypted (EMsgComposer *composer,
cipher = camel_gpg_context_new (session);
mime_part = camel_mime_part_new ();
valid = camel_cipher_decrypt (cipher, multipart, mime_part, &ex);
- camel_object_unref (cipher);
+ g_object_unref (cipher);
camel_exception_clear (&ex);
if (valid == NULL)
return;
@@ -2485,7 +2485,7 @@ handle_multipart_encrypted (EMsgComposer *composer,
e_msg_composer_attach (composer, mime_part);
}
- camel_object_unref (mime_part);
+ g_object_unref (mime_part);
}
static void
@@ -2727,7 +2727,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
g_hash_table_insert (auto_cc, g_strdup (addr), GINT_TO_POINTER (TRUE));
}
}
- camel_object_unref (iaddr);
+ g_object_unref (iaddr);
}
if (account->always_bcc) {
@@ -2742,7 +2742,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
g_hash_table_insert (auto_bcc, g_strdup (addr), GINT_TO_POINTER (TRUE));
}
}
- camel_object_unref (iaddr);
+ g_object_unref (iaddr);
}
}
@@ -2984,7 +2984,7 @@ e_msg_composer_new_redirect (CamelMimeMessage *message,
subject = camel_mime_message_get_subject (message);
composer->priv->redirect = message;
- camel_object_ref (message);
+ g_object_ref (message);
e_composer_header_table_set_account_name (table, resent_from);
e_composer_header_table_set_subject (table, subject);
@@ -3477,7 +3477,7 @@ e_msg_composer_add_inline_image_from_file (EMsgComposer *composer,
wrapper = camel_data_wrapper_new ();
camel_data_wrapper_construct_from_stream (wrapper, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ g_object_unref (CAMEL_OBJECT (stream));
mime_type = e_util_guess_mime_type (dec_file_name, TRUE);
if (mime_type == NULL)
@@ -3487,7 +3487,7 @@ e_msg_composer_add_inline_image_from_file (EMsgComposer *composer,
part = camel_mime_part_new ();
camel_medium_set_content (CAMEL_MEDIUM (part), wrapper);
- camel_object_unref (wrapper);
+ g_object_unref (wrapper);
cid = camel_header_msgid_generate ();
camel_mime_part_set_content_id (part, cid);
@@ -3532,7 +3532,7 @@ e_msg_composer_add_inline_image_from_mime_part (EMsgComposer *composer,
url = g_strdup_printf ("cid:%s", cid);
g_hash_table_insert (p->inline_images, url, part);
- camel_object_ref (part);
+ g_object_ref (part);
location = camel_mime_part_get_content_location (part);
if (location != NULL)
@@ -3633,7 +3633,7 @@ e_msg_composer_get_message_print (EMsgComposer *composer,
return NULL;
temp_composer = e_msg_composer_new_with_message (msg);
- camel_object_unref (msg);
+ g_object_unref (msg);
/* Override composer flags. */
flags = msg_composer_get_message_print_helper (
@@ -3832,7 +3832,7 @@ e_msg_composer_get_reply_to (EMsgComposer *composer)
address = camel_internet_address_new ();
if (camel_address_unformat (CAMEL_ADDRESS (address), reply_to) == -1) {
- camel_object_unref (CAMEL_OBJECT (address));
+ g_object_unref (CAMEL_OBJECT (address));
return NULL;
}
@@ -3902,7 +3902,7 @@ e_msg_composer_load_from_file (const gchar *filename)
msg = camel_mime_message_new ();
camel_data_wrapper_construct_from_stream (
CAMEL_DATA_WRAPPER (msg), stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
composer = e_msg_composer_new_with_message (msg);
if (composer != NULL)