Commit Graph

223 Commits

Author SHA1 Message Date
4713393d8b Fixed some memory leakage. Call free_recipients() so we don't leak memory.
2000-09-21  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-format.c (mail_generate_reply): Fixed some memory
	leakage. Call free_recipients() so we don't leak memory.

svn path=/trunk/; revision=5542
2000-09-21 20:36:48 +00:00
053af645da Deal with NULL composer.
* mail-callbacks.c (create_msg_composer, compose_msg, send_to_url,
	mail_reply, forward_msg):
	* mail-format.c (mail_generate_reply):
	* mail-ops.c (cleanup_edit_messages):
	* mail-view.c (view_forward_msg): Deal with NULL composer.

svn path=/trunk/; revision=5502
2000-09-19 15:35:40 +00:00
040ff5ad09 Another big rewrite of this stuff. Now all (well, most) attachments get a
* mail-display.c, mail-format.c: Another big rewrite of this
	stuff. Now all (well, most) attachments get a small icon with a
	description and a (non-obvious) right-click pop-up menu with
	options to save, open in an external program, or show/hide inline.

	TODO: antialias the icon, add more options to the pop-up for
	certain MIME types, add an icon to the headers, fix PGP to work
	like everything else, fix message/external-body to work again,
	add some icon caching action, etc, etc.

svn path=/trunk/; revision=5326
2000-09-11 17:12:57 +00:00
0bb5d2102e I changed the Reply-All behavior so that the sender's address does
not appear in the cc: field.

svn path=/trunk/; revision=5246
2000-09-07 21:42:45 +00:00
d9da6499c0 camel_mime_part_get_filename now deals with both Content-Disposition and
* mail-display.c (make_safe_filename):
	* mail-format.c (handle_mystery):
	* mail-identify.c (mail_identify_mime_part):
	camel_mime_part_get_filename now deals with both
	Content-Disposition and Content-Type.

svn path=/trunk/; revision=5215
2000-09-05 23:12:27 +00:00
53ebb93266 Applied Jesse's patch that will append a signature to the replied message
2000-09-04  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-format.c (mail_generate_reply): Applied Jesse's patch that
	will append a signature to the replied message text

	* folder-browser-factory.c: Changed "Send & Receieve" back to "Get
	Mail" temporarily so that the toolbar buttons don't all get
	stretched to some weird proportion

svn path=/trunk/; revision=5191
2000-09-04 05:14:55 +00:00
aa670b3306 Plug mem leaks.
svn path=/trunk/; revision=4854
2000-08-16 18:33:20 +00:00
184ad0a7f6 Fix some freed-memory references
* mail-format.c (add_url): Fix some freed-memory references

svn path=/trunk/; revision=4806
2000-08-13 20:49:28 +00:00
fcad059f76 Redo this so that the lock icon remains active after a failed decryption
* mail-format.c (decode_pgp): Redo this so that the lock icon
	remains active after a failed decryption so you can click on it
	and try again.
	(try_inline_pgp, handle_multipart_encrypted): Put a border around
	the decrypted data.

svn path=/trunk/; revision=4790
2000-08-13 02:25:10 +00:00
fa3aea8519 Remove workaround for gnome-vfs 0.2 bug.
* mail-identify.c: Remove workaround for gnome-vfs 0.2 bug.

	* mail-format.c (lookup_handler): Remove workaround for function
	introduced between gnome-vfs 0.2 and 0.3, since we depend on 0.3
	now.

svn path=/trunk/; revision=4777
2000-08-12 15:15:51 +00:00
c28cd1ebd7 Fixed a warning.
2000-08-11  Christopher James Lahey  <clahey@helixcode.com>

	* mail-format.c, mail-tools.h, message-list.c: Fixed a warning.

svn path=/trunk/; revision=4760
2000-08-12 01:25:32 +00:00
b9cc4db255 Redo this again. Get rid of struct mail_format_data and move most of that
* mail-display.c, mail-format.c: Redo this again. Get rid of
        struct mail_format_data and move most of that info into
        MailDisplay itself, and pass the MailDisplay around. Add a GData**
        to MailDisplay, and put the urls hash table into that. Also add
        the ability to redisplay the currently-displayed message (with the
        same GData**), and add a "show_pgp" datum to it that controls
        whether or not to decrypt PGP messages, and redo the PGP stuff
        (again) to take that into account. Now you don't get the annoying
        PGP password dialog box without any warning.

