* e-msg-composer.c (build_message): Remove Content-Disposition in
the no_body case. (More kludging around Outlook iCalendar
brokenness.)
svn path=/trunk/; revision=14433
* 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
2001-10-24 Larry Ewing <lewing@ximian.com>
* e-msg-composer.c
(e_msg_composer_add_inline_image_from_mime_part): rework this so
that we don't end up freeing the cid then reading from it.
svn path=/trunk/; revision=14077
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
2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (best_encoding): Don't use a
g_return_val_if_fail after iconv_open, this is a valid error
condition and so should use check it for real.
* e-msg-composer-attachment-bar.c (attach_to_multipart): Correctly
set the charset parameter and use camel's bestenc filter to
determine which content transfer encoding to use.
svn path=/trunk/; revision=13784
001-10-15 Larry Ewing <lewing@ximian.com>
* e-msg-composer.c (e_msg_composer_add_message_attachments):
s/apply/flush/.
(e_msg_composer_flush_pending_body): renamed from apply now takes
apply as an argument.
(e_msg_composer_show_sig_file): s/g_assert/g_return_if_fail/
warnings make for less painful bugs than crashes.
(set_editor_text): s/g_assert/g_return_if_fail/
svn path=/trunk/; revision=13681
* 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 Jon Trowbridge <trow@ximian.com>
* e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_from_account):
Check for either a matching account name, or for a matching e-mail
address embedded in the passed-in string. (Fixes half of bug
#3255)
(destroy): Call bonobo_object_release_unref on corba_select_names,
not CORBA_Object_release. Otherwise we leak stuff all over the
place. (Bug #11878)
* e-msg-composer.c (e_msg_composer_new_with_message): If our message
doesn't contain an X-Evolution-Account header, pass in the From
header as the account name. (Fixes the other half of #3255)
svn path=/trunk/; revision=13567
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-10-09 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (setup_ui): Pass /menu/Edit as the menu path to
e_charset_picker thingy.
svn path=/trunk/; revision=13529
2001-10-05 Larry Ewing <lewing@ximian.com>
* e-msg-composer-attachment.c (e_msg_composer_attachment_new):
remove unused variable.
* e-msg-composer-attachment-bar.c
(e_msg_composer_attachment_bar_find_message): generalize this to
lookup content locations as well.
* e-msg-composer-attachment-bar.h: change prototype to match the
new function.
* listener.c (impl_event): handle the url_requested event, look up
parts in the attachment part and feed them down the stream if it
is found.
* e-msg-composer.c (handle_multipart_alternative): delay setting
the body text.
(handle_multipart): delay setting body text
(e_msg_composer_new_with_message): set the body text from the
object data. Doing this ensures that we will have the attachments
processed before we try to look them up.
svn path=/trunk/; revision=13445
2001-10-03 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (autosave_save_draft): Make sure to unref the
message object so we don't leak it or any references to
attachments (child mime parts).
* e-msg-composer-attachment.c (e_msg_composer_attachment_new):
Unref the mime part after passing it along to new_from_mime_part.
svn path=/trunk/; revision=13402
* e-shell-view.c (e_shell_view_construct): Use
`bonobo_ui_component_new_default()', not
`bonobo_ui_component_new()'.
* mail-account-gui.c (launch_signature_editor): Use
`bonobo_ui_component_new_default()', not
`bonobo_ui_component_new()'.
* e-msg-composer.c (setup_ui): Use
`bonobo_ui_component_new_default()', not
`bonobo_ui_component_new()'.
* gui/dialogs/comp-editor.c (setup_widgets): Use
`bonobo_ui_component_new_default()', not
`bonobo_ui_component_new()'.
svn path=/trunk/; revision=13306
2001-09-26 Jon Trowbridge <trow@ximian.com>
* e-msg-composer.c (e_msg_composer_new_from_url): Fixes glitch in
mailto: url parsing that caused it to fail when recipient names
contained commas. (Bug #10796)
svn path=/trunk/; revision=13156
2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (build_message): Attach an X-Evolution-Format
header so if people re-edit a message in say their Sent folder, we
will preserve format preferences.
(e_msg_composer_get_message_draft): Don't attach
X-Evolution-Format headers here since it is now done in
build_message().
(e_msg_composer_new_with_message): Make sure to remove *all*
X-Evolution headers by using the mail-tools functions.
svn path=/trunk/; revision=12958
2001-09-13 Larry Ewing <lewing@ximian.com>
* e-msg-composer.c (map_default_cb): free the text values we get
from the property bag and release the property bag properly.
svn path=/trunk/; revision=12794
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-10 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (setup_ui): Make sure that the session is
non-NULL.
(menu_file_send_cb): And here too.
svn path=/trunk/; revision=12746
2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (build_message): Wrap the S/MIME code in ifdef
SMIME_SUPPORTED which isn't defined but by some later version will
be.
(setup_ui): And again here.
svn path=/trunk/; revision=12742
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-08-22 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (save): When reporting an error, use
my_file_name instead of file_name since file_name can be NULL.
svn path=/trunk/; revision=12387
2001-08-19 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (save_draft): Reset the "changed" state to
FALSE after a successful save.
svn path=/trunk/; revision=12224
2001-07-12 Peter Williams <peterw@ximian.com>
* e-msg-composer.c (map_default_cb): New function. Figure out
which widget gets the default and assign it. Harder to do than
it sounds.
(e_msg_composer_construct): Hook map_default_cb up to the "map"
signal.
(set_focus_to_editor): Removed.
(set_focus_to_editor_idle): Removed.
svn path=/trunk/; revision=12037
2001-08-09 Radek Doulik <rodo@ximian.com>
* e-msg-composer.c (set_focus_to_editor): new helper function,
just setup idle callback to grab focus
(set_focus_to_editor_idle): grab focus for editor, before we have
better solution, it run grab-focus command on editor control
(e_msg_composer_construct): call prepare_engine here, set focus to
editor
svn path=/trunk/; revision=11875
2001-08-10 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (autosave_manager_query_load_orphans): Don't
forget to closedir() when we finish with dir.
svn path=/trunk/; revision=11872
2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (from_changed_cb): Set the smime/pgp
always-sign options when here so it updates when the user changes
his/her identity.
svn path=/trunk/; revision=11840
2001-08-08 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (e_msg_composer_get_message_draft): Set the
PGP/MIME and S/MIME options to FALSE before getting the message
draft and restore the values afterward.
svn path=/trunk/; revision=11802
2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (add_inlined_image): Use g_basename().
(setup_ui): Get the default charset from the mail config db.
svn path=/trunk/; revision=11716
2001-07-31 Peter Williams <peterw@ximian.com>
* evolution-message-composer.xml: Add "Customize Toolbars" menu item
and command.
composer:
2001-07-31 Peter Williams <peterw@ximian.com>
* e-msg-composer.c (setup_ui): Set the config path for the composer so
that the customize toolbar command works.
svn path=/trunk/; revision=11529