aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-06-06 05:14:32 +0800
committerDan Winship <danw@src.gnome.org>2000-06-06 05:14:32 +0800
commit5ec9e5b2287aef03893e0ce310013c99fe1dce4d (patch)
treedc296b5a1c41c4424aa0585f76b0b9d7672d227e /composer/e-msg-composer.c
parent4a85bdfa85217a08bf415e2dcb3a688bf0254d71 (diff)
downloadgsoc2013-evolution-5ec9e5b2287aef03893e0ce310013c99fe1dce4d.tar
gsoc2013-evolution-5ec9e5b2287aef03893e0ce310013c99fe1dce4d.tar.gz
gsoc2013-evolution-5ec9e5b2287aef03893e0ce310013c99fe1dce4d.tar.bz2
gsoc2013-evolution-5ec9e5b2287aef03893e0ce310013c99fe1dce4d.tar.lz
gsoc2013-evolution-5ec9e5b2287aef03893e0ce310013c99fe1dce4d.tar.xz
gsoc2013-evolution-5ec9e5b2287aef03893e0ce310013c99fe1dce4d.tar.zst
gsoc2013-evolution-5ec9e5b2287aef03893e0ce310013c99fe1dce4d.zip
New convenience function.
* e-msg-composer.c (e_msg_composer_attach): New convenience function. * e-msg-composer-attachment.c: Store a CamelMimePart rather than filename/description/mime_type info. Also record whether we were told or guessed the MIME type. (e_msg_composer_attachment_new_from_mime_part): New constructor. (e_msg_composer_attachment_edit): Remove the "browse" button. (If the user wants to change the actual file that the attachment is based on, he should delete the attachment and create a new one...) Remove the "Apply" button, because it's not all that useful. Make the MIME type only track the filename if it was guessed rather than being provided. * e-msg-composer-attachment.glade: Remove "browse" and "apply" buttons. Make filename editable. * e-msg-composer-attachment-bar.c (sort): Removed. Send the attachments in the order the user attached them in. (text_changed): Removed, since we weren't enabling the relevant GnomeIconList functionality that would have used this. (update): Don't print the size if it's 0. (attach_to_multipart, etc): adjust for EMsgComposerAttachment changes. (attach_to_multipart): Use 7bit encoding for message/ subparts. (e_msg_composer_attachment_bar_attach_mime_part): New convenience function. svn path=/trunk/; revision=3430
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r--composer/e-msg-composer.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 6e77d4ec51..7be0994fa0 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1061,6 +1061,26 @@ e_msg_composer_add_header (EMsgComposer *composer, const char *name,
/**
+ * e_msg_composer_attach:
+ * @composer: a composer object
+ * @attachment: the CamelMimePart to attach
+ *
+ * Attaches @attachment to the message being composed in the composer.
+ **/
+void
+e_msg_composer_attach (EMsgComposer *composer, CamelMimePart *attachment)
+{
+ EMsgComposerAttachmentBar *bar;
+
+ g_return_if_fail (E_IS_MSG_COMPOSER (composer));
+ g_return_if_fail (CAMEL_IS_MIME_PART (attachment));
+
+ bar = E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar);
+ e_msg_composer_attachment_bar_attach_mime_part (bar, attachment);
+}
+
+
+/**
* e_msg_composer_get_message:
* @composer: A message composer widget
*