svn path=/trunk/; revision=4757
2000-08-11 22:22:27 +00:00
ed88f23786 Update this for CamelObject (try_inline_pgp): Deal with decrypting here
* mail-format.c (destroy_part): Update this for CamelObject
        (try_inline_pgp): Deal with decrypting here rather than trying to
        pawn the data off to handle_multipart_encrypted, since it most
        likely won't be correct (won't have the proper MIME headers inside
        the encrypted part).
        (handle_multipart_encrypted): Add code from Nathan Thompson-Amato
        to re-MIME-parse the decrypted data after decrypting.

        * mail-crypto.c (mail_crypto_openpgp_{de,en}crypt): Get the
        password here rather than having it passed in. Remove some dead
        code.

        * session.c (mail_request_dialog): Allow this to work in either a
        sync or an async context.

svn path=/trunk/; revision=4751
2000-08-11 20:27:12 +00:00
1fa80ef1b7 Fix the camel-folder's thaw handler. Implement event forwarding into the main thread.
svn path=/trunk/; revision=4744
2000-08-11 17:35:14 +00:00
64c6a63cf2 Check nrow, not srow.
2000-08-11  JP Rosevear  <jpr@helixcode.com>

	* mail-config-gui.c (news_edit_clicked): Check nrow, not srow.

svn path=/trunk/; revision=4738
2000-08-11 16:13:15 +00:00
6db1c7d22a Don't call e_setup_base_dir. It was wrong and it doesn't exist any more.
* session.c (session_init): Don't call e_setup_base_dir. It was
        wrong and it doesn't exist any more.

        * component-factory.c (owner_set_cb): Update for changed
        prototype, and record the evolution_homedir. Move call to
        mail_config_init here from session.c so it happens after
        evolution_dir is initialized.

        * mail.h: define "extern char *evolution_dir;" (formerly in
        e-util/e-setup.h)

        * component-factory.c, mail-callbacks.c, mail-config-gui.c,
        mail-config.c, mail-display.c, mail-format.c, mail-ops.c,
        mail-tools.c, session.c: Remove "e-util/e-setup.h" include.

svn path=/trunk/; revision=4712
2000-08-11 00:02:25 +00:00
8cb514d6dd Merge with camel-async.
svn path=/trunk/; revision=4687
2000-08-10 17:30:50 +00:00
e7697db4fc Fixed some warnings.
2000-08-09  Christopher James Lahey  <clahey@helixcode.com>

	* mail-display.c, mail-format.c, mail-ops.c: Fixed some warnings.

	* message-list.c: Fix the call to e_popup_menu_run to match the
	new signature.

svn path=/trunk/; revision=4634
2000-08-09 05:30:37 +00:00
ffaebb53fe Fix some compiler warnings.
* mail-crypto.c, mail-format.c, message-thread.c: Fix some
	compiler warnings.

svn path=/trunk/; revision=4615
2000-08-08 23:37:31 +00:00
9734f4252d Fix up format of addresses. (write_headers): Use CamelAddress functions to
* mail-format.c (mail_generate_reply): Fix up format of addresses.
	(write_headers): Use CamelAddress functions to simplify this.

svn path=/trunk/; revision=4606
2000-08-08 20:45:36 +00:00
725c2912fc Get rid of kludge around subject beginning with spaces.
2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-format.c (write_headers): Get rid of kludge around subject
	beginning with spaces.
	(mail_generate_reply): Get rid of kludge around subject beginning
	with spaces and also use g_strncasecmp instead of strncasecmp for
	portability

	* mail-ops.c (forward_msg): Get rid of kludges around subject
	beginning with spaces.

svn path=/trunk/; revision=4572
2000-08-07 18:24:44 +00:00
cf0a938afb Renamed from reply_body() so other functions can use it
2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-format.c (mail_get_message_body): Renamed from reply_body()
	so other functions can use it
	(mail_generate_reply): Updated to reflect function name changes

	* mail-ops.c (real_edit_msg): Attach a callback to the send signal

