aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-format.c
Commit message (Collapse)AuthorAgeFilesLines
* Handle digest: urls.Jeffrey Stedfast2002-03-131-0/+21
| | | | | | | | | | | 2002-03-12 Jeffrey Stedfast <fejj@ximian.com> * mail-display.c (on_link_clicked): Handle digest: urls. * mail-format.c (setup_mime_tables): Add a handler for multipart/digest. (handle_multipart_digest): Handle multipart/digest parts. svn path=/trunk/; revision=16133
* merge new signature handlingRadek Doulik2002-03-071-1/+2
| | | | svn path=/trunk/; revision=15960
* Get the Content-Base if the header exists and use gtk_html_set_base to setJeffrey Stedfast2002-02-271-1/+18
| | | | | | | | | | | | | | | | | | 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
* If a related part is requested, remove it from the related undisplayedNot Zed2002-02-261-4/+32
| | | | | | | | | | | | 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
* Look for DOCTYPE XML comments too to decide if the message content isJeffrey Stedfast2002-02-071-1/+1
| | | | | | | | | 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
* print quoted text in italicRadek Doulik2002-01-311-6/+5
| | | | | | | | | 2002-01-30 Radek Doulik <rodo@ximian.com> * mail-format.c (handle_text_plain_flowed): print quoted text in italic svn path=/trunk/; revision=15530
* If the first "token" in the body is "<html>", then treat this as aJeffrey Stedfast2002-01-221-0/+9
| | | | | | | | | | | | | 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
* Update to match new uudecode interface (ie, no longer need a uulen stateJeffrey Stedfast2002-01-181-3/+3
| | | | | | | | | 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
* Set citation color to black when we are printing.Jon Trowbridge2001-12-181-0/+4
| | | | | | | | | 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
* Avoid embedding <object> tags when we are printing.Jon Trowbridge2001-12-181-12/+21
| | | | | | | | | | | | | | | | 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
* Connect to the destroy signal on the popup dialog.Jeffrey Stedfast2001-12-151-3/+4
| | | | | | | | | | | | | | 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
* Start reiplementing The Right Way and not danw's fucking half-assed kludgeJeffrey Stedfast2001-12-151-95/+2
| | | | | | | | | | 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
* Fixed for mail_content_loaded's new signature.Jon Trowbridge2001-12-121-26/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add ETable magic for our new "Needs Reply" column. (The next few entriesJon Trowbridge2001-12-121-151/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Reverted the non-NULL mime-type patch from a little while back, didn'tJeffrey Stedfast2001-11-281-6/+2
| | | | | | | | | | 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
* Save hide state. (message_list_hide_uids): Save hide state.Jeffrey Stedfast2001-11-171-5/+9
| | | | | | | | | | | | | 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
* Add a "x-inline-pgp-hack=true" paramter to the multipart's content-type.Jeffrey Stedfast2001-11-081-1/+2
| | | | | | | | | 2001-11-07 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (try_inline_pgp): Add a "x-inline-pgp-hack=true" paramter to the multipart's content-type. svn path=/trunk/; revision=14619
* Renamed from mail_html_write_string.Jeffrey Stedfast2001-11-061-130/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Write out the url before callind add_url since add_url may free it. FixesDan Winship2001-11-021-2/+1
| | | | | | | | | | * 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
* Make this work again.Dan Winship2001-11-011-1/+0
| | | | | | * mail-format.c (try_inline_pgp_sig): Make this work again. svn path=/trunk/; revision=14545
* Added exception strings to some of the op logging.02001-10-311-21/+0
| | | | | | | | | | | | | | 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
* Require gal 0.15.99.8Joe Shaw2001-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-10-29 Joe Shaw <joe@ximian.com> * configure.in: Require gal 0.15.99.8 * addressbook/backend/ebook/e-card-simple.c, addressbook/gui/component/addressbook-storage.c, addressbook/gui/widgets/e-addressbook-view.c, calendar/gui/e-calendar-table.c, calendar/gui/e-itip-control.c, calendar/gui/e-meeting-model.c, calendar/gui/itip-utils.c, calendar/gui/print.c, calendar/gui/alarm-notify/alarm-notify-dialog.c, filter/rule-editor.c, mail/mail-config.c, mail/mail-folder-cache.c, mail/mail-format.c, mail/mail-local.c, mail/mail-ops.c, mail/mail-vfolder.c, shell/e-local-storage.c, shell/e-summary-storage.c: Change includes of e-util/e-unicode-i18n.h to gal/util/e-unicode-i18n.h svn path=/trunk/; revision=14427
* add some debug spew re 13839.Dan Winship2001-10-301-0/+1
| | | | | | | | | * 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
* Check that the special PGP lines begin and end with \n so as to avoidJeffrey Stedfast2001-10-291-17/+15
| | | | | | | | | | 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
* Allow the user to shoot him/herself in the foot when overriding messageJeffrey Stedfast2001-10-281-1/+24
| | | | | | | | | | 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
* More fixing of the license texts.Ettore Perazzoli2001-10-281-11/+11
| | | | svn path=/trunk/; revision=14217
* oops, minor fixity fix.Jeffrey Stedfast2001-10-251-3/+6
| | | | svn path=/trunk/; revision=14082
* Fix to not always return NULL for html parts, doh!.Jeffrey Stedfast2001-10-251-10/+9
| | | | | | | | | 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
* Oops, revert my change to this function.Jeffrey Stedfast2001-10-231-1/+1
| | | | | | | | | 2001-10-22 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (write_one_text_plain_chunk): Oops, revert my change to this function. svn path=/trunk/; revision=13930
* New fun macro.Jeffrey Stedfast2001-10-231-58/+59
| | | | | | | | | | | | | | | | | 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
* Don't wrap error text with <blockquote>, this is done insideJeffrey Stedfast2001-10-231-27/+30
| | | | | | | | | | | | | | 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
* PGP verification UI changes to make it not HTML spoofable.Dan Winship2001-10-231-366/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Use mail_format_get_data_wrapper_text for text parts so we get freeJeffrey Stedfast2001-10-221-44/+61
| | | | | | | | | | | | | | | | | | | 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
* Clear variables once done, for debugging. (mail_vfolder_add_uri,12001-10-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make Reply-To bold too since no one ever figures out why it's notDan Winship2001-10-181-1/+1
| | | | | | | * mail-format.c (write_default_header): Make Reply-To bold too since no one ever figures out why it's not currently. svn path=/trunk/; revision=13723
* Added a checkbox for body indexing.12001-10-121-1/+2
| | | | | | | | | | | | | | | 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
* Create a chaqrset picker submenu in the View menu.Jeffrey Stedfast2001-10-101-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Write out the Bcc: header when applicable. Fixes bug #5823.Jon Trowbridge2001-10-091-2/+6
| | | | | | | | | 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
* Convert the htmlinfo into utf8. Fixes bug #11966.Jeffrey Stedfast2001-10-091-5/+6
| | | | | | | | | 2001-10-08 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (attachment_header): Convert the htmlinfo into utf8. Fixes bug #11966. svn path=/trunk/; revision=13506
* Add toggle button to config menu to turn the "confirm sending unwantedJon Trowbridge2001-10-061-0/+1
| | | | | | | | | | | | 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
* Fix so that an email address with no name is once again justDan Winship2001-10-051-6/+9
| | | | | | | * 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
* Don't use the wax-seal icons for the pgp stuff anymore, use Jimmac's newJeffrey Stedfast2001-10-041-2/+2
| | | | | | | | | 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
* Deal with camel_mime_filter_charset_new_convert returning NULL. (EveryDan Winship2001-09-281-2/+4
| | | | | | | | | * 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
* Use camel_address_format, not camel_address_encode.Jon Trowbridge2001-09-271-2/+2
| | | | | | | | | 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
* Decode our URL before extracting the address to pop up contact info.Jon Trowbridge2001-09-271-14/+18
| | | | | | | | | | | | | 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
* Update to not send the remember-passphrase option to the context, itJeffrey Stedfast2001-09-261-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* If the data wrapper contains raw text, treat the contents as if they wereJeffrey Stedfast2001-09-261-1/+17
| | | | | | | | | | 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
* Removed unused variables.42001-09-251-38/+63
| | | | | | | | | | | | | | | | | | | | | 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
* Make a neater error reportIain Holmes2001-09-211-1/+1
| | | | svn path=/trunk/; revision=13016
* Call mail_content_loaded here rather than blocking if the message dataDan Winship2001-09-191-0/+4
| | | | | | | | * 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
* Make sure that the charset_filter is non-NULL before using it since iconvJeffrey Stedfast2001-09-141-2/+5
| | | | | | | | | 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
* kill off some warningsJeffrey Stedfast2001-09-081-2/+1
| | | | svn path=/trunk/; revision=12697
* Give the full path of the wax-seal icons. (try_inline_pgp_sig): ConvertJeffrey Stedfast2001-09-081-22/+41
| | | | | | | | | | | | | | | | 2001-09-07 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (mail_write_authenticity): Give the full path of the wax-seal icons. (try_inline_pgp_sig): Convert the charset from UTF-8 to whatever charset it should be. Now takes a CamelMimePart argument as well. (try_uudecoding): Now takes a part argument as well. (try_inline_pgp): Here too. (try_binhex): And finally here. (handle_text_plain): Pass along the mime part to the try_* functions. svn path=/trunk/; revision=12688
* Give the full path of the wax-seal icons.Jeffrey Stedfast2001-09-081-2/+2
| | | | | | | | | 2001-09-07 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (mail_write_authenticity): Give the full path of the wax-seal icons. svn path=/trunk/; revision=12684
* Fix a bunch of replying/forwarding-related formatting bugs.Dan Winship2001-09-071-44/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2749 - Message text not included in reply, but html attachment is 4294 - "forward inline" should quote the same headers as the normal mail display 6100 - Reply to a forwarded email displays email headers 7255 - Replying to HTML message 7527 - replying to forwarded message w/ attachments does the wrong thing * mail-format.c (mail_get_message_rfc822): New function to get message headers and body together, for inline forwards, or replies containing attached messages. (mail_get_message_body): Redo this to always return HTML, but keep the "want_plain" flag, to decide whether to return HTML that looks like HTML or HTML that looks like plain text. Use mail_get_message_rfc822 to handle attached message/rfc822 parts. Don't include the text of vcard or icalendar attachments. Don't fail to include text parts just because we found an HTML part. (Since we're always returning HTML now, this doesn't cause problems any more.) * mail-tools.c (mail_tool_quote_message): Simplify greatly. mail_get_message_body always returns HTML now, and we let it take care of prepending "> "s too. We then let GtkHTML deal with converting the HTML to plain text if the user wants to reply in plain text. (mail_tool_forward_message): Simplify this a ton too: parts of it are moved into mail_get_message_rfc822 and parts are now unnecessary. * mail-callbacks.c (do_forward_non_attached): Call mail_tool_forward_message here always, and let it do the "> " quoting in the "quoted" case, so that we get the headers too when forwarding quoted. Related to bug #4294. svn path=/trunk/; revision=12657
* This patch should avoid flashing when loading images into mail view, creditsRadek Doulik2001-09-061-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | go to Dan, Larry and me ;) (fixes ximian #6680) 2001-09-06 Radek Doulik <rodo@ximian.com> * everywhere updated for new mail_content_loaded definition (prototype) 2001-09-05 Radek Doulik <rodo@ximian.com> * mail-display.c (mail_display_redisplay): increase redisplay_counter (try_part_urls): new helper function (try_data_urls): ditto (load_content_loaded): if it has stream handle available and if it's still valid, it writes to this stream instead of redisplaying, uses try_part_urls and try_data_urls * mail-display.h: added redisplay_counter to MailDisplay, I use it in load_content_loaded to be sure that there wasn't any redisplay and that remembered handle is still valid * mail-display.c (on_url_requested): don't end stream with error if part is not loaded yet (on_url_requested): don't end stream in cases when we are going to load image using http (stream_write_or_redisplay_when_loaded): new helper function, which is extracted from mail_display_redisplay_when_loaded. it's extended to handle gtkhtml stream writting (mail_display_redisplay_when_loaded): use stream_write_or_redisplay_when_loaded (mail_display_stream_write_when_loaded): new function, uses stream_write_or_redisplay_when_loaded struct _load_content_msg: added handle, url and redisplay_counter fields * mail-format.c (mail_content_loaded): added redisplay, url and handle parameter for case when we are loading image content and want it write to stream instead of redisplaying svn path=/trunk/; revision=12633
* Fixed a memory leak. (message_browser_new): Added a comment as to why ,Jeffrey Stedfast2001-08-311-2/+2
| | | | | | | | | | | | | 2001-08-30 Jeffrey Stedfast <fejj@ximian.com> * message-browser.c (message_browser_message_loaded): Fixed a memory leak. (message_browser_new): Added a comment as to why , after reparenting, we do not unref the mail_display. (message_browser_destroy): Don't call gtk_widget_destroy() on the message_list here. svn path=/trunk/; revision=12531
* We want wax-seal.png instead, since I added the png files to cvs andJeffrey Stedfast2001-08-181-1/+1
| | | | | | | | | | 2001-08-17 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (mail_write_authenticity): We want wax-seal.png instead, since I added the png files to cvs and renamed it to wax-seal.png. svn path=/trunk/; revision=12180
* oops, s/#ifdef/#endifJeffrey Stedfast2001-08-051-1/+1
| | | | svn path=/trunk/; revision=11654
* Add yet another special-case hack for application/pgp.Jeffrey Stedfast2001-08-051-5/+21
| | | | | | | | | 2001-08-04 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (mail_part_is_inline): Add yet another special-case hack for application/pgp. svn path=/trunk/; revision=11652
* Try to restore the choice the user had chosen before hitting the "CheckJeffrey Stedfast2001-08-041-2/+1
| | | | | | | | | | | | | 2001-08-03 Jeffrey Stedfast <fejj@ximian.com> * mail-account-gui.c (build_auth_menu): Try to restore the choice the user had chosen before hitting the "Check Supported Types" button. * mail-format.c (write_headers): Removed a no-longer-needed g_warning. svn path=/trunk/; revision=11625
* When writing out a CamelException to the HTML stream, be sure to translateJeffrey Stedfast2001-07-311-117/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-30 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (decode_pgp): When writing out a CamelException to the HTML stream, be sure to translate it first. (handle_message_external_body): Convert to UTF8 here too - I know this function is basically a dead end right now but eventually we will want to do something. I mostly did this because param values are UTF8 encoded so we should avoid mixing and matching UTF with non UTF8. (format_mime_part): Avoid writing non-UTF8 to the HTML stream. * mail-tools.c (mail_tool_make_message_attachment): Convert translated strings to UTF8 here too. (mail_tool_forward_message): Here too. 2001-07-23 Zbigniew Chyla <cyba@gnome.pl> * mail-format.c (attachment_header, write_address, decode_pgp, mail_write_authenticity): Convert translated strings to UTF8 before calling mail_html_write. I modified the patch slightly and cleaned up bits of code around it as well. For example, we probably want to avoid having HTML tags in the strings to be translated. -- fejj svn path=/trunk/; revision=11490
* Implemented. (setup_mime_tables): Setup the application/pgp handler to useJeffrey Stedfast2001-07-271-10/+71
| | | | | | | | | | | | 2001-07-26 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (handle_application_pgp): Implemented. (setup_mime_tables): Setup the application/pgp handler to use handle_application_pgp instead of handle_text_plain. (handle_text_plain): Remove special-case hacks for application/pgp types. svn path=/trunk/; revision=11434
* Respect Gtk theme colors for the fonts and calculate a new table gbcolorJeffrey Stedfast2001-07-271-4/+45
| | | | | | | | | | | | 2001-07-26 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (write_headers): Respect Gtk theme colors for the fonts and calculate a new table gbcolor based on gtk theme preferences. * mail-config.glade: Label the enabled field. svn path=/trunk/; revision=11431
* check_specials if this is an application/pgp type as well.Jeffrey Stedfast2001-07-251-1/+1
| | | | | | | | | 2001-07-24 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (handle_text_plain): check_specials if this is an application/pgp type as well. svn path=/trunk/; revision=11357
* Don't expunge the source folder if we have a cache.Jeffrey Stedfast2001-07-211-9/+9
| | | | | | | | | 2001-07-20 Jeffrey Stedfast <fejj@ximian.com> * mail-ops.c (filter_folder_filter): Don't expunge the source folder if we have a cache. svn path=/trunk/; revision=11264
* Cleaned up a bit. (handle_multipart_encrypted): Replace the encrypted partJeffrey Stedfast2001-07-181-17/+18
| | | | | | | | | | 2001-07-17 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (mail_part_toggle_displayed): Cleaned up a bit. (handle_multipart_encrypted): Replace the encrypted part with the decrypted part. svn path=/trunk/; revision=11166
* Use our own display_style member instead of the global setting.Peter Williams2001-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-16 Peter Williams <peterw@ximian.com> * mail-display.c (mail_display_redisplay): Use our own display_style member instead of the global setting. (mail_display_init): Initialize display_style. * mail-display.h: Include "mail-config.h" and add a display_style member. * mail-format.c (write_headers): Look at the MailDisplay's display_style instead of using the full_headers data. * folder-browser.c (folder_browser_set_message_display_style): Set the MailDisplay's display style as well as the global display style. (my_folder_browser_init): Don't save preference changes by default. (This is only observered wrt. the message display style but should apply to other items.) * folder-browser-factory.c (folder_browser_factory_new_control): Set this FB to save the preferences set in it. * folder-browser-ui.c (folder_browser_ui_add_message): Read our display's state instead of the global setting. svn path=/trunk/; revision=11131
* Took the logic of whether or not to make the attachment header out of thePeter Williams2001-07-111-10/+80
| | | | | | | | | | | | | | | | | | | | | | | 2001-07-10 Peter Williams <peterw@ximian.com> * mail-format.c (attachment_header): Took the logic of whether or not to make the attachment header out of the actual function. (mail_part_is_displayed_inline): Return if the part is being displayed inline (regardless of whether it is actually inline). (mail_part_toggle_displayed): Toggle whether it's displayed inline or not. (get_inline_flags): Determine whether the part is displayed inline and whether it is actually inline. (mail_format_mime_message): Initialize the attachment_status hash table. * mail-display.c (inline_cb): Instead of modifying the CamelMimePart, use mail_part_toggle_displayed (button_press): As above. (pixmap_press): Use mail_part_is_displayed_inline instead of mail_part_is_inline. Get the MailDisplay from the popup to do this. * mail.h: Add prototypes. svn path=/trunk/; revision=10960
* Handle application/pgp using the text/plain handler.Jeffrey Stedfast2001-07-101-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-09 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (setup_mime_tables): Handle application/pgp using the text/plain handler. * mail-account-gui.c (get_sensitive_widget): New function to determine which widget is focused. * mail-account-editor.c (apply_changes): Not only flip to the notebook page that wasn't finished, but also grab the focus of the incomplete widget. * mail-config-druid.c (source_changed): Grab the focus of the incomplete widget. (transport_prepare): And here. (identity_changed): Here too. * mail-account-gui.c (mail_account_gui_identity_complete): Take an incomplete argument so we can set which widget is incomplete and then the caller can focus it or whatever. (service_complete): Same. (mail_account_gui_transport_complete): And again here. (mail_account_gui_management_complete): And here too. svn path=/trunk/; revision=10939
* Update to pass in the `remember' argument when creating a new pgp context.Jeffrey Stedfast2001-07-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-09 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (decode_pgp): Update to pass in the `remember' argument when creating a new pgp context. (try_inline_pgp_sig): And here... * mail-crypto.c (mail_crypto_pgp_mime_part_sign): Update to pass in the `remember' argument when creating a new pgp context. (mail_crypto_pgp_mime_part_verify): Same. (mail_crypto_pgp_mime_part_encrypt): And here... (mail_crypto_pgp_mime_part_decrypt): And finally here. * mail-config.c (mail_config_get_remember_pgp_passphrase): New. (mail_config_set_remember_pgp_passphrase): New. (config_read): Read in the "remember passphrase" value. (mail_config_write_on_exit): Save the remember-passphrase value. * mail-accounts.c (construct): Allow the user to set "Remember PGP Passphrase". (remember_pgp_passphrase_toggled): Set the toggle state. svn path=/trunk/; revision=10934
* Use gnome_vfs_mime_get_short_list_applications rather thanDan Winship2001-07-101-3/+3
| | | | | | | | | | | | | | | | * mail-format.c (mail_lookup_handler): Use gnome_vfs_mime_get_short_list_applications rather than gnome_vfs_mime_get_default_application. * mail-display.c (pixmap_press): Construct the EPopupMenu array on the fly, based on the number of applications available to open the MIME type. (launch_cb): Figure out which menu item was clicked, and invoke the appropriate application. Ugh, messy, because of the EPopupMenu interface. Probably should get rewritten some day. Also, make this handle apps with expects_uris set too. svn path=/trunk/; revision=10916
* Prevent infinite recursion when viewing attachments that we can't /Peter Williams2001-07-071-5/+14
| | | | | | | | | | 2001-07-06 Peter Williams <peterw@ximian.com> * mail-format.c (format_mime_part): Prevent infinite recursion when viewing attachments that we can't / shouldn't display but are some form of plaintext. Cf bug #2234 svn path=/trunk/; revision=10857
* (write_field_row_begin): hmm, use just bold &nbsp; as it looksRadek Doulik2001-06-191-1/+3
| | | | | | better svn path=/trunk/; revision=10288
* add column with &nbsp; between header name and valueRadek Doulik2001-06-191-1/+1
| | | | | | | | | 2001-06-19 Radek Doulik <rodo@ximian.com> * mail-format.c (write_field_row_begin): add column with &nbsp; between header name and value svn path=/trunk/; revision=10286
* (mail_format_raw_message): Add padding to match the formattedDan Winship2001-06-181-3/+5
| | | | | | display. svn path=/trunk/; revision=10262
* We can't output "<html>" and "</html>" here because it gets calledDan Winship2001-06-161-2/+0
| | | | | | | | | | | * mail-format.c (mail_format_mime_message): We can't output "<html>" and "</html>" here because it gets called recursively to display message/rfc822 subparts. * mail-display.c (mail_display_redisplay): Move rodo's html header changes from mail_format_mime_message to here. svn path=/trunk/; revision=10252
* make HTML and plain mails to have the same boundaryRadek Doulik2001-06-051-13/+36
| | | | | | | | | 2001-06-05 Radek Doulik <rodo@ximian.com> * mail-format.c: make HTML and plain mails to have the same boundary svn path=/trunk/; revision=10115
* Removed the code to check for the validity of an S/MIME part. Stuff worksJeffrey Stedfast2001-06-011-2/+0
| | | | | | | | | | | | 2001-05-31 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (handle_multipart_signed): Removed the code to check for the validity of an S/MIME part. Stuff works differently now. * mail-crypto.c: Rewrote how the S/MIME stuff is going to work. svn path=/trunk/; revision=10066
* Fix a bug that could cause a crash on messages with an empty subject.Dan Winship2001-05-291-1/+1
| | | | | | | * mail-format.c (write_text_header): Fix a bug that could cause a crash on messages with an empty subject. Oops. svn path=/trunk/; revision=10034
* Fix to work properly. (handle_multipart_signed): Fixed a bug that causedJeffrey Stedfast2001-05-271-1/+1
| | | | | | | | | | | 2001-05-26 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (try_inline_pgp_sig): Fix to work properly. (handle_multipart_signed): Fixed a bug that caused some multipart/signed messages to be handled by the multipart_mixed handler. svn path=/trunk/; revision=10016
* Fix to work properly.Jeffrey Stedfast2001-05-271-4/+23
| | | | | | | | 2001-05-26 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (try_inline_pgp_sig): Fix to work properly. svn path=/trunk/; revision=10015
* Only write the message up to (but not including) the attached signatureJeffrey Stedfast2001-05-251-2/+6
| | | | | | | | | 2001-05-24 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (try_inline_pgp_sig): Only write the message up to (but not including) the attached signature block. svn path=/trunk/; revision=9967
* New convenience function for all signature verification functions to useJeffrey Stedfast2001-05-181-63/+54
| | | | | | | | | | | | | 2001-05-17 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (mail_write_authenticity): New convenience function for all signature verification functions to use to display whether or not the signed part was authentic. (try_inline_pgp_sig): Use mail_write_authentic(). (handle_multipart_signed): Add code to handle S/MIME multipart/signed parts and also use mail_write_authenticity(). svn path=/trunk/; revision=9872
* add E_TEXT_TO_HTML_ESCAPE_8BIT to the flagsDan Winship2001-05-171-1/+1
| | | | | | | * mail-format.c (mail_format_raw_message): add E_TEXT_TO_HTML_ESCAPE_8BIT to the flags svn path=/trunk/; revision=9860
* Deal with full-header mode in addition to source modeDan Winship2001-05-171-34/+81
| | | | | | | | | | | | | | | | * mail-display.c (mail_display_redisplay): Deal with full-header mode in addition to source mode * mail-format.c (write_field_row_begin): Add WRITE_NOCOLUMNS flag to write the header in a single table cell rather than two. Output the second columns's "<td>" when not in NOCOLUMNS mode. Don't include the ":" in the passed-in header name. (write_date, write_address): Update for write_field_row_begin changes. (write_text_field): Genericified and updated from write_subject. (write_headers): Deal with both normal and full-header mode. svn path=/trunk/; revision=9850
* Split "Other" page into three pages, Display, Composer, and PGP. Add HTMLDan Winship2001-05-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mail-config.glade: Split "Other" page into three pages, Display, Composer, and PGP. Add HTML image stuff on the Display page and default forward style on the Composer page. * mail-config.c (mail_config_get_default_forward_style, mail_config_set_default_forward_style): User-specified default style for forwarding messages. (config_read, mail_config_write_on_exit): Deal with forward style. * mail-accounts.c: Handle HTML image display options and default forward style. * mail-callbacks.c (forward): New. Forward in the user-selected default style. (forward_inline, forward_quoted): Simplify these some. Remove the fallback to forward attached when forwarding multiple messages: it should just forward the multiple messages inline or quoted in those cases. (Which it doesn't yet, but that's a bug.) * folder-browser.c (context_menu): Remove "Forward inline" and make "Forward" call forward() rather than forward_attached(). * folder-browser-factory.c: Update command/menu/toolbar/pixmap gunk for the "MessageForwardAttached" vs "MessageForward" split. * mail-session.c (mail_session_get_type): * mail-format.c (format_mime_part): * mail-account-gui.c (setup_service): Fix warnings. svn path=/trunk/; revision=9792
* callback to use GNOME-VFS to load http data. (on_url_requested): HandleDan Winship2001-05-121-140/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | * mail-display.c (load_http): callback to use GNOME-VFS to load http data. (on_url_requested): Handle http: URLs that refer to either MIME parts or web data. (mail_display_redisplay_when_loaded): Moved out of mail_content_loaded and made more generic. * mail-format.c (add_url): Handle two different kinds of URLs (URLs that point to CamelMimeParts and URLs that point to GByteArrays). (mail_content_loaded): Use mail_display_redisplay_when_loaded. (format_mime_part): Renamed from "call_handler_function". Also, record Content-Location if the part has one. (This is not yet 100% correct: it doesn't deal with relative URLs correctly.) (handle_text_html): Use Content-Location URL rather than Content-ID, when available (will help deal with relative URLs once GtkHTML supports that better). (etc): Update for changes. * mail-config.c (mail_config_get_http_mode, mail_config_set_http_mode): get/set HTTP image downloading mode. (config_read, mail_config_write_on_exit): save/load that data. svn path=/trunk/; revision=9773
* Use the ESearchingTokenizer to highlight search matches for folder-levelJon Trowbridge2001-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | 2001-05-10 Jon Trowbridge <trow@ximian.com> * folder-browser.c (folder_browser_config_search): Use the ESearchingTokenizer to highlight search matches for folder-level searches. Still mildly broken, but it works for the simple cases. * mail-display.c (mail_display_new): Use our ESearchingTokenizer for the mail display GtkHTML widget. * mail-search.c (dialog_clicked_cb): Use the ESearchingTokenizer to highlight search matches. (mail_search_construct): Add a match count to the search dialog. * e-searching-tokenizer.c (e_searching_tokenizer_set_search_string): Added. A custom HTML tokenizer that does highlighting of search strings. svn path=/trunk/; revision=9754
* #include <camel/camel-file-utils.h>Dan Winship2001-05-041-2/+4
| | | | | | | | | | | | | | * message-list.c: #include <camel/camel-file-utils.h> * mail-ops.c (get_folderinfo_get): * subscribe-dialog.c (build_tree): Update for camel_store_get_folder_info prototype change. * mail-format.c (handle_text_plain_flowed): Improve more on the fix from the other day: the first level of indentation adds blank lines, but further levels don't... svn path=/trunk/; revision=9660
* Mojo this a bit so that "\n\n>" gets translated to "<br><blockquote>"Dan Winship2001-04-301-8/+15
| | | | | | | | | | * mail-format.c (handle_text_plain_flowed): Mojo this a bit so that "\n\n>" gets translated to "<br><blockquote>" rather than "<br><br><blockquote>", since the transition to blockquote mode creates a blank line itself. Makes Mozilla-generated flowed replies look better. svn path=/trunk/; revision=9627
* Use <font color=...> to mark citations rather than italicizing them, whichDan Winship2001-04-261-4/+10
| | | | | | | | | * mail-format.c (handle_text_plain_flowed): Use <font color=...> to mark citations rather than italicizing them, which has never looked very nice. Now this is more consistent with the non-flowed case. svn path=/trunk/; revision=9581
* signature changingRadek Doulik2001-04-251-1/+0
| | | | | | | | | | | | | | * signature changing 2001-04-25 Radek Doulik <rodo@ximian.com> * mail-tools.c (mail_tool_quote_message): set object data directly in HTML source * mail-callbacks.c (mail_generate_reply): remove \n from citation (mail_generate_reply): don't use e_msg_composer_mark_text_orig svn path=/trunk/; revision=9558
* Removed attempts to use Radek's evil <DATA> hacks, which were just causingJon Trowbridge2001-04-241-30/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-23 Jon Trowbridge <trow@ximian.com> * e-html-utils.c (e_text_to_html_full): Removed attempts to use Radek's evil <DATA> hacks, which were just causing me (and GtkHTML) grief. 2001-04-23 Jon Trowbridge <trow@ximian.com> * gui/component/e-address-popup.c: Lots of code has been simplified here. (e_address_popup_factory_new_control): Rather than directly pop our control up in a window (via the e_address_popup_popup function, which is now gone), just return the widget and let the caller do the popping. This works better, since it means we don't have to work around the vagaries of bonobo focus & event handling. (e_address_popup_set_name): Refresh when both name & email have been set, rather than checking a stupid counter. (e_address_popup_set_email): Ditto. 2001-04-23 Jon Trowbridge <trow@ximian.com> * mail-display.c (html_button_press_event): Check for mailto: links, and pop up our mail address menu when we find one. (make_popup_window): The main piece of code (ignoring a zillion little callbacks) to pop up our windows with reasonable semantics for having them close automatically. (mail_text_write): Enable converting addresses to mailto links in message bodies. * mail-format.c (write_address): Simplify code, removing Radek's <DATA> hacks. Write out addresses as mailto: links. svn path=/trunk/; revision=9534
* Fix a dumb thinko in my 04-11 patch.Dan Winship2001-04-211-1/+1
| | | | | | | * mail-format.c (handle_text_plain): Fix a dumb thinko in my 04-11 patch. svn path=/trunk/; revision=9477
* Make this more raw: don't do URLs and citations.Dan Winship2001-04-191-3/+7
| | | | | | | * mail-format.c (mail_format_raw_message): Make this more raw: don't do URLs and citations. svn path=/trunk/; revision=9457
* Only use non-NULL contexts. (mail_crypto_pgp_mime_part_encrypt): Same.Jeffrey Stedfast2001-04-151-17/+27
| | | | | | | | | | | | | | | | | | 2001-04-14 Jeffrey Stedfast <fejj@ximian.com> * mail-crypto.c (mail_crypto_pgp_mime_part_verify): Only use non-NULL contexts. (mail_crypto_pgp_mime_part_encrypt): Same. (mail_crypto_pgp_mime_part_decrypt): And here too. * mail-format.c (try_inline_pgp_sig): Make sure to not use the context if it is NULL. (decode_pgp): Same. * folder-browser-factory.c: Added stuff for filtering/vfoldering on mailinglists. svn path=/trunk/; revision=9315
* Use the CamelCipherHash enum. (mail_crypto_pgp_mime_part_verify): Use aJeffrey Stedfast2001-04-131-11/+11
| | | | | | | | | | | | | | 2001-04-12 Jeffrey Stedfast <fejj@ximian.com> * mail-crypto.c (mail_crypto_pgp_mime_part_sign): Use the CamelCipherHash enum. (mail_crypto_pgp_mime_part_verify): Use a CamelCipherValidity. * mail-format.c (try_inline_pgp_sig): Updated to use CamelCipherValidity instead of CamelPgpValidity. (handle_multipart_signed): Same. svn path=/trunk/; revision=9284
* Don't leak memory.Dan Winship2001-04-131-1/+6
| | | | | | * mail-format.c (mail_part_is_inline): Don't leak memory. svn path=/trunk/; revision=9273
* Updated for changes to PGP code.Jeffrey Stedfast2001-04-131-38/+63
| | | | | | | | | | | | | | | | | | | | | | | 2001-04-12 Jeffrey Stedfast <fejj@ximian.com> * mail-accounts.c (pgp_path_changed): Updated for changes to PGP code. * component-factory.c (owner_set_cb): Don't init openpgp anymore because we don't need it. * mail-crypto.c: Simply wrap the camel-pgp-mime functions (also renamed the functions to be prefixed with mail_crypto). * mail-format.c (handle_multipart_signed): Update to use camel_pgp_mime_is_rfc2015_signed() and other camel-pgp-mime functions. (handle_multipart_encrypted): Same but for rfc2015_encrypted. (decode_pgp): Updated to use camel-pgp-context (try_inline_pgp): Updated to use camel-pgp-context's. (try_inline_pgp_sig): Same. svn path=/trunk/; revision=9269
* Only look for special pseudo-multipart-isms (binhex, uucode, old pgp, etc)Dan Winship2001-04-121-1/+9
| | | | | | | | | | | | * mail-format.c (handle_text_plain): Only look for special pseudo-multipart-isms (binhex, uucode, old pgp, etc) if the MIME type is really text/plain. Otherwise, since there's no handler for applciation/mac-binhex40, it gets sent to mail-identify.c, which thinks it's text/plain because it starts with English words, and so it gets sent back to the text/plain handler, which finds an embedded binhex part... svn path=/trunk/; revision=9260
* if called with a multipart that's really a 0-part, spew an error andDan Winship2001-03-301-0/+9
| | | | | | | | * mail-format.c (call_handler_function): if called with a multipart that's really a 0-part, spew an error and display as source. svn path=/trunk/; revision=9031
* Cleaned up #includes. Remove unneccesary includes of <gnome.h>,Kjartan Maraas2001-03-301-12/+17
| | | | | | | | | | | 2001-03-29 Kjartan Maraas <kmaraas@gnome.org> * *.*: Cleaned up #includes. Remove unneccesary includes of <gnome.h>, <gtk/gtk.h>, <bonobo.h> and replaced with more fine grained headers where needed. Also marked a bunch of strings for translations and added some missing prototypes. svn path=/trunk/; revision=9025
* Make fake content-id URLs be guaranteed unique: the old way (with %p onDan Winship2001-03-261-2/+3
| | | | | | | | | | | | | | | * mail-format.c (get_cid): Make fake content-id URLs be guaranteed unique: the old way (with %p on the CamelMimePart *) would generate duplicates if memory was freed and re-allocated the right way. * mail-display.c (pixbuf_gen_idle, etc): Make the thumbnail cache global rather than per-MailDisplay, since content-ids ought to be globally unique. Also, don't leak content-id strings when the pixbuf generation fails, and remove pixbufs from the cache after 5 minutes. svn path=/trunk/; revision=8944
* clear name and email data after each addressRadek Doulik2001-03-261-8/+8
| | | | | | | | | 2001-03-26 Radek Doulik <rodo@ximian.com> * mail-format.c (write_address): clear name and email data after each address svn path=/trunk/; revision=8936
* Added. Call me old-fashioned, but I just prefer to have a real API ratherJon Trowbridge2001-03-231-26/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-23 Jon Trowbridge <trow@ximian.com> * gui/widgets/e-minicard-widget.c (e_minicard_widget_set_card): Added. Call me old-fashioned, but I just prefer to have a real API rather than doing everything via gtk_object_get/set-type calls. (e_minicard_widget_set_arg): Changed to call e_minicard_widget_set_card. * backend/ebook/e-book-util.c: Small changes to get rid of compiler warnings. (Casting out const, removed unused variables, etc.) Removed some debugging messages. * gui/component/addressbook-factory.c (main): Added call to e_address_popup_factory_init. * gui/component/e-address-popup.c: Added. A popup gadget that is invoked (as a bonobo control) when an address is left-clicked in the mailer. The addressbook is queries, and the address is either displayed as a minicard (if it already exists) or in a "generic format". A button is provided for editting/adding the contact. Some of the semantics of this widget are a bit... non-standard, because of bonobo issues. I can't really seem to replicate popup-menu behavior because of how bonobo propogates events, etc. so I've tried to produce something that I think is non-annoying. YMMV. 2001-03-23 Jon Trowbridge <trow@ximian.com> * mail-display.c (handle_embedded_address_object): #ifdef away some code I don't quite want to delete yet. (html_button_press_event): Remove some of Radek's placeholder code, replace it with code to create my AddressPopup bonobo control. * mail-format.c: Remove some obsolete code that if #ifdef-ed out a while ago. * mail-ops.c (send_queue_send): Strip out the X-Evolution-Identity header when sending. 2001-03-23 Jon Trowbridge <trow@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_message): Don't call camel_mime_message_set_identity. (The call is commented out, left over from some earlier experimentation that I want to be able to remember later...) * camel-mime-message.c (camel_mime_message_set_identity): Added. A function to set the X-Evolution-Identity header. svn path=/trunk/; revision=8916
* connect to button_press_event and iframe_created events of GtkHTML widgetRadek Doulik2001-03-231-9/+31
| | | | | | | | | | | | | | | | | | | | 2001-03-22 Radek Doulik <rodo@ximian.com> * mail-display.c (mail_display_new): connect to button_press_event and iframe_created events of GtkHTML widget (html_button_press_event): new signal handler, runs popup on address fields and on links, later we should add popups for images and maybe some more? any ideas? (html_iframe_created): new signal handler, takes care of connecting to button_press_event of all iframes : plus bunch of empty methods for popup menu items - to be implemented * mail-format.c (write_address): revert back to raw HTML text, store name and email to Text objects, workaround gtkhtml tables bug (to be fixed soon ;-) svn path=/trunk/; revision=8896
* Use the new URL part macrosDan Winship2001-03-221-5/+5
| | | | | | | | | | | | * mail-config-druid.c (incoming_check, incoming_type_changed, transport_check, transport_type_changed): * mail-account-editor.c (transport_type_changed, source_check): Use the new URL part macros * mail-config.c (check_service_check): Use provider authtype list if not connecting. svn path=/trunk/; revision=8873
* Write the date header.Jeffrey Stedfast2001-03-201-2/+21
| | | | | | | | 2001-03-19 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (write_headers): Write the date header. svn path=/trunk/; revision=8829
* Switched to use e_contact_quick_add_free_form. Removed debugging code,Jon Trowbridge2001-03-091-12/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-08 Jon Trowbridge <trow@ximian.com> * gui/component/select-names/e-select-names-popup.c (quick_add_cb): Switched to use e_contact_quick_add_free_form. Removed debugging code, hopefully without introducing any bugs in the process. * gui/component/select-names/e-select-names-text-model.c (e_select_names_text_model_insert_length): Fix bug with commas inside of name/address combos. As long as the comma is inside of quotes, it will be treated as part of the name rather than as a break between addresses. * gui/component/select-names/e-select-names-completion.c (match_nickname): Use e_card_name_to_string for nickname match strings. (match_email): Use e_card_name_to_string for email match strings. (e_select_names_completion_begin): Strip quotes out of query text, so we don't produce malformed sexps. Added William Blake quote easter egg. * contact-editor/e-contact-quick-add.c: Further attempts to fix... mostly unsuccessful. (e_contact_quick_add_free_form): Added. Takes a single string and tries to parse out (using some simple, loose rules) the name and e-mail -- then calls e_contact_quick_add. An attempt to get the computer to automatically Do The Right Thing. * backend/ebook/e-book.c: Fixed some broken indentation. Yes, I'm anal. * gui/component/GNOME_Evolution_Addressbook.oafinfo: Added oaf_server info for EAddressWidget. * gui/component/GNOME_Evolution_Addressbook.oaf.in: Added oaf_server info for EAddressWidget. * gui/component/addressbook-factory.c (main): Add call to e_address_widget_factory_init. * gui/component/e-address-widget.h: * gui/component/e-address-widget.c: Added. A little widget (and a Bonobo control, BTW) for displaying addresses, with a left-click menu. Used to display addresses in the mail viewer (as embedded GtkHTML objects, replacing the text previously used). Still quite incomplete. 2001-03-08 Jon Trowbridge <trow@ximian.com> * mail-format.c (write_field_row_begin): Added. Table row HTML broken out into its own function. (write_subject): Added. Emits the proper HTML for the subject line. (write_field_to_stream): #ifdef-ed out of existence. (write_address): Take a CamelInternetAddress and spit out an <object> tag with the appropriate <param>s. * mail-display.c (on_object_requested): Check for an "address" object. If found, call... (handle_embedded_address_object): ...this function, which creates an AddressWidget bonobo control and passes in the necessary info. I never really realized just quite how much GtkHTML kicks ass until I figured out how to make this work. svn path=/trunk/; revision=8607
* Fixed memory corruption bug.Jeffrey Stedfast2001-02-231-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-22 Jeffrey Stedfast <fejj@ximian.com> * openpgp-utils.c (openpgp_verify): Fixed memory corruption bug. * mail-format.c (try_inline_pgp_sig): Check to make sure the validity isn't NULL. (handle_multipart_signed): Check for NULL validities. 2001-02-21 Jeffrey Stedfast <fejj@ximian.com> * mail-tools.c (mail_tool_uri_to_folder): Protect against NULL uri's. * mail-vtrash.c: Do mutex locking on the global hash table - this should clear up some segfaults ;-) * mail-config-druid.c (druid_finish): Set the 'enabled' member of the source to TRUE if the URL exists else set to FALSE. (incoming_type_changed): If the provider chosen is "None" then gray-out the auto-check widgets and the check-settings, otherwise sensitize them. * mail-account-editor.c (construct): Added a few more settings. (apply_changes): Save the new settings. * mail-config.c (service_copy): Updated. (config_read): Read in whether or not the account is enabled. (mail_config_write): Save if the account is enabled or not. svn path=/trunk/; revision=8349
* Changed to use PgpValidity.Jeffrey Stedfast2001-02-221-12/+23
| | | | | | | | | | | | | | | | | 2001-02-21 Jeffrey Stedfast <fejj@ximian.com> * mail-crypto.c (pgp_mime_part_verify): Changed to use PgpValidity. * openpgp-utils.c (openpgp_verify): Return a PgpValidity and set the description as UTF-8 for later use in mail-format.c when writing to GtkHTML. * mail-format.c (try_inline_pgp_sig): Updated to use the new PgpValidity code. (handle_multipart_signed): Updated. svn path=/trunk/; revision=8320
* New location for this function.Jeffrey Stedfast2001-02-091-128/+0
| | | | | | | | | | | | | | | | | | 2001-02-08 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (mail_generate_reply): New location for this function. * mail-format.c: Removed mail_generate_reply as it's ONLY ever used in mail-callbacks.c. * mail-ops.c (fetch_mail_fetch): Reworked some keep-mail-on-server logic so that we ALWAYS look for a cached array of UIDs that we may have downloaded previously so as not to download them again even if we will be deleting them off the server. This fixes bug #1344. svn path=/trunk/; revision=8137
* fixed up the display a bitJeffrey Stedfast2001-02-061-3/+5
| | | | svn path=/trunk/; revision=8001
* New function to handle inline pgp-signatures.Jeffrey Stedfast2001-02-061-8/+55
| | | | | | | | | 2001-02-05 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (try_inline_pgp_sig): New function to handle inline pgp-signatures. svn path=/trunk/; revision=7996
* Yes, some more screw ups...Iain Holmes2001-01-261-4/+2
| | | | | | This cvs thing, I don't get it, I wrap my hand in plastic to try to look through it. svn path=/trunk/; revision=7833
* GNOME_Evolution_Mail.oafinfoIain Holmes2001-01-261-2/+4
| | | | svn path=/trunk/; revision=7831
* Check if a message part's content is available, and if it's not, queue aDan Winship2001-01-261-16/+101
| | | | | | | | | | | | | | | | | | | | | | | | * mail-format.c (mail_content_loaded): Check if a message part's content is available, and if it's not, queue a thread that will load it and then queue an idle-handler redisplay of the message. (call_handler_function): Call mail_content_loaded() on the part and don't try to display it if it's currently offline. (get_data_wrapper_text): Simplify a bit * mail-display.c (mail_display_queue_redisplay): rename and make non-static. (mail_display_redisplay): Use a "new and improved" way of preserving the GtkHTML scroll location. ("new and improved" is code for "gross and hackish", but there should be a real interface for this eventually.) (on_url_requested): Use mail_content_loaded() and don't write out offline cid: URLs * mail-identify.c (mail_identify_mime_part): Use mail_content_loaded and don't try to identify the data if it's offline. svn path=/trunk/; revision=7813
* Just wrote a temp way of reporting success/fail of PGP/MIME signatureJeffrey Stedfast2001-01-231-8/+12
| | | | | | | | | | 2001-01-22 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (handle_multipart_signed): Just wrote a temp way of reporting success/fail of PGP/MIME signature verification status. svn path=/trunk/; revision=7735
* Fixed to display subparts (other than the signature part) and started toJeffrey Stedfast2001-01-231-7/+41
| | | | | | | | | | 2001-01-22 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (handle_multipart_signed): Fixed to display subparts (other than the signature part) and started to write a pretty way to show if the signature verified or not. svn path=/trunk/; revision=7724
* Helps if I spell stuff correctly so it can pass the tests ;-)Jeffrey Stedfast2001-01-221-2/+3
| | | | | | | | | 2001-01-22 Jeffrey Stedfast <fejj@ximian.com> * mail-crypto.c (mail_crypto_is_rfc2015_signed): Helps if I spell stuff correctly so it can pass the tests ;-) svn path=/trunk/; revision=7697
* If the name is empty string, use the address.Jeffrey Stedfast2001-01-201-1/+2
| | | | | | | | | 2001-01-19 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (mail_generate_reply): If the name is empty string, use the address. svn path=/trunk/; revision=7663
* use e_msg_composer_mark_text_origRadek Doulik2001-01-171-0/+1
| | | | | | | | | 2001-01-16 Radek Doulik <rodo@helixcode.com> * mail-format.c (mail_generate_reply): use e_msg_composer_mark_text_orig svn path=/trunk/; revision=7544
* add missing e-unicode.h includeDan Winship2001-01-121-0/+1
| | | | svn path=/trunk/; revision=7408
* Translate the header name to UTF8.Dan Winship2001-01-121-11/+8
| | | | | | | * mail-format.c (write_field_to_stream): Translate the header name to UTF8. svn path=/trunk/; revision=7403
* Updated. (decode_pgp): Get rid of #ifdef PGP_PROGRAM's and handleJeffrey Stedfast2001-01-101-18/+8
| | | | | | | | | | | | | | | | | | | | | | 2001-01-09 Jeffrey Stedfast <fejj@helixcode.com> * mail-format.c: Updated. (decode_pgp): Get rid of #ifdef PGP_PROGRAM's and handle appropriately. (handle_multipart_signed): Same. (handle_multipart_encrypted): Same. * Makefile.am: Added openpgp-utils.[c,h] to the build. * openpgp-utils.c: New source file containing all of the pgp interface code. * mail-crypto.c: Removed all of the openpgp funtions as they are being moved to a new file. (mail_crypto_is_rfc2015_signed): Renamed. (mail_crypto_is_rfc2015_encrypted): Renamed. svn path=/trunk/; revision=7320
* remove </center><p> (handle_text_plain): add <fontRadek Doulik2001-01-091-2/+2
| | | | | | | | | | | 2001-01-09 Radek Doulik <rodo@helixcode.com> * mail-format.c (write_headers): remove </center><p> (handle_text_plain): add <font size=\"-3\">&nbsp</font><br> before msg text (handle_text_plain_flowed): ditto svn path=/trunk/; revision=7316
* remove </center><p>Radek Doulik2001-01-091-1/+1
| | | | | | | | 2001-01-09 Radek Doulik <rodo@helixcode.com> * mail-format.c (write_headers): remove </center><p> svn path=/trunk/; revision=7315
* Brand spankin' new config druid, editor, and manager.Jeffrey Stedfast2001-01-091-3/+3
| | | | | | | | | | | | | | | | | | | | | 2001-01-08 Jeffrey Stedfast <fejj@helixcode.com> * Makefile.am: * component-factory.c: * folder-browser-factory.c: * folder-browser.c: * mail-accounts.[c,h]: * mail-account-editor.[c,h]: * mail-callbacks.c: * mail-config.[c,h]: * mail-config-druid.[c,h]: * mail-config-druid.glade: * mail-display.c: * mail-format.c: * mail-tools.c: Brand spankin' new config druid, editor, and manager. svn path=/trunk/; revision=7313
* Reverted mail-config changes temporarily until I get it working correctly.Jeffrey Stedfast2001-01-091-3/+3
| | | | | | | | | | | | | | | | | 2001-01-08 Jeffrey Stedfast <fejj@helixcode.com> * Makefile.am: * component-factory.c: * folder-browser-factory.c: * folder-browser.c: * mail-callbacks.c: * mail-config.[c,h]: * mail-display.c: * mail-format.c: * mail-tools.c: Reverted mail-config changes temporarily until I get it working correctly. svn path=/trunk/; revision=7305
* Updated to reflect changes to the mail-config API.Jeffrey Stedfast2001-01-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-07 Jeffrey Stedfast <fejj@helixcode.com> * mail-tools.c (mail_tool_quote_message): Updated to reflect changes to the mail-config API. * mail-display.c (redisplay): Updated to reflect changes to the mail-config API. * mail-callbacks.c (providers_config): Use the new account dialog. * mail-config-druid.c (druid_finish): Load the new storage into the shell. (mail_config_druid_new): Take a shell argument. * mail-format.c (mail_generate_reply): Updated to reflect changes to the mail-config API. * mail-config-druid.c: Fixed this to build. * mail-callbacks.c (check_send_configuration): Updated to reflect changes to the mail-config API. (create_msg_composer): Same. (forward_get_composer): Same. (send_queued_mail): Same. (composer_send_cb): Same. * mail-account-editor.c: Updated to build cleanly. * mail-config-druid.c: Same. * mail-accounts.c: Same. * folder-browser-factory.c (control_activate): Updated for API changes in mail-config. * folder-browser.c (done_message_selected): Updated for API changed in mail-config. (folder_browser_gui_init): Same. (got_folder): Same. * component-factory.c (owner_set_cb): After using the sources list, free it as it is no longer a const GSList as with the older mail-config code. * mail-config.c: Totally rewritten. svn path=/trunk/; revision=7298
* add font color setting for table, changed border behaviorRadek Doulik2001-01-031-3/+5
| | | | | | | | | | | 2001-01-03 Radek Doulik <rodo@helixcode.com> * mail-format.c (write_headers): add font color setting for table, changed border behavior * mail-display.c (redisplay): don't set body bg and text color svn path=/trunk/; revision=7231
* Use header_content_type_simple, not header_content_type_format.Dan Winship2001-01-031-2/+2
| | | | | | | | | * mail-format.c (mail_part_is_inline): (find_preferred_alternative): * mail-display.c (launch_cb): Use header_content_type_simple, not header_content_type_format. svn path=/trunk/; revision=7214
* Use CamelContentType, and use header_content_type_is instead of doing itDan Winship2000-12-291-26/+24
| | | | | | | | | | | | | | | | | | * mail-format.c (mail_part_is_inline, mail_get_message_body): Use CamelContentType, and use header_content_type_is instead of doing it by hand. (handle_text_plain): (handle_multipart_related): (find_preferred_alternative): (handle_message_external_body): Use CamelContentType and header_content_type_* functions instead of GMimeContentField. * mail-display.c (write_data_to_file, launch_cb): Use CamelContentType and header_content_type_* functions instead of GMimeContentField. svn path=/trunk/; revision=7189
* for now #ifdef PGP_PROGRAM falling back to handle_multipart_mixed.Chris Toshok2000-12-191-0/+8
| | | | | | | | | | 2000-12-18 Chris Toshok <toshok@helixcode.com> * mail-format.c (handle_multipart_encrypted): for now #ifdef PGP_PROGRAM falling back to handle_multipart_mixed. (handle_multipart_signed): same. svn path=/trunk/; revision=7074
* New callback to handle multipart/signed parts. (decode_pgp): Update toJeffrey Stedfast2000-12-161-76/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-15 Jeffrey Stedfast <fejj@helixcode.com> * mail-format.c (handle_multipart_signed): New callback to handle multipart/signed parts. (decode_pgp): Update to account for the cipherlen argument needed for openpgp_decrypt. (is_rfc2015): Removed as we now have a better version in mail-crypto. (handle_multipart_encrypted): Updated to use the PGP/MIME utility functions. * mail-crypto.c (mail_crypto_openpgp_decrypt): Don't check (!*plaintext) as it could be a binary stream. Now also takes a cipherlen argument. (mail_crypto_openpgp_sign): New function. (pgp_mime_part_sign): New function to replace a mime part with the pgp signed equivalent. (pgp_mime_part_encrypt): New function to replace a mime part with the pgp encrypted equivalent. (pgp_mime_part_decrypt): New function to decrypt a pgp encrypted mime part (like from pgp_mime_part_encrypt) and replace it. (is_rfc2015_signed): New function to determine if a mime part is an rfc2015 signed part. (is_rfc2015_encrypted): New function to determine if a mime part is an rfc2015 encrypted part. (mail_crypto_openpgp_verify): New openpgp function to verify a signature. svn path=/trunk/; revision=7056
* Updated to reflect arguments to the openpgp functions - now also takes anJeffrey Stedfast2000-12-121-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-11 Jeffrey Stedfast <fejj@helixcode.com> * mail-format.c (decode_pgp): Updated to reflect arguments to the openpgp functions - now also takes an outlen argument. (try_inline_pgp): Updated. (handle_multipart_encrypted): Updated here too. * mail-crypto.c (crypto_exec_with_passwd): Updated to handle binary streams and such. (mail_crypto_openpgp_encrypt): Always initialize the passwd_fds even if we don't plan on signing. Added an 'inlen' to specify the length of the input data (as it could be binary). Also added a 'userid' argument for cases when we want to sign as well as encrypt. (mail_crypto_openpgp_decrypt): Updated to take an outlen argument in case the ciphertext is encrypted binary data. (mail_crypto_openpgp_clearsign): Added a 'hash' and 'detach' arguments. 'hash' allows the program to specify the preferred hash function (which will come in handy when generating PGP/MIME). 'detach' allows the program to specify whether it wants a detached signature or the entire signed text. svn path=/trunk/; revision=6921
* Don't use the raw message body as the format argument, use "%s" instead.Jeffrey Stedfast2000-12-061-2/+1
| | | | | | | | | | 2000-12-05 Jeffrey Stedfast <fejj@helixcode.com> * mail-format.c (mail_format_raw_message): Don't use the raw message body as the format argument, use "%s" instead. If the raw message contains %'s then it will segfault otherwise. svn path=/trunk/; revision=6798
* New function to return if user wants to view message source.Jeffrey Stedfast2000-11-221-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-21 Jeffrey Stedfast <fejj@helixcode.com> * mail-config.c (mail_config_view_source): New function to return if user wants to view message source. (mail_config_set_view_source): New function to set whether the view wants to view source. * mail-ops.c (mail_do_view_message_sources): Removed. We're not gonna view-source this way anymore. * folder-browser-factory.c: Removed the ViewSource bonobo verb from the Message menu. (control_activate): Added ViewSource. * folder-browser.c (on_right_click): Removed Message menu item to view message source. (folder_browser_toggle_view_source): New callback to set whether or not the MailDisplay shows the raw message or the pretty-ified message. * mail-callbacks.c: Removed view_source. * mail-display.c (redisplay): If toggle_raw is set then display the raw message else display the pretty formatted message. (mail_display_redisplay): New function to force the redisplay of a message. * mail-format.c (mail_format_raw_message): New function to write the raw message data. svn path=/trunk/; revision=6639
* Use the new quote_message function and make it start with "On %s, %sJeffrey Stedfast2000-11-181-52/+12
| | | | | | | | | | | | | | | | | 2000-11-17 Jeffrey Stedfast <fejj@helixcode.com> * mail-format.c (mail_generate_reply): Use the new quote_message function and make it start with "On %s, %s wrote:" since people seem to want that. * mail-ops.c (cleanup_forward_messages): Use the new quote_message function. * mail-tools.c (mail_tool_quote_message): New convenience function to quote a message body (since both the reply and forward code do similar quoting) svn path=/trunk/; revision=6605
* likewiseRadek Doulik2000-11-091-1/+1
| | | | | | | | | | | 2000-11-08 Radek Doulik <rodo@helixcode.com> * mail-format.c (mail_generate_reply): likewise * mail-callbacks.c (create_msg_composer): added send_html arg to e_msg_composer_new_with_sig_file call svn path=/trunk/; revision=6511
* God, I sure wish people would listen when i'm saying i'm changing and API.Not Zed2000-11-071-115/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-07 Not Zed <NotZed@HelixCode.com> * mail-display.c (on_object_requested): God, I sure wish people would listen when i'm saying i'm changing and API. I mean I even mailed everyone and everything. Can't see any changelog either. 2000-11-06 Not Zed <NotZed@HelixCode.com> * mail-autofilter.c (rule_from_message): Updates for api changes. * mail-tools.c (mail_tool_generate_forward_subject): Fixed for api changes. Sigh, whoever wrote the multithread code of the mailer, had little idea. You can't just lock for getting a const value, until you are finished with it, cause the owner still owns it. Fixed this too. Yuck, what a horrid forwarding format, can we change this, or make it configurable? The mail headers show who forwarded it, we dont need to duplicate it in that UGLY subject. * mail-format.c (write_field_to_stream): Removed some jeffness. dont g_strdup stuff we dont need to, and remove the value_is_encoded thing since we can get the unencoded address now. (write_address): New function to write an address field. (write_headers): Uses write_address to write addresses, cleaner, fixed the god-awful unreadable indenting too. (handle_text_plain): Use a 'smarter' printf format, so we dont need to allocate and copy substrings unecessarily (esp since they're about to be allocated any copied another few times anyway *sigh*). (write_field_to_stream): Commented out the isprint check, which afaik serves no purpose. (list_add_addresses): New function to build a list of display-ready addresses. Although I think the composer then uses these as internet-ready addresses. It should probably take a list of CamelAddress's if thats what it wants. (mail_generate_reply): Cleaned up the address list creation stuff a heap, and fixes for camel api changes. Also fixed a small memory leak as a side effect (fulladdr wasn't freed if it was the same as the sender). * mail-display.c (on_object_requested): Changed for interface changes to the from address. I think passing the encoded (internet version) of the address is right here. svn path=/trunk/; revision=6475
* Added new header files.Jeffrey Stedfast2000-11-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-03 Jeffrey Stedfast <fejj@helixcode.com> * Makefile.am: Added new header files. * component-factory.c (owner_set_cb): s/session_init/mail_session_init * session.c: Renamed public functions to mail_session_*. FIXME: Rename session.c to mail-session.c * folder-browser-factory.c: #include "mail-callbacks.h", #include "mail-session.h" and replace forget_passwords with mail_session_forget_passwords * mail.h: Move session prototypes to mail-session.h, Move mail-crypto prototypes to mail-crypto.h, Move mail-callback prototypes to mail-callbacks.h * mail-session.h: New header file containing public prototypes for session.c * mail-format.c: #include "mail-crypto.h" * mail-view.c: * folder-browser.c: #include "mail-callbacks.h" * mail-crypto.h: New header file containing public prototypes for mail-crypto.c * mail-callbacks.h: New header file containing public prototypes for mail-callbacks.c * message-list.c (message_list_get_layout): Set useful defaults. (message_list_setup_etable): Don't set the Outbox defaults on a folder just because it doesn't have a corresponding saved file. svn path=/trunk/; revision=6372
* ** Merged in camel-incremental-branch.Not Zed2000-11-021-3/+2
| | | | | | | | | | | | | 2000-11-02 Not Zed <NotZed@HelixCode.com> ** Merged in camel-incremental-branch. * mail-format.c (mail_get_message_body): Jeff! Sigh. We should definetly not be strduping the content, it has already been copied and duplicated. Look at get_data_wrapper_text. svn path=/trunk/; revision=6337
* Shouldn't we be strdup'ing the content? This seems to fix the memoryJeffrey Stedfast2000-11-011-22/+21
| | | | | | | | | | | | | 2000-10-31 Jeffrey Stedfast <fejj@helixcode.com> * mail-format.c (mail_get_message_body): Shouldn't we be strdup'ing the content? This seems to fix the memory corruption problems. (mail_generate_reply): Make sure that the last char in the generated reply text is '\0' (when bodt text doesn't end with a \n, a random char will appear otherwise). svn path=/trunk/; revision=6306
* lots of i18n fixesDan Winship2000-10-241-20/+28
| | | | svn path=/trunk/; revision=6143
* Get the MailConfigIdentity *before* we create a new composer object soJeffrey Stedfast2000-10-191-4/+4
| | | | | | | | | | 2000-10-19 Jeffrey Stedfast <fejj@helixcode.com> * mail-format.c (mail_generate_reply): Get the MailConfigIdentity *before* we create a new composer object so that we can set the signature file. svn path=/trunk/; revision=6026
* Decode recipient names so that they display nicely in the To and CcJeffrey Stedfast2000-10-171-23/+37
| | | | | | | | | | | | | | | 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com> * mail-format.c (mail_generate_reply): Decode recipient names so that they display nicely in the To and Cc fields. (write_field_to_stream): Now takes another argument 'value_is_encoded' so that we know if we should decode that string before proceding onward. Since the message subject is already decoded before it's passed in, we don't want to decode it again (wasted cpu time and/or any 8bit chars will be assumed to be latin1 encoded and thus the decoded value will be corrupt). svn path=/trunk/; revision=5955
* make sure we dup the return value of get_reply_to or get_from whenLarry Ewing2000-10-111-2/+4
| | | | | | | | | 2000-10-10 Larry Ewing <lewing@helixcode.com> * mail-format.c (mail_generate_reply): make sure we dup the return value of get_reply_to or get_from when building the recipient list. svn path=/trunk/; revision=5829
* New widget, full search dialogue for mail.Not Zed2000-10-091-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-06 Not Zed <NotZed@HelixCode.com> * mail-search-dialogue.c: New widget, full search dialogue for mail. * folder-browser.c (search_set): If we click on custom search, run the full search dialogue. (folder_browser_gui_init): Add a button to perform a full search. (search_full): Bring up the mail search dialogue asynchronously. (search_full_clicked): Handle search options. (folder_browser_destroy): Free the saved rule if there is one there. (search_options[]): Added a custom option option - brings up the full search dialogue. (search_set): Disable the search entry if we are doing a full search. * mail-vfolder.c (vfolder_create_storage): Yay, finally depeterised this stuff. (vfolder_uri_to_folder): Removed an irrelevant comment. * mail-callbacks.c (filter_edit): And here. * mail-ops.c (do_fetch_mail): And here too. * mail-autofilter.c (filter_gui_add_from_message): Fixed call to context_load. (filter_gui_add_for_mailing_list): And here too. * folder-browser-factory.c (create_ondemand_hooks): Remove that ondemand callback snot. 2000-10-05 Not Zed <NotZed@HelixCode.com> * message-list.c (message_list_init_etable): Build the etable once we know what folder we are going to use. (save_header_state): Save the header spec to a cache file. (message_list_destroy): Save the header spec. (message_list_setup_etable): Setup the etable spec for this folder, from a saved version if one exists, or to suit the folder type (sent/received). (message_list_set_folder): Setup the etable here once we have a folder. svn path=/trunk/; revision=5798
* Decode the header before writing it to the header box.Jeffrey Stedfast2000-10-061-2/+6
| | | | | | | | | | | | 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com> * mail-format.c (write_field_to_stream): Decode the header before writing it to the header box. * mail-callbacks.c (send_receieve_mail): fetch mail before sending, this is a temp fix for POP-before-SMTP authentication. svn path=/trunk/; revision=5759
* Add print preview verb here.Miguel de Icaza2000-09-301-0/+1
| | | | | | | | | | | | | 2000-09-29 Miguel de Icaza <miguel@helixcode.com> * folder-browser-factory.c: Add print preview verb here. * mail-callbacks.c (do_mail_print): Handle printing here, the complete engine. (mail_print_preview_msg): new. does print previewing. (mail_print_msg): does printing of the message. svn path=/trunk/; revision=5641
* Fixed some memory leakage. Call free_recipients() so we don't leak memory.Jeffrey Stedfast2000-09-221-3/+13
| | | | | | | | | 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
* Deal with NULL composer.Dan Winship2000-09-191-3/+4
| | | | | | | | | | * 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
* Another big rewrite of this stuff. Now all (well, most) attachments get aDan Winship2000-09-121-267/+254
| | | | | | | | | | | | | | * 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
* I changed the Reply-All behavior so that the sender's address doesJesse Pavel2000-09-081-2/+10
| | | | | | not appear in the cc: field. svn path=/trunk/; revision=5246
* camel_mime_part_get_filename now deals with both Content-Disposition andDan Winship2000-09-061-5/+1
| | | | | | | | | | * 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
* Applied Jesse's patch that will append a signature to the replied messageJeffrey Stedfast2000-09-041-21/+26
| | | | | | | | | | | | | 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
* Plug mem leaks.Peter Williams2000-08-171-1/+2
| | | | svn path=/trunk/; revision=4854
* Fix some freed-memory referencesDan Winship2000-08-141-12/+12
| | | | | | * mail-format.c (add_url): Fix some freed-memory references svn path=/trunk/; revision=4806
* Redo this so that the lock icon remains active after a failed decryptionDan Winship2000-08-131-17/+25
| | | | | | | | | | * 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
* Remove workaround for gnome-vfs 0.2 bug.Dan Winship2000-08-121-3/+0
| | | | | | | | | | * 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
* Fixed a warning.Christopher James Lahey2000-08-121-0/+1
| | | | | | | | 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
* Redo this again. Get rid of struct mail_format_data and move most of thatDan Winship2000-08-121-235/+211
| | | | | | | | | | | | | | * 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
* Update this for CamelObject (try_inline_pgp): Deal with decrypting hereDan Winship2000-08-121-61/+58
| | | | | | | | | | | | | | | | | | | * 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
* Fix the camel-folder's thaw handler. Implement event forwarding into the ↵Peter Williams2000-08-121-0/+3
| | | | | | main thread. svn path=/trunk/; revision=4744
* Check nrow, not srow.JP Rosevear2000-08-121-3/+1
| | | | | | | | 2000-08-11 JP Rosevear <jpr@helixcode.com> * mail-config-gui.c (news_edit_clicked): Check nrow, not srow. svn path=/trunk/; revision=4738
* Don't call e_setup_base_dir. It was wrong and it doesn't exist any more.Dan Winship2000-08-111-1/+0
| | | | | | | | | | | | | | | | | | | * 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
* Merge with camel-async.Peter Williams2000-08-111-24/+42
| | | | svn path=/trunk/; revision=4687
* Fixed some warnings.Christopher James Lahey2000-08-091-1/+2
| | | | | | | | | | | 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
* Fix some compiler warnings.Dan Winship2000-08-091-3/+4
| | | | | | | * mail-crypto.c, mail-format.c, message-thread.c: Fix some compiler warnings. svn path=/trunk/; revision=4615
* Fix up format of addresses. (write_headers): Use CamelAddress functions toDan Winship2000-08-091-51/+33
| | | | | | | * mail-format.c (mail_generate_reply): Fix up format of addresses. (write_headers): Use CamelAddress functions to simplify this. svn path=/trunk/; revision=4606
* Get rid of kludge around subject beginning with spaces.Jeffrey Stedfast2000-08-081-5/+2
| | | | | | | | | | | | | | | 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
* Renamed from reply_body() so other functions can use itJeffrey Stedfast2000-08-071-8/+7
| | | | | | | | | | | | 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
* New code to spawn off GPG/PGP to do stuff. Currently only deals withDan Winship2000-08-021-60/+354
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* New function to create composer with sig file set.JP Rosevear2000-07-291-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update for OAF and for external apps as well as components.Dan Winship2000-07-261-16/+65
| | | | | | | | | | | | | | | | * 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
* put a <p> at the end of the header table. (I think there used to beDan Winship2000-07-151-4/+7
| | | | | | | | | | | | * 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
* add "message/news" to the mime_function_table using the same handler asChris Toshok2000-07-131-0/+2
| | | | | | | | | 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
* Deal with having multiple selected messages.Dan Winship2000-07-091-45/+0
| | | | | | | | | | * 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
* Use the gnomevfs sniff buffer interface to try to identify the MIME typeDan Winship2000-07-061-5/+6
| | | | | | | | | | | | | | * 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
* add default subjectsDan Winship2000-06-291-1/+16
| | | | | | * mail-format.c (mail_generate_forward): add default subjects svn path=/trunk/; revision=3784
* Get evolution-dir the right way in e-setup.hPeter Williams2000-06-221-2/+1
| | | | svn path=/trunk/; revision=3675
* Add missing declaration of `evolution_dir' to get it to compile.Ettore Perazzoli2000-06-211-0/+1
| | | | svn path=/trunk/; revision=3645
* add an option to prefer text/plain. (reply_body): add an option to preferDan Winship2000-06-201-13/+20
| | | | | | | | | | | * 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
* Fix the subject generation so we don't get "Re: Re:". This is workingDan Winship2000-06-131-4/+9
| | | | | | | | * 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
* Redo things a bit so that whitespace-only text parts aren't displayed. (InDan Winship2000-06-101-112/+136
| | | | | | | | | * 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
* Update for new composer attachment interface.Dan Winship2000-06-061-35/+10
| | | | | | | * mail-format.c (mail_generate_forward): Update for new composer attachment interface. svn path=/trunk/; revision=3431
* Fix forwarding to work for people other than me. :) [Although apparentlyDan Winship2000-06-021-1/+1
| | | | | | | | * 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
* use <blockquote> rather than <center><table border=1 width=95%> to frameDan Winship2000-06-021-3/+2
| | | | | | | | | | | * 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
* Oops. This needs to take a message argument because we might be writingDan Winship2000-06-021-9/+10
| | | | | | | | * 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
* Fix up memory management of x-evolution-data URLs so the URLs and/or theirDan Winship2000-06-011-30/+26
| | | | | | | | | | | | | * 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
* Initialize the "urls" hash table stored on the message and store cid andDan Winship2000-06-011-84/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Redo this back to the old way: a single GtkHTML with various things inlineDan Winship2000-05-311-301/+192
| | | | | | | | | | | | | | | | | | | | * 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
* Use `foo@bar' rather than `<foo@bar>' for recipient with no name.Dan Winship2000-05-291-6/+12
| | | | | | | * mail-format.c (write_recipients_to_stream): Use `foo@bar' rather than `<foo@bar>' for recipient with no name. svn path=/trunk/; revision=3247
* Various improvements:Dan Winship2000-05-281-74/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix a bug (security/stability) in its usage of mail_html_write.Dan Winship2000-05-271-1/+1
| | | | | | | * mail-format.c (handle_text_html): Fix a bug (security/stability) in its usage of mail_html_write. svn path=/trunk/; revision=3227
* Update for PersistStream changesDan Winship2000-05-261-2/+5
| | | | | | | * mail-format.c (handle_via_bonobo): Update for PersistStream changes svn path=/trunk/; revision=3216
* Updated for the GtkHTML API changes. Also fixed some compilerEttore Perazzoli2000-05-211-9/+9
| | | | | | warnings here and there. svn path=/trunk/; revision=3145
* Fixes for stream stuff.NotZed2000-05-201-6/+5
| | | | | | | | | | 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
* Use camel_data_wrapper_write_to_stream rather thanDan Winship2000-05-181-42/+15
| | | | | | | | | * 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
* Removed usage of bonobo_object_destroy.Christopher James Lahey2000-05-171-3/+2
| | | | | | | | 2000-05-16 Christopher James Lahey <clahey@helixcode.com> * mail-format.c: Removed usage of bonobo_object_destroy. svn path=/trunk/; revision=3094
* Update for CamelStream CamelException changes.Dan Winship2000-05-091-9/+9
| | | | | | | | | | | | * 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
* unref the message after displaying it.Dan Winship2000-05-081-4/+5
| | | | | | | | | | | * message-list.c (select_msg): unref the message after displaying it. * mail-format.c (get_data_wrapper_text): (handle_text_plain_flowed): (handle_via_bonobo): Replace camel_stream_close calls. svn path=/trunk/; revision=2883
* consolidate mail-format.h, mail-identify.h, mail-ops.h, main.h andDan Winship2000-05-071-3/+1
| | | | | | | | * 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
* Make the "Cc:" field optional again. (Before, we could check ifDan Winship2000-05-041-7/+9
| | | | | | | | | * mail-format.c (write_recipients_to_stream, write_headers): Make the "Cc:" field optional again. (Before, we could check if camel_mime_message_get_recipients returned NULL, but now we need to actually look into the returned CamelInternetAddress object.) svn path=/trunk/; revision=2783
* s/strcasecmp/g_strcasecamp/ everywhere except intl/, per michael'sJacob Leach2000-05-031-7/+7
| | | | | | request. svn path=/trunk/; revision=2776
* Handle clicks on "cid" URLs by popping up a "Save Attachment" dialog.Dan Winship2000-04-301-1/+25
| | | | | | | | | | | | | * 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
* Improve the builtin vs bonobo selection code. (handle_mystery): IncludeDan Winship2000-04-301-110/+94
| | | | | | | | | | | | | | | | | | | | | | * 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
* update for Camel recipient changes. (Just to make it build, not to takeDan Winship2000-04-291-17/+32
| | | | | | advantage of new features, or do things cleanly.) svn path=/trunk/; revision=2677
* Move text_to_html to e-util.Dan Winship2000-04-281-207/+15
| | | | | | | | | | | | | * 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
* Improve URL converstion code. Recognize https, recognize "www\..*" withoutDan Winship2000-04-281-14/+48
| | | | | | | | | * mail-format.c (text_to_html): Improve URL converstion code. Recognize https, recognize "www\..*" without a prefixed "http://". Properly escape &, <, >, etc in URL strings. Don't be fooled by "mailto:", "http://", etc with no following data. svn path=/trunk/; revision=2660
* Reorganize a bit and add a new flag, TEXT_TO_HTML_CONVERT_URLS toDan Winship2000-04-271-95/+130
| | | | | | | | | | | | | * 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
* Remove. We weren't using the fields that made this different fromDan Winship2000-04-271-13/+9
| | | | | | | | | | | | | * camel-mime-body-part.[ch]: Remove. We weren't using the fields that made this different from camel-mime-part, so it basically just forced us to do lots of gratuitous typecasting. * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart parent stuff, since we weren't using that either. * etc: update for CamelMimeBodyPart -> CamelMimePart svn path=/trunk/; revision=2645
* update for CamelStream changes.Dan Winship2000-04-261-5/+4
| | | | | | * mail-format.c: update for CamelStream changes. svn path=/trunk/; revision=2631
* add a convert_space_hack flag, which turns N spaces into N-1 &nbsp;s and aDan Winship2000-04-261-5/+106
| | | | | | | | | | | | | * mail-format.c (text_to_html): add a convert_space_hack flag, which turns N spaces into N-1 &nbsp;s and a space. (handle_text_plain): Check for "format=flowed" in the Content-Type. (handle_text_plain_flowed): Spinoff of handle_text_plain to deal with RFC 2646 flowed text. (All the examples I can find of it are generated by Eudora, but it's a pretty cool idea that ought to be used more widely.) svn path=/trunk/; revision=2618
* Now that we're not limited to a single GtkHTML for the display, there's noDan Winship2000-04-261-79/+178
| | | | | | | | | | | | | | | | | * 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
* (reply_body): Make this deal better with multiparts.Dan Winship2000-04-261-40/+29
| | | | svn path=/trunk/; revision=2612
* (setup_function_table): pass unknown text subtypes toDan Winship2000-04-261-3/+27
| | | | | | | | | | | handle_text_plain. (handle_multipart_appledouble): new handler. Just ignores the first (application/applefile) part and tries to display the second part. Since the second part is usually application/octet-stream, this doesn't work very well still usually. svn path=/trunk/; revision=2611
* Fix some bugs that crept into reply generation. This needs a lot more workDan Winship2000-04-251-5/+17
| | | | | | | | * mail-format.c (reply_body): Fix some bugs that crept into reply generation. This needs a lot more work to deal correctly with complicated bodies. svn path=/trunk/; revision=2602
* Redo large chunks of this. The mail display now consists of a vbox in aDan Winship2000-04-251-448/+573
| | | | | | | | | | | | | | | | | | * 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
* rename "send" to "send_msg", to avoid name clash with the tcp function.Dan Winship2000-04-241-0/+56
| | | | | | | | | | | | | | * folder-browser-factory.c: rename "send" to "send_msg", to avoid name clash with the tcp function. Connect the "forward" button. * mail-ops.c: rename "send" to "send_msg", to avoid name clash with the tcp function. Add forward_msg function. * mail-format.c (mail_generate_forward): support function for forward_msg. Pretty much a big kludge right now, pending the attachment/attachment-bar changes. svn path=/trunk/; revision=2562
* move msg_composer_cb and msg_composer_send_cb to mail-ops. Attach send,Dan Winship2000-04-231-13/+238
| | | | | | | | | | | | | | | | | * folder-browser-factory.c: move msg_composer_cb and msg_composer_send_cb to mail-ops. Attach send, reply, and "reply to all" buttons. * mail-ops.c (composer_send_cb, send): moved from folder-browser-factory.c. (reply_to_sender, reply_to_all): new functions to do replies. * mail-format.c (text_to_html): Add an "add_pre" flag, to make it wrap the output in <pre></pre>. (mail_generate_reply): New function to create a composer and build a reply in it. svn path=/trunk/; revision=2554
* deal with cid: URLs. (find_cid): helper routine for above. (This could beDan Winship2000-04-211-21/+65
| | | | | | | | | | * 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
* Moved from camel/camel-formatter, and changed slightly. (More to come.)Dan Winship2000-04-151-0/+793
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