2001-10-12 Jon Trowbridge <trow@ximian.com>
* mail-display.c (html_button_press_event): Store our listener id.
(popup_info_free): Disconnect our listener when we free the popup.
(Bug #11040)
svn path=/trunk/; revision=13619
2001-10-10 Larry Ewing <lewing@ximian.com>
* mail-display.c (save_url): copy the data. We can't ref the byte
array and we can't free it so we have to copy it.
svn path=/trunk/; revision=13546
2001-10-09 Larry Ewing <lewing@ximian.com>
* mail-display.c (save_part): ref the part.
(save_destroy_cb): new function to unref the part when we have
closed the dialog.
(save_url): fake a mime part so that we can save data urls without
extra effort. This is less sucky than it seems since it handles
filenames and ref counting with minimal fuss.
svn path=/trunk/; revision=13544
2001-10-09 Jeffrey Stedfast <fejj@ximian.com>
* folder-browser-ui.c (folder_browser_ui_add_message): Create a
chaqrset picker submenu in the View menu.
* mail-format.c (mail_format_raw_message): Pass the mail-display
to get_data_wrapper_text.
(get_data_wrapper_text): Use the user's override charset if one is
provided, otherwise user the user's default charset.
(handle_text_plain): Pass along the mail-display to
get_data_wrapper_text.
(handle_application_pgp): Same.
(handle_text_enriched): Here too.
(mail_get_message_body): Pass NULL as the mail-display to
get_data_wrapper_text since we don't have access to a
mail-display.
* mail-display.c (mail_display_set_charset): New function to set a
charset on the maildisplay. Once set, the message is redisplayed
using the new charset.
(mail_display_destroy): Free the charset.
* folder-browser.c (folder_browser_charset_changed): New callback
for when a user overrides the message charset.
svn path=/trunk/; revision=13530
2001-10-01 Jon Trowbridge <trow@ximian.com>
* mail-display.c (on_url_requested): Make sure we aren't dealing
with a pathological message w/o a From: header.
(ebook_callback): Properly check that the address we queried
matches the address on the current message. (Bug #10038)
svn path=/trunk/; revision=13295
2001-09-26 Jon Trowbridge <trow@ximian.com>
* mail-display.c (html_button_press_event): Decode our URL before
extracting the address to pop up contact info.
* mail-format.c (write_address): When writing out a mailto: link,
make sure we construct a valid URL w/ correct encoding. Make sure
our address is properly quoted, if necessary.
svn path=/trunk/; revision=13160
2001-09-17 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c (invisible_selection_get_callback): Do nothing if
the selection is NULL? Maybe this is the cause of bug #6817.
svn path=/trunk/; revision=12910
* mail-display.c (launch_cb): the "command" of a
GnomeVFSMimeApplication can include arguments as well. Deal with
that. Fixes support for CodeWeavers' CrossOver Plugin.
svn path=/trunk/; revision=12643
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
2001-08-27 Jon Trowbridge <trow@ximian.com>
* mail-callbacks.c (mail_generate_reply): Check if we are trying
to reply to a message with no From: field, and try to do something
graceful in that case. (Bug #7028)
* mail-display.c (ebook_callback): Add paranoid checks for the
case of a message with a From: field. (Also maybe bug #7028)
svn path=/trunk/; revision=12490
2001-08-24 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c (launch_cb): Use the new e_mkdtemp function.
* folder-browser.c (message_list_drag_data_get): Use the new
e_mkdtemp function.
svn path=/trunk/; revision=12462
2001-08-22 jacob berkman <jacob@ximian.com>
* gui/component/e-address-popup.c (emit_event): emit an event from
our event source
(contact_editor_cb): emit a destroy event so our control frame can
be destroyed.
(edit_contact_info_cb): emit a hide event so our control frame can
be hidden
(e_address_popup_cardify):
(add_contacts_cb): emit the destroy event
(e_address_popup_factory_new_control): don't unref our object at
widget destroy time as that was really really broken
(e_address_popup_factory_new_control): create an event source and
aggregate ourself with it
* gui/contact-editor/e-contact-editor.c (enable_writable_fields):
display a nicer warning when we can't find a widget for a given
field
(e_contact_editor_raise): only raise if there is a window
* gui/contact-editor/contact-editor.glade: name some widgets that
got unnamed, and set the first entry as defaultable
* gui/contact-editor/e-contact-editor.c: envelope printing is
disabled in 1.0 2001-08-22 jacob berkman <jacob@ximian.com>
* mail-display.c: rework how the e-card-popup thing has its life
managed. we now hide the window on the Hide event and destroy it
on the Destroy event emitted from its event source
svn path=/trunk/; revision=12402
2001-08-17 Damon Chaplin <damon@ximian.com>
* mail-display.c (pixmap_press): stop signal emission so the GtkButton
class method doesn't mess up the popup menu. Hopefully fixes bug #1828.
svn path=/trunk/; revision=12192
2001-08-15 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c (save_part): Remember the filename is in utf8, so
use the e_utf8 functions to set the filename in the file selection
dialog.
svn path=/trunk/; revision=12076
2001-07-24 Jeffrey Stedfast <fejj@ximian.com>
* mail-ops.c (save_part_save): Pass the O_TRUNC flag to open so
that we don't leave trailing garbage at the end of the file if the
new file content is shorter than the old file content.
svn path=/trunk/; revision=11373
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
2001-07-19 Jason Leach <jleach@ximian.com>
* mail-display.c (mail_display_new): Set the vertical scrolling
policy for the mail display to AUTOMATIC, only get a scrollbar if
the e-mail is longer than one frame.
* folder-browser.c (my_folder_browser_init): We were setting the
policy twice (and to two different things). Removed this one.
* message-list.c (message_list_init): Set the policy for the
message list scroll frame to be horizontal=NEVER,
vertical=AUTOMATIC (scrollbar only if you have >1 page of
messages).
svn path=/trunk/; revision=11239
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
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
2001-07-11 JP Rosevear <jpr@ximian.com>
* mail-display.c (get_embedded_for_component): no longer need to
set a my address property
svn path=/trunk/; revision=11019
2001-07-10 Federico Mena Quintero <federico@ximian.com>
* mail-display.c (link_copy_location): Set the CLIPBOARD
selection as well as the primary selection so that Edit/Paste will
work in other programs (e.g. Netscape).
(mail_display_new): Add the target for the CLIPBOARD selection.
svn path=/trunk/; revision=10977
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
* 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
2001-07-03 Jeffrey Stedfast <fejj@ximian.com>
* folder-browser.c (message_list_drag_data_get): Use mkdtemp if we
have it, else use mktemp but make the code safer than it was
previously.
* mail-display.c (launch_cb): Free the template string if the
tempdir failed to be created.
svn path=/trunk/; revision=10753
2001-07-02 Sam Creasey <sammy@oh.verio.com>
* mail-account-editor-news.c: Added an MailAccountEditorNews, for
NNTP configuratuion. Based on MailAccountEditor, but stripped.
* Makefile.am: added mail-account-editor-news.c and
mail-account-editor-news.h to SOURCES if ENABLE_NNTP is defined.
* mail-accounts.c (load_news): Moved this function, and fixed some
slight brokenness.
(news_edit): Added functional code using MailAccountEditorNews
(news_add): Added functional code using news_edit after
allocation.
* mail-config.glade: news_editor_window widget added. Used by
MailAccountEditorNews.
* mail-display.c (save_data_cb): Store the pathname used when
saving messages so that the next save box will default to the
previous path.
* message-browser.c (message_browser_new): add signal handler for
size_allocate on the message browser. Thus new windows are size
as they were last allocated.
(message_browser_size_allocate_cb): handler to store allocations.
* message-list.c (message_list_setup_etree): connect to the
info_changed signals for the state of the message_list->tree.
Save the folder state to disk, so that when additional
message_lists are created, they are consistant. e.g. the next
buttons do the same thing in the browser, and in the message
viewer after changing sorting options.
* subscribe-dialog.c (build_tree): freeze sc->folder model while
building the tree. Not doing so takes a very long time over 40000
newsgroups.
svn path=/trunk/; revision=10719
* configure.in: Check for gtkhtml 0.9.99.1.
2001-07-02 Larry Ewing <lewing@ximian.com>
* mail-display.c (save_part): move the saving logic out of save_cb
so that we can reuse it for the image saving code.
(save_cb): call save_part.
(save_url): new function to resolve an save an html url.
(image_save_as): save function for images and. Add it to the
link_menu, and add MASK_URL and MASK_SRC to the structure so that
we cans show the proper menus.
(html_button_press_event): call get_src as well to find external
urls references. Add popup masking.
svn path=/trunk/; revision=10707
2001-06-30 Jon Trowbridge <trow@ximian.com>
* mail-display.c (make_popup_window): Changed to return the
created window.
(find_socket): Added. Copied from e-shell-view.c. The fact
that I'm copying this bit of code all over isn't cool.
(html_button_press_event): Properly destroy the popup window when
the widget inside the control is destroyed.
* mail-callbacks.c (addrbook_sender): Added. Implements
the "Add sender to addressbook" right-click. (Bug #3645)
(find_socket): Added. Copied from e-shell-view.c.
* folder-browser.c: Added "Add sender to addressbook" to
context_menu[].
* mail-display.c: (handle_embedded_address_object): Removed.
(on_object_requested): Removed handling for embedded address
objects. (Which was obsolete crap.)
svn path=/trunk/; revision=10643
2001-06-19 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c: #include "folder-browser-factory.h"
* component-factory.c (mail_remove_storage): New function to
remove an EvolutionStorage.
* mail-accounts.c (mail_delete): Remove the storage from the
folder-tree.
(news_delete): Same.
svn path=/trunk/; revision=10304
* 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
* mail-display.c (on_url_requested): If http mode is
HTTP_SOMETIMES, use e_book_query_address_locally to check the From
address and load images if it's found.
* mail-config.c (config_read): Default http_mode to
MAIL_CONFIG_HTTP_SOMETIMES. Fix typo to make default forward style
actually work.
svn path=/trunk/; revision=9936
* 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
* mail-display.c (on_url_requested): Load http images if the user
has force-loaded images too.
(mail_display_redisplay): Update for normal/headers/source changes.
(mail_display_load_images): New. Force HTTP image loading for the
current message.
* mail-config.c (mail_config_get_message_display_style,
mail_config_set_message_display_style): Updated and renamed from
mail_config_{get,set}_view_source
* mail-callbacks.c (load_images): New.
* folder-browser.c (folder_browser_set_message_display_style):
Renamed and updated from folder_browser_toggle_view_source.
* folder-browser-factory.c (verbs): Add ViewLoadImages.
(control_activate): Update for normal/headers/source change to
radio group.
svn path=/trunk/; revision=9820
* 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
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
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