Commit Graph

418 Commits

Author SHA1 Message Date
90a263ce50 swap the order in which we add recipients to the list. If we add the auto-recipients first, then it is more visually appearling since most users will add their own recipients to the end of a list.
svn path=/trunk/; revision=15551
2002-02-01 22:35:02 +00:00
5d3e16ae8b Update the auto-cc/bcc recipients in the composer header fields to match
2002-02-01  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (update_auto_recipients): Update the
	auto-cc/bcc recipients in the composer header fields to match the
	ones chosen in the account configuration.

svn path=/trunk/; revision=15548
2002-02-01 20:48:45 +00:00
a6c6ee7466 new method, tells composer to ignore all word in str string (next_word):
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-31 18:58:29 +00:00
ac9c64ee1a If we are in redirect mode, use the original message and set the resent-*
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
2002-01-29 19:33:08 +00:00
36563616f7 get_file_contents(): use charset instead of composer->charset because the composer arg can be NULL.
svn path=/trunk/; revision=15288
2002-01-10 21:27:37 +00:00
010506f0f2 Rewrote to use CamelStreams and also convert the file contents to UTF-8
2002-01-10  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (get_file_content): Rewrote to use CamelStreams
	and also convert the file contents to UTF-8 (assums the file
	charset is the same charset that the composer is set to).
	(menu_file_insert_file_cb): Pass the composer into
	get_file_content().
	(e_msg_composer_get_sig_file_content): Pass NULL as the composer
	argument.

svn path=/trunk/; revision=15286
2002-01-10 21:05:13 +00:00
42e8edbe5c Fixed the setup of the "save-draft" signal so that it would actually work.
2002-01-09  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (class_init): Fixed the setup of the
	"save-draft" signal so that it would actually work.

svn path=/trunk/; revision=15279
2002-01-09 23:34:45 +00:00
08fe7bd670 Set the X-Evolution-Format header to text/plain if that is the editing
2002-01-07  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (e_msg_composer_get_message_draft): Set the
	X-Evolution-Format header to text/plain if that is the editing
	mode we are really in. This fixes bug #11499.

svn path=/trunk/; revision=15255
2002-01-07 19:56:23 +00:00
5dc56039e8 A few minor fixes to make it more compliant with rfc2368. Should now be
2002-01-04  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (e_msg_composer_new_from_url): A few minor
	fixes to make it more compliant with rfc2368. Should now be fully
	rfc compliant as far as I can tell.

svn path=/trunk/; revision=15249
2002-01-04 23:12:02 +00:00
bf94685406 added #include <sys/time.h>
svn path=/trunk/; revision=15198
2001-12-20 19:42:57 +00:00
4418d0b09a argh, only loop while n > 0 not >= 0 since 0 will mean "end-of-file"
svn path=/trunk/; revision=15134
2001-12-17 20:05:55 +00:00
1b8e8b861e ack, fix a small logic bug.
svn path=/trunk/; revision=15131
2001-12-17 19:50:35 +00:00
a6769def13 Don't block forever if we are reading a fifo with no data.
2001-12-17  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (read_file_content): Don't block forever if we
	are reading a fifo with no data.

