Mailer side of 14705.
* Evolution-Composer.idl (setBody): Change setBodyText to setBody
and take a MIME type as well.
(show): Add an exception.
* evolution-composer.c (impl_Composer_set_body, etc): Update for
IDL change. While I'm here, fix this to DTRT with both plaintext
and HTML bodies. (It claimed to take plain text before, but then
passed it to the composer as HTML.)
(impl_Composer_show): Raise an exception if setBody has been
called, since the composer window will not display the real data
in that case.
* e-msg-composer.c (e_msg_composer_set_body): interface for
impl_Composer_set_body.
(build_message): If e_msg_composer_set_body has been called, use
the body and MIME type supplied to it rather than the contents of
the HTML editor.
svn path=/trunk/; revision=15833
2002-01-31 Radek Doulik <rodo@ximian.com>
* e-msg-composer.c (e_msg_composer_ignore): new method, tells
composer to ignore all word in str string
(next_word): helper function to get next word from s, saves rest
of s to sr
svn path=/trunk/; revision=15540
2002-01-29 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (build_message): If we are in redirect mode,
use the original message and set the resent-* headers using
e_msg_composer_hdrs_to_redirect() and then return.
(destroy): Unref the redirected message if it exists.
* e-msg-composer-hdrs.c (e_msg_composer_hdrs_to_redirect): New
function for a composer in redirect mode.
svn path=/trunk/; revision=15507
2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (class_init): Setup the SAVE_DRAFT signal.
(menu_file_save_draft_cb): Emit the SAVE_DRAFT signal.
(exit_dialog_cb): Same here.
(save_draft): Removed. This code is now a signal that
mail-callbacks will connect to.
svn path=/trunk/; revision=15079
2001-11-02 <NotZed@Ximian.com>
* e-msg-composer.c (e_msg_composer_set_enable_autosave): New
function, enable/disable autosave for the composer temporarily.
(autosave_run_foreach_cb): Only save if we have enable autosave
turned on. In other cases we want to save it regardless.
svn path=/trunk/; revision=14574
* evolution-composer.c (init): Set the (new) "no_body" flag on the
composer.
(impl_Composer_set_body_text): And unset it here.
(unset_no_body): And here (called if/when the composer is
realized).
* e-msg-composer.c (build_message): If the composer has the
"no_body" flag set, and a single attachment, promote that
attachment to be the message body.
svn path=/trunk/; revision=14393
2001-10-29 Larry Ewing <lewing@ximian.com>
* e-msg-composer.h: add GList to hold the current images.
* listener.c (resolve_image_url): keep track of the images that
the editor is currently uses in current_images as well as storing
the images in the hash.
* e-msg-composer.c (clear_current_images): clear the list of
images actually in the message.
(add_inlined_images): use the current image list rather than the
hash tables.
(build_message): clear the current image list when appropriate.
(init): initialize current_images.
svn path=/trunk/; revision=14379
2001-10-24 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (add_attachments_from_multipart): New function
that replaces handle_multpart() and handle_multipart_alternative()
for add_message_attachments().
(e_msg_composer_add_message_attachments): Call
add_attachments_from_multipart().
(handle_multipart_alternative): Now only used by
new_with_message() and is really only designed to work well with
messages generated by Evolution (ie for editing Drafts and such).
(handle_multipart): Same.
(e_msg_composer_new_with_message): No longer calls
add_message_attachments() because we can't ever have this fail and
the logic in add_message_attachments() is impossible
logic. Instead do like what we used to do before the addition of
add_message_attachments() came along.
svn path=/trunk/; revision=14084
attachments. Also, I think this should make replies to HTML
messages containing inline images referenced via Content-Location
work, but that's not tested.
* e-msg-composer.c (various): Keep two hash tables of inline image
data: one mapping from cid: URLs to CamelMimeParts for all
attachments, the other mapping from file: and Content-Location
urls to CamelMimeParts (for those inline images that came from a
file or have a Content-Location).
(add_inlined_images): Simplify. Most of this code is in
e_msg_composer_add_inline_image_from_file() now.
(e_msg_composer_add_message_attachments, handle_multipart): Change
"attach_all" arg to "just_inlines". If it is set, call
e_msg_composer_add_inline_image_from_mime_part on any attachment
with a Content-Id or Content-Location.
(e_msg_composer_add_inline_image_from_file): Create a mime part
from a file and add it to the inline images hash.
(e_msg_composer_add_inline_image_from_mime_part): Add a mime part
directly to the inline images hash.
* listener.c (resolve_image_url): If asked to resolve a file: URL
that isn't in the inline images hash, call
e_msg_composer_add_inline_image_from_file to get a cid for it.
(impl_event): Look up the URL in the inline_images and
inline_images_by_url hashes.
* e-msg-composer-attachment-bar.c
(e_msg_composer_attachment_bar_find_message): Gone. No longer
used.
svn path=/trunk/; revision=13852
2001-10-19 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (handle_multipart): Now takes a 'attach_all'
argument. If !attach_all, then only attach the attachment if the
part has a content-id, otherwise we can safely assume that nothing
references it thus we don't need to attach it.
(e_msg_composer_add_message_attachments): Now takes a 'attach_all'
argument that overrides the "only attach attachments if they have
a content-id header" behavior.
(e_msg_composer_new_with_message): Pass TRUE as the attach_all
argument to add_message_attachments.
svn path=/trunk/; revision=13800
* e-msg-composer.c (autosave_manager_unregister): Don't pop up an
"unable to retrieve message" if the composer never finished
initializing.
(init): Don't call autosave_manager_register here: wait until the
end of create_composer.
(create_composer): Remove the distinction between this and
e_msg_composer_construct since there's no need for the latter. Use
e_activation_failure_dialog if either the selectnames component or
the gtkhtml editor fails.
* e-msg-composer-hdrs.c (setup_corba): Don't g_warn if the oaf
activation fails. create_composer() will tell the user.
svn path=/trunk/; revision=13661
2001-10-10 Larry Ewing <lewing@ximian.com>
* e-msg-composer.h: add prototype.
* e-msg-composer.c (e_msg_composer_add_message_attachments): new
function to copy attachments from the a message to a composer.
(e_msg_composer_set_pending_body): make simple function to
abstract this.
(e_msg_composer_apply_pending_body): apply the pending body to
the composer.
(e_msg_composer_new_with_message): use
e_msg_composer_add_message_attachments to copy attachments.
svn path=/trunk/; revision=13563
2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
* evolution-composer.c (init): Don't call new_with_sig_file, it no
longer exists.
* e-msg-composer.c (setup_ui): Make sure that the session is
non-NULL.
(menu_file_send_cb): And here too.
(e_msg_composer_new_with_sig_file): Removed.
svn path=/trunk/; revision=12753
2001-09-08 Jon Trowbridge <trow@ximian.com>
* evolution-composer.c (corba_recipientlist_to_destv): Originally
was corba_recipientlist_to_glist.
(impl_Composer_set_headers): Use corba_recipientlist_to_destv, new
destination-based api.
* e-msg-composer.c (build_message): Get rid of that 'sending'
stuff. That was a bad idea.
(e_msg_composer_new_with_message): Apply the revised api and work
with vectors of destinations rather than just lists.
(e_msg_composer_get_recipients): Added. Returns the full set of
recipient destinations in a vector.
* e-msg-composer-hdrs.c: Removed free_destv function. We use
e_destination_freev instead.
(e_msg_composer_hdrs_get_to): Changed to return a vector of
EDestinations. This function now works.
(e_msg_composer_hdrs_get_cc): Ditto.
(e_msg_composer_hdrs_get_bcc): Ditto.
(e_msg_composer_hdrs_get_recipients): Added. Returns a vector of
EDestinations that is the union of the to, cc and bcc lines.
(e_msg_composer_hdrs_set_to): Changed to take a vector of
EDestinations, rather than a GList.
(e_msg_composer_hdrs_set_cc): Ditto.
(e_msg_composer_hdrs_set_bcc): Ditto.
(e_msg_composer_hdrs_to_message): Use our new, improved API, rather
than a bunch of poking around in BonoboPropertyBags, etc.
svn path=/trunk/; revision=12711
2001-08-29 Jon Trowbridge <trow@ximian.com>
* e-msg-composer.c (e_msg_composer_get_message_draft): Pass
in FALSE as the 'sending' arg to e_msg_composer_get_message.
(build_message): Added a 'sending' arg, which is passed to
e_msg_composer_get_message.
(e_msg_composer_get_message): Added a 'sending' arg,
which gets passed directly on to build_message.
* e-msg-composer-hdrs.c (e_msg_composer_hdrs_to_message): Added
a "sending" arg, which should be TRUE if the message is being
sent now (rather than being autosaved, etc.). The address
use scores are only updated when sending. (Bug #8332)
Removed obsolete (#if 0/#endif-ed) code.
2001-08-29 Jon Trowbridge <trow@ximian.com>
* mail-callbacks.c (composer_get_message): When calling
e_msg_composer_get_message, pass in TRUE for the 'sending' arg.
(Part of the fix for bug #8332)
svn path=/trunk/; revision=12518
2001-07-03 Larry Ewing <lewing@ximian.com>
* e-msg-composer.h: remove the timer id.
* e-msg-composer.c: use autosave manager.
(autosave_save_draft): moved initialization to
autosave_init_file. Only save the buffer if we get a valid
message.
(autosave_load_draft): unlink the old file, we own it now. and
unref the stream when we are done with it.
(autosave_is_owned): check if we own the file, this needs to be
extended to check for other valid processes.
(autosave_query_load_orphans): make this search through the
managers list as it walks the dir.
(autosave_query_load_orphans): make sure we use the full path.
(autosave_run_foreach_cb): timeout foreach handler.
(autosave_run): the timeout function.
(autosave_start): start timer.
(autosave_stop): stop timer.
(autosave_register): register a composer with the autosave manager.
(autosave_unregister): unregister a composer.
(destroy): unregister the composer, everything is okay.
(init): register the composer.
svn path=/trunk/; revision=10762
2001-07-02 Larry Ewing <lewing@ximian.com>
* e-msg-composer.c (autosave_query_load_orphans): querythe user to
check if they want to load any orphans we've found.
(autosave_query_cb): the dialog callback.
(autosave_is_orphan): test if if a particular file is orphaned.
(autosave_load_draft): load a message from an autosave file.
(autosave_save_draft): save the current buffer to the autosave file.
svn path=/trunk/; revision=10761
2001-07-02 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-attachment-bar.c (attach_to_multipart): Set the
user-chosen charset.
* e-msg-composer.c (menu_change_charset_cb): New callback function
to get the user-set charset.
(init): Set the charset to NULL.
(best_charset): Take a default_charset param that holds the value
the user set for this particular message using the menu.
(destroy): Free the charset.
svn path=/trunk/; revision=10704
2001-05-16 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (build_message): Added S/MIME sign/encrypt code.
(init): Initalize smime_sign/encrypt.
(e_msg_composer_get_smime_encrypt): new
(e_msg_composer_set_smime_encrypt): new
(e_msg_composer_get_smime_sign): new
(e_msg_composer_set_smime_sign): new
(menu_security_smime_sign_cb): new
(menu_security_smime_encrypt_cb): new
(setup_ui): Setup the UI for S/MIME stuff.
svn path=/trunk/; revision=9858
* signature editing fixes
2001-05-03 Radek Doulik <rodo@ximian.com>
* e-msg-composer.c (get_signature_html): put signature in 100%
width table
(delete_old_signature): look only for first flow with signature == 1
(e_msg_composer_new): don't insert <BR>
(e_msg_composer_new_with_sig_file): ditto
(delete_old_signature): don't delete whole signature paragraph,
but just it's content
(delete_old_signature): if signature isn't found, insert new empty
paragraph to end of document for new signature
(e_msg_composer_set_sig_file): delete signature always
(e_msg_composer_set_sig_file): don't place signature to the end of
document, but place it where previous one was (if there wasn't
then new one is appended to the document)
2001-05-02 Radek Doulik <rodo@ximian.com>
* listener.c (impl_event): do automagic indenting only when
in_signature_insert is FALSE
* e-msg-composer.c (e_msg_composer_set_sig_file): do indent-zero
before signature inserting
(e_msg_composer_set_sig_file): use in_signature_insert flag
2001-05-01 Radek Doulik <rodo@ximian.com>
* listener.c (impl_event): set signature to 0 in newly created
empty paragraphs
(clear_signature): new helper function
svn path=/trunk/; revision=9658
2001-03-12 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.h: Added view_replyto member.
* e-msg-composer.c (e_msg_composer_get_visible_flags): Find out if
we want to view the Reply-To header.
(e_msg_composer_set_view_replyto): A new function to set the state
of the replyto header.
(menu_view_replyto_cb): Callback for setting the ReplyTo state.
(set_config): Make static.
(setup_ui): Setup the ReplyTo bonobo stuff.
(load_from_property_bag): More defaults for the ReplyTo, yay.
(load_from_gnome_config): Again...
(e_msg_composer_get_view_bcc): Implemented.
(e_msg_composer_get_view_cc): Implemented.
(e_msg_composer_get_view_from): Implemented.
(e_msg_composer_get_view_replyto): Implemented.
* e-msg-composer-hdrs.c (e_msg_composer_hdrs_get_reply_to_entry):
New function, yay.
(e_msg_composer_hdrs_get_reply_to): Another new function.
(e_msg_composer_hdrs_set_reply_to): Yet another new function...
(create_headers): Create the reply-to header.
(attach_headers): Attach the reply_to.
(headers_set_visibility): Set the reply_to visibility.
(e_msg_composer_hdrs_to_message): Set the message's reply-to here
based on the user-set reply-to header.
svn path=/trunk/; revision=8657
2001-03-06 Miguel de Icaza <miguel@ximian.com>
* e-msg-composer.c (set_config): New function. Used to store
integer values into the configuration engine. Handles the case of
Bonobo-conf being installed, or falls back to gnome_config.
* e-msg-composer-hdrs.c (add_header): Renamed to be
header_new_recipient(). Now we take care of the other cases in
create_headers, which is a lot nicer now.
(create_optionmenu): Removed extra "name" argument which was not
being used anyways (the only arg passed was From:).
(init): Removed all the redundant NULL initialization by using
nice g_new0
(create_headers): New function, much cleaner.
Use of Pair structure everywhere instead of individual widgets to
keep track of which ones are visible and which ones are not.
* e-msg-composer.c (setup_ui): Handle ViewFrom and ViewBCC
commands.
(menu_view_bcc_cb, menu_view_from_cb): New functions that
implement the features described.
(menu_format_html_cb): Removed unrequired test, as
e_msg_composer_set_send_html already optimizes the case of the
state being the same.
(menu_security_pgp_encrypt_cb): Remove redundant code.
(menu_security_pgp_sign_cb): ditto.
2001-03-06 Miguel de Icaza <miguel@ximian.com>
* evolution-message-composer.xml: Reorder menus to be File, Edit,
View, Insert, Format (instead of File, Edit, Format, View, Insert).
Add View/From Field and View/From BCC
Add Insert/File.
Add File/Send menu item.
Change the look to follow the "mailer" look (thiner display).
svn path=/trunk/; revision=8590
2001-02-10 Jeffrey Stedfast <fejj@ximian.com>
* evolution-composer.c (impl_Composer_set_headers): Updated. We
might want to change the corba interface for this to allow setting
the from-address as well.
* e-msg-composer.c (e_msg_composer_new_with_message): Updated.
(e_msg_composer_set_headers): Now takes a 'From' argument so that
we can try to pre-determine the account the user will want to send
from.
svn path=/trunk/; revision=8165
2001-01-25 Jason Leach <jasonleach@usa.net>
(Moving the flag for has_changed from the Hdrs to the Composer
itself. Providing public methods to set/unset a composer as
changed. Adding attachments now flags the composer as changed)
* e-msg-composer.c (e_msg_composer_unset_changed): New function.
(e_msg_composer_set_changed): New function.
* e-msg-composer.c (hdrs_changed_cb): Callback to the new signal,
uses the new composer_set_changed.
(attachment_bar_changed_cb): Add a call to the new _set_changed.
* e-msg-composer-hdrs.c (class_init): New signal "hdrs_changed" to
tell the parent composer that any of the headers have changed.
(addressbook_entry_changed): emit the new signal here.
(entry_changed): And here.
svn path=/trunk/; revision=7818
2001-01-12 Jeffrey Stedfast <fejj@helixcode.com>
* e-msg-composer.c (build_message): Call set_from_account which
means we no longer have to do all the crap involved in formatting
strings into an internet-address.
(e_msg_composer_get_preferred_account): New access function.
* e-msg-composer-hdrs.c (add_header): case COMBOBOX has changed to
OPTIOMENU.
(create_optionmenu): Update to use an optionmenu of accounts.
(from_changed): New callback for the From optionmenu.
(setup_headers): s/COMBOBOX/OPTIONMENU
(init): Set the account and from_options to NULL.
(e_msg_composer_hdrs_get_from): Updated.
(destroy): free the from_options.
(e_msg_composer_hdrs_set_from_address): Renamed from set_from
because it no longer takes a string arg but rather an account arg.
svn path=/trunk/; revision=7458
2001-01-12 Miguel de Icaza <miguel@ximian.com>
* e-msg-composer-hdrs.c (add_header): Only attach to "changed" if
the widget is an EEntry. The HEADER_COMBOBOX and the
HEADER_ADDRBOOK are a ComboBox and a remote Bonobo control
respectively.
* evolution-composer.c (get_object): Move getObject functionality
here from e-msg-composer.c
svn path=/trunk/; revision=7441
2001-01-10 Miguel de Icaza <miguel@helixcode.com>
* evolution-composer.c (evolution_composer_construct): Add an
ItemContainer Bonobo interface to allow client applications to
locate the Message Composer component.
svn path=/trunk/; revision=7416
2000-12-15 Jeffrey Stedfast <fejj@helixcode.com>
* e-msg-composer.c (e_msg_composer_get_pgp_encrypt): New function
to get whether or not to encrypt the message.
(e_msg_composer_set_pgp_encrypt): New function to set encryption.
(e_msg_composer_get_pgp_sign): New function to get whether or not
to sign the message.
(e_msg_composer_set_pgp_sign): New function to set pgp_sign.
(init): Initialize pgp_sign and pgp_encrypt to FALSE.
svn path=/trunk/; revision=7058
2000-11-15 Radek Doulik <rodo@helixcode.com>
* e-msg-composer.h: e_msg_composer_guess_mime_type renamed and
moved mime_guess_type_from_file_name from camel as it uses VFS
svn path=/trunk/; revision=6579
signature
(set_editor_text): try to use HTML signature
(e_msg_composer_new_with_sig_file): added send_html arg to be able
to use HTML signature
svn path=/trunk/; revision=6510
you need fresh CVS gtkhtml to try that
2000-10-31 Radek Doulik <rodo@helixcode.com>
* e-msg-composer.c (prepare_engine): new function, tries prepare
editor engine
(mark_orig_text): marks original text in editor
(set_editor_text): call mark_orig_text
(create_composer): call prepare_engine
* Makefile.am (IDL_GENERATED): added HTMLEditor generated files to
IDL_GENERATED
($(IDL_GENERATED)): generate also files from HTMLEditor.idl
(libcomposer_la_SOURCES): added listener.[ch]
* e-msg-composer.h: added editor_engine and editor_listener to
EMsgComposer
* listener.[ch]: new files, implementation of HTMLEditor::Listener
svn path=/trunk/; revision=6292
* e-msg-composer.c (e_msg_composer_construct): Don't g_error out
if the html-editor-control fails.
(create_composer): New internal function to create and construct a
msg_composer and pop up an error message if it fails.
(e_msg_composer_new, e_msg_composer_new_with_sig_file,
e_msg_composer_new_with_message, e_msg_composer_new_from_url): Use
create_composer, return if it fails, change return type to
EMsgComposer *.
svn path=/trunk/; revision=5501