svn path=/trunk/; revision=4564
2000-08-07 08:37:07 +00:00
324b1e8675 New code to spawn off GPG/PGP to do stuff. Currently only deals with
* mail-crypto.c: New code to spawn off GPG/PGP to do stuff.
	Currently only deals with decryption. From Nathan Thompson-Amato
	<ndt@jps.net>, with bunches of changes from me.

	* session.c (mail_request_dialog): Expose the password dialog to
	the rest of the app (for use by the GPG/PGP code).

	* mail-format.c (handle_text_plain): Handle special inline data
	types. (Currently uuencoding, BinHex, and PGP encryption.) This is
	not the best way to deal with it, but it works for now.
	(try_inline_pgp): Convert an inline PGP-encrypted message into a
	multipart/encrypted part.
	(try_inline_binhex): Convert an inline BinHex attachment into an
	application/mac-binhex40 part (which we currently don't deal
	with...)
	(try_uudecoding): Convert a uuencoded attachment to an
	application/octet-stream part.
	(handle_multipart_encrypted): Deal with RFC2015 MIME-encoded PGP
	encrypted messages. (From ndt.)

	* mail-display.c (mail_text_write, mail_error_write): New utility
	functions.

	* Makefile.am (evolution_mail_SOURCES): add mail-crypto.c

svn path=/trunk/; revision=4466
2000-08-02 02:56:48 +00:00
121d056d45 New function to create composer with sig file set.
2000-07-28  JP Rosevear  <jpr@arcavia.com>

	* e-msg-composer.c (e_msg_composer_new_with_sig_file): New
	function to create composer with sig file set.
	(e_msg_composer_get_sig_file): New function to get sig file
	(e_msg_composer_set_sig_file): New function to set sig file

2000-07-29  JP Rosevear  <jpr@arcavia.com>

	* mail-format.c (mail_generate_reply): Use new mail config stuff

	* component-factory.c (create_imap_storage): Use new mail config
	stuff
	(create_news_storage): ditto

	* evolution-mail.schemas: Gconf schema for evolution mail

	* mail-config-druid.glade: Gladification of config druid

	* mail-config.h: New header with config structs.

	* mail-config.c: Rewrite of GUI configuration tools to use
	new config structs.  Stores multiple identities and sources now.
	Still only uses the first one found.
	(mail_config_fetch): Returns MailConfig struct to caller
	for configuration queries.
	(mail_config): Renamed function to show mail config dialog.
	(mail_config_druid): Renamed function to show mail config druid.

	* mail-ops.c (create_msg_composer): Use
	e_msg_composer_new_with_sig_file and new config stuff
	(check_configured): Use new config stuff
	(fetch_mail): ditto
	(composer_send_cb): ditto

svn path=/trunk/; revision=4413
2000-07-29 06:04:24 +00:00
570714db1d Update for OAF and for external apps as well as components.
* mail-format.c (lookup_handler): Update for OAF and for external
	apps as well as components.
	(handle_via_external): Handler to set up for data that can be
	displayed by an external application.

	* mail-display.c (on_link_clicked, etc): Refactor the save_data()
	code and add launch_external() as a handler for
	x-evolution-external URLs.
	(embeddable_destroy_cb): Remove this, since it seems like it's all
	wrong.
	(on_object_requested): Update for OAF, and fix some bugs.