svn path=/trunk/; revision=15122
2001-12-17 18:24:13 +00:00
3abfba882b Setup the SAVE_DRAFT signal. (menu_file_save_draft_cb): Emit the
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-12-14 18:53:30 +00:00
d103ae62e1 Attach to the parent widget's destroy signal - when that gets destroyed,
001-12-11  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
	Attach to the parent widget's destroy signal - when that gets
	destroyed, we need to cancel the editor dialog too. Also connect
	to our parent window's "hide" signal so that when the composer
	gets hidden (ie, it's being sent), we also close the dialogs.

	* e-msg-composer.c (init): Default composer->enable_autosave to
	TRUE.

svn path=/trunk/; revision=15016
2001-12-13 20:14:26 +00:00
84cc28032c If the widget is non-NULL, then gtk_widget_destroy that bad boy...
2001-12-11  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer-select-file.c
	(file_selection_info_destroy_notify): If the widget is non-NULL,
	then gtk_widget_destroy that bad boy...

svn path=/trunk/; revision=14984
2001-12-11 19:37:30 +00:00
4996c32075 Only execute an executable sig file if a magic environment variable is
2001-12-10  Jon Trowbridge  <trow@ximian.com>

	* e-msg-composer.c (get_file_content): Only execute an executable
	sig file if a magic environment variable is set.

svn path=/trunk/; revision=14962
2001-12-10 19:30:24 +00:00
92b2a3c90a Added. Executes the given file and returns its output as a string.
2001-12-06  Jon Trowbridge  <trow@ximian.com>

	* e-msg-composer.c (executed_file_output): Added.  Executes the
	given file and returns its output as a string.
	(get_file_content): Stats the file to see if it is executable.
	If it is, execute it and return the string.  If not, just read
	the file and return the contents.

svn path=/trunk/; revision=14917
2001-12-06 23:13:56 +00:00
94611b60ab oops, something got fubar'd in the merge I guess...
add a char *tooltip.

svn path=/trunk/; revision=14891
2001-12-05 19:37:24 +00:00
b15abd7c7e I should have merged in the patch rather than being lazy and copying the file from the other branch. *kicks myself in the butt*
svn path=/trunk/; revision=14872
2001-12-04 21:56:38 +00:00
8438d0bc82 Change the FileSend tooltip the be the same as the FileSendLater tooltip
2001-11-30  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (setup_ui): Change the FileSend tooltip the be
	the same as the FileSendLater tooltip if we are in offline mode.

svn path=/trunk/; revision=14871
2001-12-04 21:49:38 +00:00
b9a1423474 If we come back online, switch the Send accelerator back to the Send
2001-11-19  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (setup_ui): If we come back online, switch the
	Send accelerator back to the Send button from the Send Later
	button.

svn path=/trunk/; revision=14752
2001-11-19 22:03:51 +00:00
8e2b3ae66d Allow drag & drop for vcards.
2001-11-11  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (drag_data_received): Allow drag & drop for
	vcards.

svn path=/trunk/; revision=14727
2001-11-15 21:48:37 +00:00
7838233834 popup failure dialog if we cannot get a valid editor_engine.
2001-11-14  Larry Ewing  <lewing@ximian.com>

	* e-msg-composer.c (create_composer): popup failure dialog if we
	cannot get a valid editor_engine.
	(prepare_engine): make the checks robust and make sure that we
	unset the engine if any part fails.

svn path=/trunk/; revision=14715
2001-11-14 22:41:26 +00:00
16fb895cb0 use hash table to eliminate duplicates
2001-11-02  Radek Doulik  <rodo@ximian.com>

	* e-msg-composer.c (add_inlined_images): use hash table to
	eliminate duplicates

svn path=/trunk/; revision=14587
2001-11-05 13:03:07 +00:00
2
8fcca3dc0b New function, enable/disable autosave for the composer temporarily.
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
2001-11-03 00:01:39 +00:00
be7fbc93cd Add back the "remove Content-Disposition when sending itip" hack.
* e-msg-composer.c (build_message): Add back the "remove
        Content-Disposition when sending itip" hack.

svn path=/trunk/; revision=14516
2001-10-31 04:40:29 +00:00
e7157ba893 New.
* Evolution-Composer.idl (setMultipartType): New.

	* evolution-composer.c (impl_Composer_set_multipart_type): Allow
	caller to specify a multipart/alternative rather than
	multipart/mixed.

	* e-msg-composer.c (build_message): Revert yesterday's changes.
	Add new ones for sending multipart/alternative.

svn path=/trunk/; revision=14510
2001-10-31 00:26:58 +00:00
32ce65319d Always force a save query for now.
svn path=/trunk/; revision=14486
2001-10-30 22:02:04 +00:00
d66b90437b add dirty prototype.
001-10-30  Larry Ewing  <lewing@ximian.com>

	* e-msg-composer.h: add dirty prototype.

	* e-msg-composer.c: add dirty implementation.

svn path=/trunk/; revision=14485
2001-10-30 21:58:16 +00:00
83cbc43d1c Remove Content-Disposition in the no_body case. (More kludging around
* 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
2001-10-30 05:25:40 +00:00
b0587183ce Put the charset encoding submenu in the EncodingPlaceholder.
* e-msg-composer.c (setup_ui): Put the charset encoding submenu in
the EncodingPlaceholder.

svn path=/trunk/; revision=14407
2001-10-30 02:44:35 +00:00
46dee51671 Set the (new) "no_body" flag on the composer.
* 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-30 01:36:48 +00:00
80fffd0930 add GList to hold the current images.
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-29 23:30:25 +00:00
02dcd0aadf Update the licensing information to require version 2 of the GPL
(instead of version 2 or any later version).

svn path=/trunk/; revision=14190
2001-10-27 00:25:49 +00:00
84dcb1413f New function that replaces handle_multpart() and
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-25 03:27:00 +00:00
162035d400 rework this so that we don't end up freeing the cid then reading from it.
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
2001-10-25 00:03:17 +00:00
b0ac33fbbe Make inline images used for replies not show up as
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-21 19:08:07 +00:00
c420f20740 Now takes a 'attach_all' argument. If !attach_all, then only attach the
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-19 20:03:42 +00:00
dfd09f4f17 Don't use a g_return_val_if_fail after iconv_open, this is a valid error
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
2001-10-19 01:56:21 +00:00
244694ee58 s/apply/flush/. (e_msg_composer_flush_pending_body): renamed from apply
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
2001-10-15 19:48:06 +00:00
da2d6ee08c Don't pop up an "unable to retrieve message" if the composer never
* 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-13 17:35:40 +00:00
bde8795c94 Deleted declaration of len.
2001-10-11  Jeffrey Stedfast  <fejj@ximian.com>

	* listener.c (impl_event): Deleted declaration of len.

	* e-msg-composer.c (e_msg_composer_add_message_attachments): Take
	a settext argument.
	(e_msg_composer_new_with_message): Updated to pass the settext argument.

svn path=/trunk/; revision=13595
2001-10-11 19:39:07 +00:00
7e628d1745 Check for either a matching account name, or for a matching e-mail address
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 20:47:46 +00:00
fee8a6f66d add prototype.
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-10 20:35:33 +00:00
a7282ea415 Pass /menu/Edit as the menu path to e_charset_picker thingy.
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-09 22:00:33 +00:00
a1750a292e remove unused variable.
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-05 16:57:01 +00:00
1d4100c58a Make sure to unref the message object so we don't leak it or any
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
2001-10-04 01:53:36 +00:00
c44b422cd6 Pass an empty flags argument to mail_get_folder.
2001-10-02  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (save_draft): Pass an empty flags argument to
	mail_get_folder.

svn path=/trunk/; revision=13352
2001-10-02 21:59:54 +00:00
11c665c925 Use bonobo_ui_component_new_default()', not bonobo_ui_component_new()'.
* 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-10-02 18:33:34 +00:00