Commit Graph

288 Commits

Author SHA1 Message Date
0a9fdd8842 s/strncasecmp/g_strncasecmp
2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-display.c:
	* component-factory.c: s/strncasecmp/g_strncasecmp

	* 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=4575
2000-08-07 18:32:55 +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
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
8f6fcc14fb Fix bug #390: default attachment save dir should be ~
svn path=/trunk/; revision=4108
2000-07-12 15:11:52 +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
7ad9e59992 call mail_display_set_message with NULL if the message we tried to select
* message-list.c (select_msg): call mail_display_set_message with
	NULL if the message we tried to select doesn't exist (probably
	meaning we tried to selecte the first message and the folder is
	empty.)

	* mail-display.c (mail_display_set_message): deal with NULL as an
	input (meaning "undisplay previous message and display nothing").

svn path=/trunk/; revision=3879
2000-07-04 00:56:45 +00:00
86c38b418e if the document requests an unknown URL, it's not an error; just ignore
* mail-display.c (on_url_requested): if the document requests an
	unknown URL, it's not an error; just ignore the URL.

	* mail-ops.c (fetch_mail): If there's no new mail, tell the user.

svn path=/trunk/; revision=3574
2000-06-15 15:24:40 +00:00
746f1858b4 Make the mail folder browser use EScrollFrame for a nicer look.
svn path=/trunk/; revision=3328
2000-06-01 05:34:13 +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
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
9634ad0484 Call a kludge a kludge. (And an insecure kludge at that.)
svn path=/trunk/; revision=3000
2000-05-12 00:10:26 +00:00
38165888d2 Update for CamelStream CamelException changes.
* mail-display.c (save_data_cb):
	(on_url_requested): Update for CamelStream CamelException changes.

	* mail-format.c: Pass NULL for a CamelException in a bunch of
	places... the user will see that the data is not being displayed,
	and there's not a lot we can do, and none of these things should
	be failing anyway. Maybe fix this later.

svn path=/trunk/; revision=2925
2000-05-08 22:28:11 +00:00
2ef945c6e2 consolidate mail-format.h, mail-identify.h, mail-ops.h, main.h and
* mail.h: consolidate mail-format.h, mail-identify.h, mail-ops.h,
	main.h and session.h into this new file. There's no reason to have
	a .h for every .c.

svn path=/trunk/; revision=2830
2000-05-06 17:16:22 +00:00
5c3e0a6314 A hackish little quick-search entry. (search_activate): Perform a
2000-05-01  NotZed  <NotZed@HelixCode.com>

        * folder-browser.c (folder_browser_gui_init): A hackish little
        quick-search entry.
        (search_activate): Perform a quick-search on the folder subject
        only.

        * message-list.c (get_message_info): If there is an active search,
        then get the data from that ... use this instead of
        _get_message_info().
        (ml_row_count): If we have an active search, get the info from its
        result.
        (select_msg): Changed to use get_message_info, so searches work.
        (ml_value_at): And same here.

        * mail-display.c: Include missing errno.h.

svn path=/trunk/; revision=2724
2000-05-01 21:51:03 +00:00
d77a77c7e5 Handle clicks on "cid" URLs by popping up a "Save Attachment" dialog.
* mail-display.c (on_link_clicked): Handle clicks on "cid" URLs by
	popping up a "Save Attachment" dialog.

	* mail-format.c (get_cid): if the part has a Content-Disposition
	with a filename specified, record (a sanitized version of) that on
	the wrapper when creating the cid reference, so the "save
	attachment" code can use it later.
	(handle_mystery): fix a bug in the cid generation here.

svn path=/trunk/; revision=2685
2000-04-29 21:28:00 +00:00
6942830c98 Improve the builtin vs bonobo selection code. (handle_mystery): Include
* mail-format.c (lookup_handler, etc): Improve the builtin vs
	bonobo selection code.
	(handle_mystery): Include name and Content-Description in the
	"mystery data" info, when available
	(handle_unknown_type): Call mail_identify_mime_part before
	giving up.
	(handle_undisplayable): Split out of handle_unknown_type now
	that handle_unknown_type can try alternate viewers.
	(handle_via_bonobo): Fall back to handle_undisplayable if the
	bonobo control fails.

	* mail-identify.c (mail_identify_mime_part): New function to
	attempt to identify a MIME part that we can't identify based on
	Content-Type alone.

	* mail-display.c (on_url_requested): redo the mystery data icon
	display stuff less kludgily.

