Commit Graph

166 Commits

Author SHA1 Message Date
ce72cf5b4e EMailSession: Remove "junk-filter-name" property.
No longer needed.  Following up on a pre-GSettings "FIXME" item.
2013-11-26 10:41:49 -05:00
122a84d7f6 ESettingsMailSession: Bind to "junk-default-plugin".
Use mapping functions to convert between the filter name string and
the corresponding EMailJunkFilter extension.
2013-11-26 10:41:49 -05:00
3cd87037bc Add e_mail_session_get_junk_filter_by_name().
Looks up an EMailJunkFilter extension by its filter name, as specified
in its class structure.
2013-11-26 10:41:49 -05:00
21effa0d45 Add ESettingsMailSession.
Handles junk mail settings.
2013-11-24 18:43:54 -05:00
570c637480 Fix/mute issues found by Coverity scan
This makes the code free of Coverity scan issues.
It is sometimes quite pedantic and expects/suggests some
coding habits, thus certain changes may look weird, but for a good
thing, I hope. The code is also tagged with Coverity scan
suppressions, to keep the code as is and hide the warning too.
Also note that Coverity treats g_return_if_fail(), g_assert() and
similar macros as unreliable, and it's true these can be disabled
during the compile time, thus it brings in other set of 'weird'
changes.
2013-11-15 09:06:57 +01:00
edf8ad6eff "Disco is dead!", says Camel.
All offline-capable Camel providers use CamelOfflineStore now.
2013-11-13 18:15:50 -05:00
3c30fb1747 Convert libemail-engine to a single-include model.
Use: #include <libemail-engine/libemail-engine.h>
2013-11-11 12:07:43 -05:00
4ea43b34a8 Move EMailImageLoadingPolicy to e-mail-formatter-enums.h.
libemail-engine doesn't need to know about this enum.
2013-11-11 08:29:20 -05:00
9c1975632e Generate enum GTypes for libevolution-mail.
Steals some enum types that libemail-engine doesn't need to know about.
2013-11-11 08:29:20 -05:00
ab13a0e01a Remove unused EMailDisplayStyle enum. 2013-11-11 08:29:20 -05:00
32f5964c6e Fix misspelled enum type. 2013-11-11 08:29:20 -05:00
4c2233114d Rename e-mail-enums.h to e-mail-engine-enums.h. 2013-11-11 08:29:20 -05:00
a7b322d37e Generate documentation for libemail-engine. 2013-11-11 08:10:10 -05:00
bc0d5d40ed Bug 710797 - Name all the timeouts added with g_timeout_add() 2013-10-29 15:22:35 -04:00
d3e0f96c73 Fix error handling glitch in mail_session_send_to_thread().
If sending a message fails but the user was already connected to the
MTA, the error is missed and not handled until further into the logic,
where it's treated as though sending succeeded and only post-processing
failed.  This results in the user seeing a copy of the message in Sent,
but the message was never actually sent.

Fallout from the investigation of bug 710807.
2013-10-29 09:28:17 -04:00
eb16646010 Adapt to Camel's proxy resolver API changes. 2013-10-25 12:51:11 -04:00
f792a7cd14 EMailSession: Implement ref_proxy_resolver() method.
Eventually I'd like to add an ESourceExtension for proxy settings,
but for now we'll live with the old and somewhat broken EProxy API.
2013-09-27 13:26:05 -04:00
2ff0a3ccf0 Adapt to CamelSession trust_prompt() changes. 2013-09-27 10:45:01 -04:00
82010c57ec Adapt to Camel API changes. 2013-09-23 12:03:17 -04:00
3da4948c0f Miscellaneous cleanups. 2013-09-07 19:08:54 -04:00
084974a617 MailFolderCache: Avoid g_signal_handlers_disconnect_matched().
store_info_unref() already disconnects the signal handlers one by one.
2013-08-17 10:29:15 -04:00
52a48c15e0 Bug #705446 - Old POP3 mails can be removed before getting them 2013-08-08 07:48:19 +02:00
660064e202 Bug 704682 - Runtime warning in MailFolderCache 2013-07-27 23:25:35 -04:00
7383843653 Reimplement mail_folder_cache_note_store().
* Use GIO-style async parameters.
* Add mail_folder_cache_note_store_finish().
* Do the bulk of the work in a thread so the logic is more readable.
* Queue multiple calls for the same CamelStore and share the results.
2013-07-19 08:36:56 -04:00
dd4d570b62 Add e_mail_store_go_offline_sync().
Mostly for symmetry with e_mail_store_go_online_sync().
2013-07-19 08:36:56 -04:00
f1cc9011fb Add e_mail_store_go_online_sync().
Need for new mail_folder_cache_note_store() implementation.
2013-07-19 08:36:56 -04:00
270a087974 e-mail-store-utils.c cleanups. 2013-07-19 08:36:55 -04:00
209387d4e3 MailFolderCache: Fix a crash when renaming folders. 2013-07-19 08:36:55 -04:00
f371239062 MailFolderCache: Make UpdateClosure less cryptic.
Directly indicate the signal ID to be emitted from the update callback
instead of playing silly games with boolean flags.
2013-07-17 12:08:47 -04:00
4076f0a50b MailFolderCache: Thread-safety improvements and other cleanups.
* Stop using recursive mutexes.
* Give StoreInfo a reference count.
* Give FolderInfo a reference count.
* Track CamelFolders with GWeakRef instead of weak pointers.
* Submit updates directly to the GMainContext, like we do in EDS,
  instead of dequeuing them all from a single idle callback that
  we then have to track.
