Commit Graph

89 Commits

Author SHA1 Message Date
Dan Vrátil 5b8340563c Mail formatter rewrite
All mail-parsing and formatting code has been moved to em-format.
Parsing is handeled by EMailParser class, formatting by EMailFormatter.
Both classes have registry which hold extensions - simple classes
that do actual parsing and formatting. Each supported mime-type
has it's own parser and formatter extension class.
2012-06-06 15:27:19 +02:00
Matthew Barnes 2a39437ee9 Adapt to single-include E-D-S libraries. 2012-06-03 15:14:03 -04:00
Matthew Barnes 3449e5fcc7 Adapt mail to the new ESource API. 2012-06-02 23:00:40 -04:00
Matthew Barnes 9ed9a99bad EMFormat: Add "session" as a constructor property.
Pass it in instead of digging it out of EShellSettings.
2012-03-31 15:48:01 -04:00
Matthew Barnes 61ae36351b Introduce libemail-engine and libemail-utils.
These libraries are bound for E-D-S so they live at the lowest layer of
Evolution for now -- even libeutil can link to them (but please don't).

This is the first step toward moving mail handing to a D-Bus service.
2012-01-18 23:48:47 -05:00
Matthew Barnes 88505f694e Make em_utils_generate_account_hash() private.
Only used by em_utils_get_reply_all(), and the hash table it returns is
not safe for general-purpose use.  Make it a static function and rename
it generate_recipient_hash().
2012-01-05 09:08:10 -05:00
Milan Crha 0cd98f1a85 Bug #661087 - Add ability to remove localized "Re:" prefixes in subject 2011-12-22 16:38:51 +01:00
Matthew Barnes 987fb91d5e Reduce diff noise with account-mgmt branch. 2011-12-19 22:27:39 -05:00
Matthew Barnes a9cfed5938 Avoid passing EMailBackend as much as possible.
More mail API churn... reversing some previous API decisions.

I've made some key API changes to EMailSession on the account-mgmt
branch which should allow for this, and will hopefully also benefit
the "email-factory" branch.

EMailBackend barely needs to exist anymore, except as the owner of
EMailSession.

For several low-level functions, we replace its EMailBackend parameter
with EMailSession and EAlertSink parameters; the latter so it can still
pass user alerts up the chain.
2011-12-16 10:58:54 -05:00
Matthew Barnes 7c0c40f833 Reorder accounts by drag-and-drop.
This implements https://bugzilla.gnome.org/show_bug.cgi?id=663527#c3.

Account reordering is now done by drag-and-drop instead of up/down
buttons.

Turned out to be a wee bit more complicated than I initially thought.

This scraps EAccountManager and EAccountTreeView and replaces them with
new classes centered around EMailAccountStore, which EMailSession owns.

EMailAccountStore is the model behind the account list in Preferences.
The folder tree model now uses it to sort its own top-level rows using
gtk_tree_path_compare().  It also broadcasts account operations through
signals so we don't have to rely so heavily on EAccountList signals,
since EAccountList is going away soon.

Also as part of this work, the e-mail-local.h and e-mail-store.h APIs
have been merged into EMailSession and MailFolderCache.
2011-12-10 21:34:19 -05:00
Milan Crha f9fee6a584 Bug #659945 - "New" button in toolbar for new mail message not working 2011-11-10 13:28:38 +01:00
Matthew Barnes 9773f0a3b8 EMFormatHTML: Configure CamelHttpStreams with proxy authpass.
Base64-encode the "USER:PASS" authentication string ourselves and hand
it to camel_http_stream_set_proxy_authpass().

This is so I can kill camel_http_stream_set_proxy().
2011-09-26 09:45:55 -04:00
Milan Crha e0548d2570 Bug #351025 - Make the order of the mail accounts configurable 2011-09-26 11:45:59 +02:00
Matthew Barnes f67a5f3d42 Miscellaneous cleanups.
Reducing diff noise with the account-mgmt branch.

Trying to erode our dependency on EAccount as much as possible, or at
least isolate its usage, to make things easier for me on the branch.
2011-08-30 20:35:11 -04:00
Milan Crha 7c6aa944e2 Bug #650671 - Service connect/disconnect not cancelled properly 2011-07-01 20:01:45 +02:00
Matthew Barnes 956aaa091f Remove em_utils_folder_name_from_uri(). 2011-05-29 14:03:58 -04:00
Matthew Barnes c6d62ffed1 Remove em_uri_from_camel() and em_uri_to_camel().
Functions are no longer used, or wanted.
2011-05-05 18:38:31 -04:00
Matthew Barnes d05029936c Drop 'folder_uri' member from MessageList. 2011-05-03 14:59:38 -04:00
Matthew Barnes c3b983d6e1 Drop 'folder_uri' param from em_utils_folder_is_outbox(). 2011-05-03 09:42:06 -04:00
Matthew Barnes b9f932b1b8 Drop 'folder_uri' param from em_utils_folder_is_sent(). 2011-05-03 09:42:06 -04:00
Matthew Barnes c694ca567b Drop 'folder_uri' param from em_utils_folder_is_templates(). 2011-05-03 09:42:06 -04:00
Matthew Barnes 9e0f0f529f Drop 'folder_uri' param from em_utils_folder_is_drafts(). 2011-05-03 09:42:06 -04:00
Matthew Barnes 397aeade05 Adapt to CamelService changes. 2011-04-21 07:45:45 -04:00
Milan Crha f1e4164380 Bug #643218 - Local delivery doesn't deliver after maildir migration 2011-03-03 14:13:33 +01:00
Milan Crha a10247b540 Bug #635144 - Using external editor duplicates signature 2011-02-01 18:09:00 +01:00
Milan Crha d6d0d1050a Bug #445439 - Delete mail from pop-server when deleted from Inbox/Trash 2010-10-27 10:06:57 +02:00
Matthew Barnes 35e55a8d6e Send errors to an EAlertSink instead of the task bar.
This marks the end of unintrusive error dialogs, which were too
unintrusive.  We now show errors directly in the main window using
the EAlert / EAlertSink framework.
2010-10-18 12:32:37 -04:00
Matthew Barnes a06e4484b8 Give MailSession a permanent home.
Global variables in shared libraries are a bad idea.  EMailBackend now
owns the MailSession instance, which is actually now EMailSession.

Move the blocking utility functions in mail-tools.c to e-mail-session.c
and add asynchronous variants.  Same approach as Camel.

Replace EMailReader.get_shell_backend() with EMailReader.get_backend(),
which returns an EMailBackend.  Easier access to the EMailSession.
2010-10-12 13:58:59 -04:00
Matthew Barnes 75b078e997 Kill em_utils_temp_save_part().
Rewrite the last usage of it in itip-formatter.c to use EAttachments
instead.  This also allowed me to kill mail_save_part() in mail-ops.c.

I may need to reevaluate the EAttachment API at some point for all these
fringe EAttachment uses we're accumulating.  Having to asynchronously
"load" an EAttachment whose content is already in memory kinda sucks.
2010-09-30 13:55:38 -04:00
Matthew Barnes a91eeb6471 Pass GCancellable to Camel. 2010-09-28 11:35:55 -04:00
Matthew Barnes cd53ba9900 Coding style cleanups. 2010-09-13 08:28:58 -04:00
Matthew Barnes 137b0743dd Migrate from CamelException to GError. 2010-07-08 14:37:52 -04:00
Matthew Barnes fabb6b035c Only #include Camel's top-level header. 2010-04-02 16:59:20 -04:00
Matthew Barnes 58d0d111af Prevent future bugs like #612792.
Add G_GNUC_NULL_TERMINATED to EAlert functions with variable-length
parameter lists and drop the unnecessary "arg0" parameter so the
function attribute works correctly.
2010-03-15 10:38:59 -04:00
Milan Crha 5accac136e Bug #604994 - Folder state not preserved in Copy/Move Folder dialog 2010-01-07 16:46:14 +01:00
Jonathon Jongsma b887606a6b Move forward_to() implementation to MailSession (remove dep on composer)
Previously, the CamelSesssion's forward_to vfunc was implemented in
em-composer-utils.  However, there wasn't really any composer-related
functionality that this function depended on, so in order to remove
MailSession's dependency on composer-related functionality, this function was
moved into mail-session.c.  So now, instead of calling
em_utils_forward_message_raw(), you should just call camel_session_forward_to()
instead.

This change necessitated moving a couple of "guess_account"-related functions
into em-utils, but that's ok for now -- it matches the existing
em_utils_guess_account() function that's already there.

https://bugzilla.gnome.org/show_bug.cgi?id=604952
2009-12-21 09:45:27 -06:00
Jonathon Jongsma 968ea42023 Kill em_utils_get_data/config_dir(), push down to MailSession
This pushes the get_data_dir() API down to the right level.  At present, it is
still implemented by querying the shell backend for the data dir / config dir.
But this should eventually be reversed (when mail is split off to EDS) so that
the mail daemon is the one responsible for the storage locations and the shell
backend queries the daemon for these values.
2009-12-16 11:10:02 -06:00
Matthew Barnes c52f17a177 Kill em_utils_adjustment_page(). 2009-12-15 23:59:18 -05:00
Ritesh Khadgaray 82e862889d Bug 563555 - Confirm before forwarding many emails inline 2009-11-19 16:08:34 -05:00
Matthew Barnes 3dfdf087fc Kill more redundant save dialogs and related utilities. 2009-11-10 18:18:11 -05:00
Matthew Barnes 5783bb4eb0 Kill more redundant save functions. 2009-11-07 16:09:05 -05:00
Milan Crha 12cb5975ab Bug #397265 - Image loading for new contact requires restarting Evolution 2009-10-26 15:05:27 +05:30
Milan Crha f74a144894 Bug #322261 - vCalendar replies are sent out using the default account 2009-10-15 21:02:42 +02:00
Milan Crha 13651b3d19 Bug #314333 - Decrypt body in reply to an inline-PGP encrypted mail 2009-10-15 14:25:38 +02:00
Matthew Barnes fa9051e040 Finish killing Bonobo. 2009-09-08 14:53:45 -04:00
Matthew Barnes f0d3f3afdf Radically reorganize source code.
- Collect all shell modules into a new top-level 'modules' directory:

      $(top_srcdir)/modules/addressbook
      $(top_srcdir)/modules/calendar
      $(top_srcdir)/modules/mail

  Nothing is allowed to link to these, not plugins nor other modules.

  THIS SOLVES BUG #571275 AND OPENS THE DOOR TO PORTING TO MAC OS X.

- Mimic the libevolution-mail-shared library from master (except drop
  the "shared" suffix) and have libevolution-mail-importers and all
  mail-related plugins link to it.

- Discard the a11y subdirectories and have the files live alongside
  their counterpart widgets.
2009-06-24 18:29:22 -04:00
Matthew Barnes c6911b3029 Fix "make distcheck" errors. 2009-06-19 12:43:28 -04:00
Matthew Barnes 433eac7844 More code cleanup. 2009-06-02 10:35:03 -04:00
Matthew Barnes 948235c3d1 Prefer GLib basic types over C types. 2009-05-27 10:29:19 -04:00
Matthew Barnes cc3a98fc1a Merge branch 'master' into kill-bonobo
Conflicts:
	a11y/widgets/ea-combo-button.c
	a11y/widgets/ea-combo-button.h
	addressbook/gui/component/addressbook-component.c
	addressbook/gui/component/addressbook-component.h
	addressbook/gui/component/addressbook-view.c
	addressbook/gui/component/addressbook-view.h
	addressbook/gui/component/component-factory.c
	addressbook/gui/widgets/e-addressbook-view.c
	addressbook/gui/widgets/eab-contact-display.c
	addressbook/gui/widgets/eab-gui-util.h
	addressbook/gui/widgets/eab-menu.c
	addressbook/gui/widgets/eab-menu.h
	addressbook/gui/widgets/eab-popup-control.c
	addressbook/gui/widgets/eab-popup-control.h
	addressbook/gui/widgets/eab-popup.c
	addressbook/gui/widgets/eab-popup.h
	calendar/gui/cal-search-bar.c
	calendar/gui/calendar-commands.c
	calendar/gui/calendar-component.c
	calendar/gui/comp-editor-factory.c
	calendar/gui/comp-editor-factory.h
	calendar/gui/control-factory.c
	calendar/gui/dialogs/comp-editor.c
	calendar/gui/e-cal-component-memo-preview.c
	calendar/gui/e-cal-component-memo-preview.h
	calendar/gui/e-calendar-table.c
	calendar/gui/e-memo-table.c
	calendar/gui/e-memos.c
	calendar/gui/e-tasks.c
	calendar/gui/gnome-cal.c
	calendar/gui/gnome-cal.h
	calendar/gui/itip-bonobo-control.c
	calendar/gui/itip-bonobo-control.h
	calendar/gui/main.c
	calendar/gui/memos-component.c
	calendar/gui/memos-control.c
	calendar/gui/memos-control.h
	calendar/gui/migration.c
	calendar/gui/migration.h
	calendar/gui/tasks-component.c
	calendar/gui/tasks-control.c
	calendar/importers/main.c
	composer/Makefile.am
	composer/e-composer-header-table.c
	composer/e-composer-header.c
	composer/e-composer-header.h
	composer/e-composer-name-header.c
	composer/e-composer-private.c
	composer/e-composer-text-header.c
	composer/e-msg-composer.c
	composer/e-msg-composer.h
	e-util/e-corba-utils.h
	e-util/e-logger.c
	e-util/e-logger.h
	e-util/e-util-labels.c
	e-util/e-util-labels.h
	em-format/em-format.c
	mail/Makefile.am
	mail/e-mail-shell-migrate.c
	mail/em-account-editor.c
	mail/em-account-editor.h
	mail/em-composer-prefs.c
	mail/em-composer-utils.c
	mail/em-composer-utils.h
	mail/em-folder-browser.c
	mail/em-folder-tree-model.c
	mail/em-folder-tree.c
	mail/em-folder-tree.h
	mail/em-folder-utils.c
	mail/em-folder-utils.h
	mail/em-folder-view.c
	mail/em-format-html-display.c
	mail/em-format-html.c
	mail/em-mailer-prefs.c
	mail/em-mailer-prefs.h
	mail/em-message-browser.c
	mail/em-message-browser.h
	mail/em-network-prefs.h
	mail/em-popup.c
	mail/em-utils.c
	mail/importers/Makefile.am
	mail/mail-component-factory.c
	mail/mail-component.c
	mail/mail-config-factory.c
	mail/mail-config-factory.h
	mail/mail-config.c
	mail/mail-dialogs.glade
	mail/mail-types.h
	plugins/calendar-weather/calendar-weather.c
	plugins/mail-account-disable/mail-account-disable.c
	plugins/select-one-source/select-one-source.c
	po/POTFILES.in
	shell/e-component-registry.c
	shell/e-component-registry.h
	shell/e-component-view.c
	shell/e-component-view.h
	shell/e-corba-config-page.c
	shell/e-corba-config-page.h
	shell/e-shell-constants.h
	shell/e-shell-settings-dialog.c
	shell/e-shell-settings-dialog.h
	shell/e-shell-window-commands.c
	shell/e-shell-window.c
	shell/e-shell.h
	shell/e-sidebar.c
	shell/e-sidebar.h
	shell/e-user-creatable-items-handler.c
	shell/e-user-creatable-items-handler.h
	shell/es-menu.c
	shell/es-menu.h
	shell/evolution-component.h
	shell/evolution-config-control.c
	shell/evolution-config-control.h
	shell/evolution-listener.c
	shell/evolution-listener.h
	shell/evolution-shell-component-utils.c
	shell/evolution-shell-component-utils.h
	shell/importer/evolution-importer-client.c
	shell/importer/evolution-importer-client.h
	shell/importer/evolution-importer-listener.c
	shell/importer/evolution-importer-listener.h
	shell/importer/evolution-importer.c
	shell/importer/evolution-importer.h
	shell/importer/evolution-intelligent-importer.c
	shell/importer/evolution-intelligent-importer.h
	shell/importer/intelligent.c
	shell/main.c
	shell/test/evolution-test-component.c
	shell/test/evolution-test-component.h
	widgets/menus/gal-view-instance.c
	widgets/menus/gal-view-menus.c
	widgets/menus/gal-view-menus.h
	widgets/misc/Makefile.am
	widgets/misc/e-activity-handler.c
	widgets/misc/e-activity-handler.h
	widgets/misc/e-charset-picker.c
	widgets/misc/e-combo-button.c
	widgets/misc/e-combo-button.h
	widgets/misc/e-config-page.h
	widgets/misc/e-dropdown-button.c
	widgets/misc/e-dropdown-button.h
	widgets/misc/e-filter-bar.c
	widgets/misc/e-info-label.c
	widgets/misc/e-info-label.h
	widgets/misc/e-multi-config-dialog.c
	widgets/misc/e-multi-config-dialog.h
	widgets/misc/e-search-bar.c
	widgets/misc/e-search-bar.h
	widgets/misc/e-task-bar.c
	widgets/misc/e-task-bar.h
	widgets/misc/e-task-widget.c
	widgets/misc/e-task-widget.h
	widgets/misc/test-dropdown-button.c
	widgets/misc/test-error.c
	widgets/misc/test-info-label.c
	widgets/table/e-table-example-1.c
2009-05-27 08:37:17 -04:00