From eb87301392618f045df2df70149c95f637179413 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 21 Apr 2000 18:38:04 +0000 Subject: new functions * e-msg-composer.c (e_msg_composer_set_headers): (e_msg_composer_set_body_text): new functions * e-msg-composer-hdrs.c: const poisoning (e_msg_composer_hdrs_set_subject): (e_msg_composer_hdrs_get_subject): new functions * e-msg-composer-address-entry.c: const poisoning svn path=/trunk/; revision=2548 --- composer/e-msg-composer.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'composer/e-msg-composer.c') diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 3db5180972..220880ee4c 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -640,6 +640,49 @@ e_msg_composer_show_attachments (EMsgComposer *composer, } +/** + * e_msg_composer_set_headers: + * @composer: a composer object + * @to: the values for the "To" header + * @cc: the values for the "Cc" header + * @bcc: the values for the "Bcc" header + * @subject: the value for the "Subject" header + * + * Sets the headers in the composer to the given values. + **/ +void +e_msg_composer_set_headers (EMsgComposer *composer, const GList *to, + const GList *cc, const GList *bcc, + const char *subject) +{ + EMsgComposerHdrs *hdrs; + + g_return_if_fail (E_IS_MSG_COMPOSER (composer)); + hdrs = E_MSG_COMPOSER_HDRS (composer->hdrs); + + e_msg_composer_hdrs_set_to (hdrs, to); + e_msg_composer_hdrs_set_cc (hdrs, cc); + e_msg_composer_hdrs_set_bcc (hdrs, bcc); + e_msg_composer_hdrs_set_subject (hdrs, subject); +} + + +/** + * e_msg_composer_set_body_text: + * @composer: a composer object + * @text: the HTML text to initialize the editor with + * + * Loads the given HTML text into the editor. + **/ +void +e_msg_composer_set_body_text (EMsgComposer *composer, const char *text) +{ + g_return_if_fail (E_IS_MSG_COMPOSER (composer)); + + set_editor_text (BONOBO_WIDGET (composer->editor), text); +} + + /** * e_msg_composer_get_message: * @composer: A message composer widget -- cgit v1.2.3