svn path=/trunk/; revision=2684
2000-04-29 19:17:46 +00:00
397a851038 Move text_to_html to e-util.
* mail-format.c: Move text_to_html to e-util.

	* mail-ops.c (send_to_url): New routine. Thin wrapper for
	e_msg_composer_new_from_url.

	* mail-display.c (on_link_clicked): print a warning for news or
	nntp URLs (which we'll deal with some day), and call send_to_url
	for mailto URLs.

svn path=/trunk/; revision=2664
2000-04-27 19:03:54 +00:00
67b29dfe36 Reorganize a bit and add a new flag, TEXT_TO_HTML_CONVERT_URLS to
* mail-format.c (text_to_html): Reorganize a bit and add a new
	flag, TEXT_TO_HTML_CONVERT_URLS to recognize and wrap URLs
	in text.

	* mail-display.c (mail_html_new): Add link_clicked signal handler.
	(on_link_clicked): Use gnome_url_show to launch a browser.

The Dingus has landed.

svn path=/trunk/; revision=2653
2000-04-27 03:32:10 +00:00
11ca787488 Now that we're not limited to a single GtkHTML for the display, there's no
* mail-format.c, mail-display.c: Now that we're not limited to
	a single GtkHTML for the display, there's no reason to embed
	Bonobo objects for unrecognized content-types in GtkHTML rather
	than embedded them into the vbox directly. So do that.

	Meanwhile, fix up the handler-selection code so that we can
	declare which built-in handlers are more desirable than external
	handlers and which are less. (Of course, eventually we'll want
	this to be customizable.) Add some cleverness to
	handle_multipart_alternative as well so it doesn't accept an
	alternative which we can display generically over one we can
	display specifically.

svn path=/trunk/; revision=2616
2000-04-25 23:00:52 +00:00
9713f20bc8 Redo large chunks of this. The mail display now consists of a vbox in a
* mail-display.c, mail-format.c: Redo large chunks of this. The
	mail display now consists of a vbox in a scrolled window, in which
	we put multiple GtkHTML objects. This means broken HTML in one
	part can't corrupt other parts. The headers now scroll with the
	body. Unrecognized attachments look prettier, but still don't do
	anything, and will probably be changed later. We can also now
	display nested message/rfc822 parts and multipart/alternatives
	with multipart subparts. Oh, and text/{richtext,enriched}, since
	we had all these ancient sample messages that use it and the lack
	of support annoyed me. :)

	Bonobo embeddables are broken right now, but I don't think that's
	my fault.

svn path=/trunk/; revision=2601
2000-04-25 14:59:08 +00:00
76160580a6 Change cid expectations to match current camel reality.
* mail-display.c (on_url_requested): Change cid expectations to
	match current camel reality.

