2002-02-26 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (handle_text_html): Get the Content-Base if the
header exists and use gtk_html_set_base to set this base url.
* mail-display.c (on_link_clicked): No longer need to calculate
the full url. This is now handled by GtkHTML.
(on_set_base): Removed.
(on_url_requested): No longer need to calculate the full url.
(mail_display_initialize_gtkhtml): Don't connect to the set_base
signal anymore. We don't care.
* mail-display.h: No longer need base_url (it was broken anyway).
svn path=/trunk/; revision=15850
2002-02-26 Not Zed <NotZed@Ximian.com>
* mail-display.c (on_url_requested): If a related part is
requested, remove it from the related undisplayed list.
* mail-format.c (handle_multipart_related): Check if related parts
are displayed, if not, remove them. For #2741.
svn path=/trunk/; revision=15837
2002-02-06 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (handle_text_plain): Look for DOCTYPE XML comments
too to decide if the message content is really HTML.
svn path=/trunk/; revision=15581
2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (handle_text_plain): If the first "token" in the
body is "<html>", then treat this as a text/html part rather than
a text/plain part. Fixes bug #16817.
* component-factory.c (destination_folder_handle_drop): Removed
some unused variables.
svn path=/trunk/; revision=15420
2002-01-17 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (try_uudecoding): Update to match new uudecode
interface (ie, no longer need a uulen state variable).
svn path=/trunk/; revision=15350
2001-12-17 Jon Trowbridge <trow@ximian.com>
* mail-format.c (handle_text_plain_flowed): Set citation color to
black when we are printing.
svn path=/trunk/; revision=15140
2001-12-17 Jon Trowbridge <trow@ximian.com>
* mail-format.c (attachment_header): Avoid embedding <object> tags
when we are printing.
(handle_multipart_signed): Don't do the click-for-info signature
stuff when we are printing.
(handle_via_bonobo): Don't embed an <object> tag if we are
printing.
* folder-browser.c: Changed context_menu[] array so that we can
print when the preview pane is closed.
svn path=/trunk/; revision=15139
2001-12-12 Jeffrey Stedfast <fejJ@ximian.com>
* mail-config.c (mail_config_check_service): Connect to the
destroy signal on the popup dialog.
2001-12-12 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (handle_text_plain): Make sure i != num_specials
after we check for any special text markers. Fixes bug #12265.
svn path=/trunk/; revision=15085
2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (try_inline_pgp):
(try_inline_pgp_sig): Start reiplementing The Right Way and not
danw's fucking half-assed kludge that doesn't work.
svn path=/trunk/; revision=15076
2001-12-11 Jon Trowbridge <trow@ximian.com>
* mail-identify.c (mail_identify_mime_part): Fixed for
mail_content_loaded's new signature.
* mail-format.c (attachment_header): Don't convert URLs, etc. if
we are printing.
(write_address): Don't convert addresses to mailto: links if we
are printing.
(write_one_text_plain_chunk): Add a printing flag, that we pass
along to mail_text_write.
(handle_text_plain): Pass our printing flag to
write_one_text_plain_chunk.
(mail_get_message_rfc822): Don't unneccesarily convert URLs.
(mail_content_loaded): Add a GtkHTML parameter.
* mail-display.c (mail_display_initialize_gtkhtml): Added. Breaks
all of the signal hookups out of mail_display_new.
(mail_display_new): Call mail_display_initialize_gtkhtml.
(mail_text_write): Don't convert URLs, etc., if we are printing.
Lots of other changes to pass around GtkHTML/GtkHTMLStream objects.
* mail-callbacks.c (do_mail_print): Call
mail_display_initialize_gtkhtml on our GtkHTML object.
* folder-browser.c (update_status_bar): Make the status bar more
useful when you have a large number of hidden messages.
svn path=/trunk/; revision=14997
2001-12-11 Jon Trowbridge <trow@ximian.com>
* message-list.etspec: Add ETable magic for our new "Needs Reply"
column. (The next few entries are for bug #90)
* message-list.h: Add COL_NEED_REPLY.
* message-list.c: Move mail_need_reply_xpm to the end of
states_pixmaps.
(ml_duplicate_value): Handle COL_NEED_REPLY.
(ml_free_value): Handle COL_NEED_REPLY.
(ml_initialize_value): Handle COL_NEED_REPLY.
(ml_value_is_empty): Handle COL_NEED_REPLY. Added
needs_reply_map[] array.
(ml_value_to_string): Handle COL_NEED_REPLY.
(ml_tree_value_at): Fix magic numbers, undoing my changes from the
otehr day. Add handler for COL_NEED_REPLY.
(message_list_create_extras): Attach icons for COL_NEED_REPLY.
(on_click): Undo my previous changes to display need-reply status
in COL_MESSAGE_STATUS. Add handing for COL_NEED_REPLY.
* mail.h: Change mail_format_mime_message, mail_format_raw_message
and the MailMimeHandlerFn typedef to take GtkHTML and
GtkHTMLStream args, as per our changes in mail-format.c.
* mail-format.c: Giant refactoring. Remove the assumption
throughout that we will always want to render into the GtkHTML
object contained in the MailDisplay. Instead, always pass in the
GtkHTML and GtkHTMLStream that we want to write to. Also, ignore
theme work-arounds if the printing flag is set. (This and what
follows fixes bug #82)
* mail-display.h: Remove GtkHTMLStream *stream from MailDisplay.
We don't need it anymore.
* mail-display.c (mail_display_render): Added. Breaks the code
that renders the message into the GtkHTML object out of
mail_display_redisplay.
(mail_display_redisplay): Call mail_display_render.
(mail_display_init): Remove reference to ->stream.
(mail_display_new): Remove reference to ->stream.
* mail-callbacks.c (do_mail_print): Create a new GtkHTML to render
our printed version into (via the new function
mail_display_render. Set the MailDisplay's printing flag to TRUE
before we render, and set it back to FALSE afterwards.
(do_mail_fetch_and_print): If the preview pane isn't open when we
try to print, fetch the message before printing.
(print_msg): Call do_mail_fetch_and_print.
(print_preview_msg): Call do_mail_fetch_and_print.
* folder-browser-ui.c: Remove "PrintMessage" and
"PrintPreviewMessage" from message_pane_enables... these now work
when the preview pane is closed. Disable printing if multiple
messages are selected.
svn path=/trunk/; revision=14981
2001-11-27 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (format_mime_part): Reverted the non-NULL
mime-type patch from a little while back, didn't mean to commit
this.
svn path=/trunk/; revision=14798
2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
* message-list.c (message_list_hide_clear): Save hide state.
(message_list_hide_uids): Save hide state.
(message_list_hide_add): Save hide state.
* mail-format.c (format_mime_part): Make sure the mime-type is
non-NULL before passing it off to mail_lookup_handler().
svn path=/trunk/; revision=14734
2001-11-01 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.h (mail_html_write): Renamed from
mail_html_write_string.
* mail-display.c (mail_text_write): Don't bother with varargs
since nothing used them, we were only passing strings anyway...
(mail_error_printf): Renamed from mail_error_write, this makes
more sense.
(mail_html_write): Removed.
* mail-format.c: Updated to use gtk_html_stream_printf directly
and s/mail_html_write_string/mail_html_write.
(mail_lookup_handler): Don't use %.*s here either...
(handle_text_enriched): Same.
(write_one_text_plain_chunk): And finally here (also update for
new mail_text_write api).
(handle_multipart_signed): Update for new mail_text_write api.
(format_mime_part): Update for new mail_error_text/printf name
change.
(handle_multipart_encrypted): Same.
* mail-tools.c (mail_tool_generate_forward_subject): Same as
mail_generate_reply.
* mail-callbacks.c (mail_generate_reply): Don't use %.*s in any
*printf* functions.
svn path=/trunk/; revision=14590
* mail-format.c (handle_multipart_signed): Write out the url
before callind add_url since add_url may free it. Fixes#13839.
Remove debug printf.
* mail-display.c (on_object_requested): Remove debug printf.
svn path=/trunk/; revision=14564
2001-10-30 <NotZed@Ximian.com>
* mail-mt.c: Added exception strings to some of the op logging.
* mail-format.c (elide_quotes): Remove, uh, what was this for, its
not used anywhere? Also loops the instant it had a ", good one
trow! :)
(write_address): Remove name_arg/email_arg, these aren't used
anywhere.
svn path=/trunk/; revision=14482
* mail-format.c (handle_multipart_signed): add some debug spew re
13839.
* mail-display.c (on_object_requested): here too
svn path=/trunk/; revision=14404
2001-10-28 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (try_inline_pgp): Check that the special PGP lines
begin and end with \n so as to avoid matching against quoted PGP
lines.
svn path=/trunk/; revision=14310
2001-10-27 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (mail_format_get_data_wrapper_text): Allow the
user to shoot him/herself in the foot when overriding message
charsets. Permanantly fixes bug #921.
svn path=/trunk/; revision=14240
2001-10-24 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (mail_get_message_body): Fix to not always return
NULL for html parts, doh!.
svn path=/trunk/; revision=14081
2001-10-22 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.h (mail_html_write_string): New fun macro.
* mail-format.c (write_one_text_plain_chunk): Use gtk_html_write
instead of mail_html_write so we avoid strdup'ing the text.
(handle_text_plain_flowed): Use the mail_html_write_string macro.
(handle_message_rfc822): Here too.
(mail_format_raw_message): We can do it here also...
(attachment_header): We can do it a little bit here...
(write_address): A microscopic bit here...
(write_hr): same.
svn path=/trunk/; revision=13925
2001-10-22 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (format_mime_part): Don't wrap error text with
<blockquote>, this is done inside mail_error_write.
(handle_multipart_encrypted): If we get an exception trying to
decrypt the mime part, display an error rather than trying to
treat it as multipart/mixed.
* mail-callbacks.c (empty_trash): Confirm expunge.
svn path=/trunk/; revision=13893
* mail-format.c (handle_application_pgp): Remove this unused
hack.
(mail_format_mime_message): Initialize a fourth hash table, used
to keep track of fake MIME parts.
(mail_part_set_default_displayed_inline): New routine to set the
default disposition of a part (doesn't change it if the user has
already overridden it).
(format_mime_part): Wrap a blockquote around the error text (moved
here from mail_error_write since it doesn't apply in other cases).
(write_hr): Write a <hr> with appropriate padding between MIME
parts.
(write_one_text_plain_chunk): Write some plain text with
appropriate margins.
(handle_text_plain): Use write_one_text_plain_chunk. Update for
inline specials handler API change.
(fake_mime_part_from_data): Use the "fake_parts" hash to avoid
recreating the same fake parts again if the message is
redisplayed. Lets you toggle the shown/hiddenness of uudecode
parts, and do the new pgp verification thing for inline pgp
signatures.
(try_inline_pgp): Don't do any actual PGP handling here: Just
rewrite as a multipart/encrypted.
(try_inline_pgp_sig): Likewise, just do a multipart/signed (with
the x-inline-pgp-hack parameter set).
(try_uudecoding, try_inline_binhex): Update for API changes.
(handle_multipart_signed): Exciting and new. Use <object> to
create a button which the user must click to do the
verification. Change the formatting of the gpg output text a bit.
* mail-display.c (on_link_clicked): Remove x-evolution-decode-pgp
hack, which is no longer used.
(pixbuf_gen_idle): Add a hack for the PGP verification button.
(do_attachment_header, do_external_viewer): Split out of
on_object_requeested for clarity.
(do_signature): New routine to do the PGP verification button.
(on_object_requested): Now just dispatches to
do_attachment_header, do_external_viewer, or do_signature.
(mail_error_write): Don't do <blockquote> here. Fixed the problem
that was trying to fix elsewhere.
svn path=/trunk/; revision=13888
2001-10-21 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c (on_url_requested): Use
mail_format_get_data_wrapper_text for text parts so we get free
charset conversion.
* mail-format.c (mail_format_get_data_wrapper_text): Renamed from
get_data_wrapper_text and now returns a GByteArray.
(handle_text_plain): Updated to use the new get_data_wrapper_text.
(handle_application_pgp): Same. Wow...also fixed a mem leak and
made a bit more efficient by doing so.
(handle_text_enriched): Here too. Also use string->len instead of
strlen (string->str).
(mail_format_raw_message): Same.
svn path=/trunk/; revision=13862
2001-10-21 <NotZed@Ximian.com>
* mail-vfolder.c (mail_vfolder_shutdown): Clear variables once
done, for debugging.
(mail_vfolder_add_uri, mail_vfolder_delete_uri): Dont do anything
if we're shutdown (context == NULL).
* component-factory.c (idle_quit): Move mail_vfolder_shutdown
here, it should be one of the last things shutdown.
* mail-format.c (handle_text_plain): Dont use (if (!p++), and then
check p!= later, since its now 1, oops. Fixes#13106, thought it
was a start of uuencoded stuff!
* folder-browser.c (on_right_click): Escape _'s before adding them
to menu from mailing list name, also remove some dead code that
someone forgot to remove when refactoring. #11307.
(folder_browser_is_drafts): Use the store's uri_cmp function to
compare to the drafts uri's.
(folder_browser_is_sent): Same. Slight cleanup for #11351.
svn path=/trunk/; revision=13856
2001-10-11 <NotZed@Ximian.com>
* local-config.glade: Added a checkbox for body indexing.
* mail-local.c (mail_local_reconfigure_folder): Get index_body
widget.
(mail_local_folder_reconfigure): Add an 'index_body' argument &
implement. Dont do anything if nothing changed.
* openpgp-utils.c (openpgp_verify): Use e_iconv_open.
svn path=/trunk/; revision=13603
2001-10-09 Jeffrey Stedfast <fejj@ximian.com>
* folder-browser-ui.c (folder_browser_ui_add_message): Create a
chaqrset picker submenu in the View menu.
* mail-format.c (mail_format_raw_message): Pass the mail-display
to get_data_wrapper_text.
(get_data_wrapper_text): Use the user's override charset if one is
provided, otherwise user the user's default charset.
(handle_text_plain): Pass along the mail-display to
get_data_wrapper_text.
(handle_application_pgp): Same.
(handle_text_enriched): Here too.
(mail_get_message_body): Pass NULL as the mail-display to
get_data_wrapper_text since we don't have access to a
mail-display.
* mail-display.c (mail_display_set_charset): New function to set a
charset on the maildisplay. Once set, the message is redisplayed
using the new charset.
(mail_display_destroy): Free the charset.
* folder-browser.c (folder_browser_charset_changed): New callback
for when a user overrides the message charset.
svn path=/trunk/; revision=13530
2001-10-08 Jon Trowbridge <trow@gnu.org>
* mail-format.c (write_default_header): Write out the Bcc: header
when applicable. Fixes bug #5823.
svn path=/trunk/; revision=13508
2001-10-05 Jon Trowbridge <trow@ximian.com>
* mail-config.glade: Add toggle button to config menu to turn the
"confirm sending unwanted HTML" dialog on/off. (Bug 10794)
* mail-accounts.c (construct): Make said toggle button actually
work.
svn path=/trunk/; revision=13466
* mail-format.c (write_address): Fix so that an email address with
no name is once again just "foo@bar.com", not "<foo@bar.com>".
svn path=/trunk/; revision=13423
2001-10-03 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (mail_write_authenticity): Don't use the wax-seal
icons for the pgp stuff anymore, use Jimmac's new icons instead.
svn path=/trunk/; revision=13383
* mail-format.c (get_data_wrapper_text): Deal with
camel_mime_filter_charset_new_convert returning NULL. (Every other
call to it does, and something's wrong with iconv on the Sun right
now so it keeps failing.)
svn path=/trunk/; revision=13214
2001-09-26 Jon Trowbridge <trow@ximian.com>
* mail-format.c (write_address): Use camel_address_format,
not camel_address_encode.
svn path=/trunk/; revision=13174
2001-09-26 Jon Trowbridge <trow@ximian.com>
* mail-display.c (html_button_press_event): Decode our URL before
extracting the address to pop up contact info.
* mail-format.c (write_address): When writing out a mailto: link,
make sure we construct a valid URL w/ correct encoding. Make sure
our address is properly quoted, if necessary.
svn path=/trunk/; revision=13160
2001-09-25 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (decode_pgp): Update to not send the
remember-passphrase option to the context, it doesn't need it
anymore.
(try_inline_pgp_sig): Same.
* mail-accounts.c (construct): The remember-passphrase option is
no longer there. This can now be set on the passphrase prompt
dialog.
(construct): Add confirm expunge options.
* mail-config.c (config_read): We no longer read-in the
remember-passphrase state because we no longer need it.
(mail_config_write_on_exit): We no longer save it either.
(mail_config_get_remember_pgp_passphrase): Removed.
(mail_config_set_remember_pgp_passphrase): Removed.
* mail-crypto.c (mail_crypto_pgp_mime_part_sign): No longer do we
need to send the remember passphrase state to the pgp context.
(mail_crypto_pgp_mime_part_verify): Same.
(mail_crypto_pgp_mime_part_encrypt): Here too.
(mail_crypto_pgp_mime_part_decrypt): And here.
svn path=/trunk/; revision=13139
2001-09-25 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (get_data_wrapper_text): If the data wrapper
contains raw text, treat the contents as if they were in the
user's default charset and convert them to UTF-8.
svn path=/trunk/; revision=13119
2001-09-24 <NotZed@Ximian.com>
* mail-local.c (mls_get_folder): Removed unused variables.
* component-factory.c (storage_create_folder): Remove unused
variable.
* mail-format.c (write_default_header): Used to write a header
that we know about/normally print. Use a static header table to
index these.
(write_header): removed.
(default_header_index): Return the index of the default header.
(write_headers): Changed the way it writes headers a bit. Use
write_default_header or write_text_header directly. Also try and
use the header charset as a fallback if the header can't be
decoded using the locale charset.
svn path=/trunk/; revision=13097
* mail-format.c (mail_format_raw_message): Call
mail_content_loaded here rather than blocking if the message data
isn't available.
svn path=/trunk/; revision=12949
2001-09-13 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (try_inline_pgp_sig): Make sure that the
charset_filter is non-NULL before using it since iconv may fail.
svn path=/trunk/; revision=12801