2013-07-17 12:08:46 -04:00
99d026acbe MailFolderCache: Remove unnecessary "stores" checks.
The "stores" hash table is created on instance init and destroyed with
the cache itself.  It is never NULL during MailFolderCache's lifetime.
2013-07-17 12:08:46 -04:00
060bb07662 mail_folder_cache_get_folder_info_flags: Change parameters.
Take a CamelStore and folder name instead of a CamelFolder.

CamelStore and folder name can easily be obtained from either a folder
URI or a CamelFolder instance, and the function is more efficient with
separate parameters.
2013-07-17 12:08:46 -04:00
c36aa6b749 Add mail_folder_cache_ref_folder().
Replaces mail_folder_cache_get_folder_from_uri().

Returns the CamelFolder for the CamelStore and folder name if available,
or else NULL if a CamelFolder instance is not yet cached.  This function
does not block.
2013-07-17 12:08:46 -04:00
4de5726797 Add mail_folder_cache_has_folder_info().
Returns whether MailFolderCache has information about the folder
described by the CamelStore and folder name.  This does not necessarily
mean it has the CamelFolder instance, but it at least has some meta-data
about it.

You can use this function as a folder existence test.
2013-07-17 12:08:46 -04:00
079fc1a78d MailFolderCache: Add a read-only "main-context" property.
New functions:

  mail_folder_cache_ref_main_context()
2013-07-17 12:08:46 -04:00
3f2d55fb7f MailFolderCache: Remove the "session" property.
I considered replacing the "session" property with a "registry"
property, but that just complicates application startup even more.
Fact is, if we have a CamelStore then we can get the CamelSession
and even the ESourceRegistry from it.  Kinda dirty, but works.

It goes a little something like this...

  camel_service = CAMEL_SERVICE (camel_store);
  camel_session = camel_service_get_session (camel_service);
   mail_session = E_MAIL_SESSION (camel_session);
       registry = e_mail_session_get_registry (mail_session);

Removed functions:

  mail_folder_cache_get_session()
2013-07-17 12:08:46 -04:00
c085e4b445 MailFolderCache: Remove unused "unsub" field. 2013-07-17 12:08:46 -04:00
a877db3749 Remove unused mail_folder_cache_get_folder_has_children(). 2013-07-17 12:08:46 -04:00
cd76c782bd Miscellaneous cleanups. 2013-07-07 11:39:47 -04:00
046a17ba19 Bug 703181 - Asked for password which is never used
When the SASL mechanism reports that it can try an "empty password", give
it the opportunity to do so before we demand that the user provide one.

(Patch mostly by mbarnes; thanks)
2013-06-27 22:06:15 +01:00
1dea0429cf Remove em_utils_uids_free().
No longer used.  We actually had this defined in two places.
2013-06-15 08:28:37 -04:00
f642e03d49 message_list_get_selected: Give the returned array a free func.
The returned UID array now has a built-in "free" function for its
elements and should be released by callers with g_ptr_array_unref()
rather than em_utils_uids_free() or some equivalent.
2013-06-15 08:19:27 -04:00
f60986649a Remove global "shell_builtin_backend" variable.
No longer used.  Always nice to remove a dirty hack on a dirty hack.
2013-06-14 10:06:39 -04:00
5b0e9e7791 Bug #250046 - Empty group address as recipient prevents message send
Empty group addresses were left as-is when sending an email directly,
not through Outbox, which could cause a send error through SMTP.
Expanding group addresses, or removing empty groups, from a list
or recipients before sending the message fixes the issue.
2013-06-03 19:22:03 +02:00
13089f0d50 e_mail_session_send_to(): Don't silently ignore if we can't send.
If sending fails for any reason, return a suitable GError.  Don't just
return silently.  Also check for a wider range of errors indicating the
service is unavailable in composer_send_completed().  This will trigger
the "save-to-outbox" info alert.
2013-05-29 16:50:27 -04:00
6c9a3243c9 Rename libeutil to libevolution-util.
To make Evolution's shared libraries more consistent.

Also rename the documentation module to evolution-util.
2013-05-28 09:56:30 -04:00
92817706c5 Utilize the new EMailSession functions when sending. 2013-05-24 22:03:51 -04:00
dea7daf4c3 EMailSession: Add helper functions for sending messages.
New functions:

    e_mail_session_get_fcc_for_message_sync()
    e_mail_session_get_fcc_for_message()
    e_mail_session_get_fcc_for_message_finish()
    e_mail_session_ref_transport()
    e_mail_session_ref_default_transport()
    e_mail_session_ref_transport_for_message()
2013-05-24 22:03:51 -04:00
58ef547151 Coding style and whitespace cleanup. 2013-05-08 08:28:09 -04:00
7dec65de1a build: Fix srcdir != builddir from git
Mimicing Colin's commit fb9b02e for E-D-S.

We can't do (cd $(srcdir); ...) and inside reference $(top_srcdir)
because that variable uses a *relative* path.  Thus we copy the
approach from gnome-shell of explicitly using addprefix to append
the source directory.
2013-04-18 11:30:24 -04:00