svn path=/trunk/; revision=2558
2000-04-22 22:38:57 +00:00
8ff61b81c5 deal with cid: URLs. (find_cid): helper routine for above. (This could be
* mail-display.c (on_url_requested): deal with cid: URLs.
	(find_cid): helper routine for above. (This could be much better.)
	(mail_display_init): connect url_requested signal

	* mail-format.c (handle_multipart_related): Make this work.

svn path=/trunk/; revision=2542
2000-04-21 05:12:05 +00:00
dc1d13533c ref the message we display, since we're going to unref it when we remove
* mail-display.c (mail_display_set_message): ref the message we
	display, since we're going to unref it when we remove it. Fixes a
	bug that showed up with the new camel code, but it's not obvious
	if it's due to a bug or a feature in the new code.

svn path=/trunk/; revision=2541
2000-04-21 05:01:35 +00:00
61c60ece01 update for bonobo change, and remove a now-unused variable.
* mail-display.c: update for bonobo change, and remove a
	now-unused variable.

svn path=/trunk/; revision=2525
2000-04-20 17:32:25 +00:00
b172457252 Moved from camel/camel-formatter, and changed slightly. (More to come.)
2000-04-14  Dan Winship  <danw@helixcode.com>

	* mail-format.[ch]: Moved from camel/camel-formatter, and changed
	slightly. (More to come.)

	* html-stream.[ch]: No longer necessary. mail-format uses
	GtkHTMLStreamHandles directly.

	* mail-display.[ch]: update for new message formatting code.

svn path=/trunk/; revision=2438
2000-04-14 21:11:56 +00:00
bbc6d63ef0 Load the icons from the installation path, not form the GNOME-libs
2000-04-06  Miguel de Icaza  <miguel@gnu.org>

	* shell/e-shortcut.c (shell_icon_cb): Load the icons from the
	installation path, not form the GNOME-libs installation prefix.
	(shell_icon_cb): Memory leak fix.

	* shell/Makefile.am (imagesdir): Pass the EVOLUTION_IMAGES
	installation directory here.

	* art/Makefile.am (images_DATA): Renamed from pixmaps to images.

2000-04-06  Miguel de Icaza  <miguel@gnu.org>

	* message-list.c: Stick pixmaps here.

	* mail-display.c (embeddable_destroy_cb): Replaced C++ comments
	with C comments.

	* message-list.c (load_internal_images): New function, loads images.
	(message_list_init_renderers): Load images, fix previous attempt
	at loading images.

	* Makefile.am (dist-hook): Added distribution of pixmaps.

	* pixmaps: New directory, used to hold the XPMs we ship with.

	* pixmaps/envelope-closed.xpm, pixmaps/envelope-open.xpm: Tigert's
	envelopes incorporated.
2000-04-06  Miguel de Icaza  <miguel@gnu.org>

	* e-cell-text.c: Killed ARG_EDITABLE.
	(ect_event): Updated to new editable setup.
	(e_cell_text_new): Kill editable argument.

	* e-cell-toggle.c (etog_event): Handle editability here

	* e-cell-text.h: Removed editable bit field from here, it is now
	taken care at the e-cell level.

	* e-cell.c (e_cell_set_editable): New function.
	(e_cell_init): Set editable to TRUE by default.

	* test-check.c (check_test): update to new api

	* test-table.c (table_browser_test): ditto.
	(do_e_table_demo): ditto.

	* test-cols.c (multi_cols_test): ditto

svn path=/trunk/; revision=2302
2000-04-06 06:46:20 +00:00
bd46ea2926 quiet warnings when building in ../po
* mail-display.c: quiet warnings when building in ../po

svn path=/trunk/; revision=2204
2000-03-28 03:02:12 +00:00
c8ca65e286 Minor cleanup & commenting.
* mail-display.c: Minor cleanup & commenting.

	* folder-browser-factory.c: Minor cleanup & warning elimination.

svn path=/trunk/; revision=2134
2000-03-21 17:43:42 +00:00
975b6ef8bc Temporarily removed the calendar from the subdirs list. The compilation
03-21-2000 bertrand <bg@aful.org>

Temporarily removed the calendar from the subdirs list.
The compilation errors confuse people.

svn path=/trunk/; revision=2129
2000-03-21 08:54:06 +00:00
b380094567 once we have the bonobo control widget, disable the autoactivation and
2000-03-13  bertrand  <bertrand@helixcode.com>

	* shell/e-shell-view.c (get_view):
	once we have the bonobo control widget,
	disable the autoactivation and activate
	the control frame.

2000-03-12  bertrand  <bertrand@helixcode.com>

	* folder-browser-factory.c (folder_browser_factory_init):
	name change.
	(control_activate_cb): when the control is activated,
	it merges its own UI with the remote UIHandler.
	(control_add_menu): sample menu merging.
	(folder_browser_factory): connect the control "activate" signal.


(Bonobo control / shell view) UIMenu merging.

svn path=/trunk/; revision=2110
2000-03-13 05:04:31 +00:00
207a1395e1 plug mem leaks due to bad documentation of
2000-03-07  bertrand  <bertrand@helixcode.com>

	* camel-formatter.c (handle_mime_part):
	plug mem leaks due to bad documentation
	of camel_content_field_get_mime_type
	(print_camel_body_part): idem
	(handle_multipart_alternative): idem

	* gmime-content-field.c (gmime_content_field_get_mime_type):
	documentation fix.


	* camel-mime-part.c (my_finalize): unref the
	content_input_stream if any.

	* shell/e-shell-shortcut.c (shortcut_bar_item_selected):
	removed a test that prevented the standard menu
	to be shown.

svn path=/trunk/; revision=2089
2000-03-08 19:53:31 +00:00
c2a6758ac4 sync from laptop
svn path=/trunk/; revision=2077
2000-03-07 18:16:11 +00:00
7c164f12b9 More changes than a man can remember.
The UI works now.

svn path=/trunk/; revision=2074
2000-03-06 09:38:42 +00:00
5d268dc005 It compiles -miguel
svn path=/trunk/; revision=1630
2000-01-25 10:58:55 +00:00
670f57583d More work
svn path=/trunk/; revision=1628
2000-01-25 08:43:24 +00:00