svn path=/trunk/; revision=4343
2000-07-26 04:13:42 +00:00
6746c025d5 put a <p> at the end of the header table. (I think there used to be
* mail-format.c (write_headers): put a <p> at the end of the
	header table. (I think there used to be whitespace after it, but
	then some gtkhtml change got rid of it...)
	(handle_text_plain): Don't do this <PRE>. Instead, CONVERT_NL and
	CONVERT_SPACES and wrap it in <TT>. Now if the sender didn't
	include any newlines, it will be wrapped to the width of the
	window instead of extending off into infinity.

svn path=/trunk/; revision=4168
2000-07-14 21:13:47 +00:00
c2f5cf9966 add "message/news" to the mime_function_table using the same handler as
2000-07-12  Chris Toshok  <toshok@helixcode.com>

	* mail-format.c (setup_function_table): add "message/news" to the
	mime_function_table using the same handler as message/rfc822.

svn path=/trunk/; revision=4122
2000-07-12 21:26:45 +00:00
2f2ff6d4cc Deal with having multiple selected messages.
* mail-ops.c (forward_msg): Deal with having multiple selected
	messages.

	* mail-format.c (mail_generate_forward): Removed. (Integrated into
	forward_msg)

svn path=/trunk/; revision=3982
2000-07-08 23:40:06 +00:00
53faeaabcc Use the gnomevfs sniff buffer interface to try to identify the MIME type
* mail-identify.c (mail_identify_mime_part): Use the gnomevfs
	sniff buffer interface to try to identify the MIME type when
	everything else fails.

	* mail-display.c (on_object_requested):
	* mail-format.c (lookup_handler, handle_undisplayable,
	handle_audio): s/gnome_mime/gnome_vfs_mime/

	* Makefile.am: Add gnomevfs stuff

svn path=/trunk/; revision=3893
2000-07-05 19:47:35 +00:00
70646faa9f add default subjects
* mail-format.c (mail_generate_forward): add default subjects

svn path=/trunk/; revision=3784
2000-06-29 03:18:39 +00:00
100bc92dd2 Get evolution-dir the right way in e-setup.h
svn path=/trunk/; revision=3675
2000-06-21 16:12:00 +00:00
8a77b2dfd8 Add missing declaration of `evolution_dir' to get it to compile.
svn path=/trunk/; revision=3645
2000-06-20 17:02:08 +00:00
f6ed66e592 add an option to prefer text/plain. (reply_body): add an option to prefer
* mail-format.c (find_preferred_alternative): add an option to
	prefer text/plain.
	(reply_body): add an option to prefer text/plain
	(mail_generate_reply): Check the mail sending preferences, and
	generate a text/plain reply if the user prefers to send plain text
	(and we have a text/plain part to generate a reply from).

svn path=/trunk/; revision=3641
2000-06-20 02:23:53 +00:00
0931d27d61 Fix the subject generation so we don't get "Re: Re:". This is working
* mail-format.c (mail_generate_reply): Fix the subject generation
	so we don't get "Re:  Re:". This is working around something that
	may later be declared a misfeature in Camel.

svn path=/trunk/; revision=3531
2000-06-12 18:55:20 +00:00
a5f9dc297a Redo things a bit so that whitespace-only text parts aren't displayed. (In
* mail-format.c: Redo things a bit so that whitespace-only
	text parts aren't displayed. (In particular, so that
	whitespace-only subparts of multipart/mixed aren't displayed as
	separate (empty) parts.)

svn path=/trunk/; revision=3488
2000-06-09 16:26:33 +00:00
4987ad9118 Update for new composer attachment interface.
* mail-format.c (mail_generate_forward): Update for new composer
	attachment interface.

svn path=/trunk/; revision=3431
2000-06-05 21:14:48 +00:00
5ab6198e11 Fix forwarding to work for people other than me. :) [Although apparently
* mail-format.c (mail_generate_forward): Fix forwarding to work
	for people other than me. :) [Although apparently it doesn't
	really.]

svn path=/trunk/; revision=3357
2000-06-02 01:08:25 +00:00
7057267267 use <blockquote> rather than <center><table border=1 width=95%> to frame
* mail-format.c (handle_message_rfc822): use <blockquote> rather
	than <center><table border=1 width=95%> to frame the embedded
	message. If <pre> text in the subtable won't fit in the 95% width,
	GtkHTML will write past the border of the table (and
	<blockquote><table border=1> causes creeping updates so it's not
	usable for now).

svn path=/trunk/; revision=3352
2000-06-02 00:20:30 +00:00
66f4e5ce1c Oops. This needs to take a message argument because we might be writing
* mail-format.c (write_headers): Oops. This needs to take a
	message argument because we might be writing headers for an
	embedded message/rfc822 subpart rather than the root document.

svn path=/trunk/; revision=3343
2000-06-01 22:35:07 +00:00
fdedf8998b Fix up memory management of x-evolution-data URLs so the URLs and/or their
* mail-format.c (free_url, handle_text_enriched,
	get_url_for_icon): Fix up memory management of x-evolution-data
	URLs so the URLs and/or their data don't get freed while there are
	still references to them.

	* message-list.c (message_list_init_header): redo the (unused)
	online status column to no longer refer to pixmaps that no longer
	exist.

svn path=/trunk/; revision=3320
2000-06-01 03:51:04 +00:00
74ff74bf9b Initialize the "urls" hash table stored on the message and store cid and
* mail-format.c (mail_format_mime_message): Initialize the "urls"
	hash table stored on the message and store cid and other URLs
	there rather than as object data on the message.
	(get_cid): rewrite this a bunch
	(handle_text_enriched): move the code from write_iframe_string()
	into here, since it's the only place that actually needs it.
	(handle_text_html): simplify this a lot. We can use a cid: URL
	here rather than x-evolution-data.
	(get_url_for_icon): New routine to return URLs for icons, and
	cache the results, so we don't have to keep re-reading the icon
	files (and so we can't be spoofed into reading non-icon files).
	(handle_mystery, handle_audio): use get_url_for_icon.

	* mail-display.c (save_data): move the CamelMimePart filename
	extracting code from get_cid to here.
	(on_link_clicked, on_object_requested): Update for cid: changes.
	(on_url_requested): Kill off the kludgy, exploitable x-gnome-icon
	URL schema, update cid and x-evolution-data to match
	mail-format.c.

	It should now be easier to implement RFC 2557 (Content-Location,
	etc), but that RFC still pretty much sucks.

svn path=/trunk/; revision=3314
2000-05-31 20:47:22 +00:00
ae15900672 Redo this back to the old way: a single GtkHTML with various things inline
* mail-format.c: Redo this back to the old way: a single GtkHTML
        with various things inline in it. (Gets rid of flicker, simplifies
        some scrolling, selecting, and printing issues.)
        (handle_text_enriched, handle_text_html): Use <iframe>s for these,
        to protect the rest of the document from their possibily invalid
        HTML.
        (handle_via_bonobo): Use (new-and-improved) <object> tags for
        this, moving most of the work back into mail-display.c

        * mail-display.c (on_object_requested): Move the Bonobo embedding
        code back here again (reorganized a bit).
        (on_url_requested): add x-evolution-data handler, for iframe
        bodies.
        (mail_html_new, mail_html_end): removed
        (mail_display_set_message, mail_display_new): Update for NWO.

svn path=/trunk/; revision=3312
2000-05-31 14:29:24 +00:00
fbd1a80e31 Use foo@bar' rather than <foo@bar>' for recipient with no name.
* mail-format.c (write_recipients_to_stream): Use `foo@bar' rather
	than `<foo@bar>' for recipient with no name.

svn path=/trunk/; revision=3247
2000-05-28 17:36:31 +00:00
b5f4615bac Various improvements:
* mail-format.c: Various improvements:

	(call_handler_function, etc): Add a "mime_type" argument to the
	handlers, so that if a part is tagged as
	"application/octet-stream", and we figure out that it's really
	something else, the handler we call can know what that something
	else is.

	(handle_text_enriched): Small fixes to make this not do
	text/enriched-specific syntax in text/richtext or vice versa.

	(handle_mystery): Allow for mystery data that can't even be saved
	to disk. (ie, unrecognized external-body). Let the caller specify
	the URL to use.

	(handle_message_external_body): New function to deal with
	message/external-body parts. Generates URLs for anon-ftp,
	local-file, and URL access-types, and a more-useful-than-before
	descriptive message for other types.

	(handle_audio, handle_undisplayable): Use gnome_mime_get_value to
	try to get a description of the MIME type to display to the user
	rather than the raw form. (This will only work if the user has
	recent gnome-vfs installed. [If they don't, it works just like
	it used to.])

svn path=/trunk/; revision=3234
2000-05-27 22:21:37 +00:00
bae01d4cd8 Fix a bug (security/stability) in its usage of mail_html_write.
* mail-format.c (handle_text_html): Fix a bug (security/stability)
	in its usage of mail_html_write.

svn path=/trunk/; revision=3227
2000-05-26 22:05:38 +00:00
8ad057518f Update for PersistStream changes
* mail-format.c (handle_via_bonobo): Update for PersistStream
	changes

svn path=/trunk/; revision=3216
2000-05-26 14:36:45 +00:00
0a232b36bf Updated for the GtkHTML API changes. Also fixed some compiler
warnings here and there.

svn path=/trunk/; revision=3145
2000-05-21 09:18:20 +00:00
ccd4d84234 Fixes for stream stuff.
2000-05-19  NotZed  <NotZed@HelixCode.com>

        * mail-format.c: Fixes for stream stuff.

        * mail-display.c (save_data_cb): Remove exception stuff on streams.

svn path=/trunk/; revision=3143
2000-05-19 19:59:06 +00:00
961fe94bb9 Use camel_data_wrapper_write_to_stream rather than
* mail-display.c (save_data_cb, save_data, on_url_requested):
	* mail-format.c (handle_text_plain_flowed, handle_text_html):
	Use camel_data_wrapper_write_to_stream rather than
	camel_data_wrapper_get_output_stream.

svn path=/trunk/; revision=3113
2000-05-18 01:03:00 +00:00
6d9053a6a4 Removed usage of bonobo_object_destroy.
2000-05-16  Christopher James Lahey  <clahey@helixcode.com>

	* mail-format.c: Removed usage of bonobo_object_destroy.

svn path=/trunk/; revision=3094
2000-05-16 18:23:38 +00:00