Commit Graph

7445 Commits

Author SHA1 Message Date
c134c41bcd EMFolderTreeModel: Declare the CamelStore column as an object type.
Declaring the CamelStore column as a raw pointer type dates back to
before Camel was GObject-based.  The problem is the CamelStore could
be finalized while the tree model still has a pointer to it, leaving
behind dangling pointers in the tree model which could cause a crash.

Declaring the column type in the column enum turned out to be a good
idea, as it makes code that needs updated easy to find.  This renames
the enum value from COL_POINTER_CAMEL_STORE to COL_OBJECT_CAMEL_STORE.
2013-11-16 19:24:02 -05:00
1970888280 Add em_folder_tree_ref_selected_store().
Replaces em_folder_tree_get_selected_store().

Same as before, but adds a reference to the returned CamelStore.
2013-11-16 19:24:02 -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
1be51f2325 EMailBackend: Camel no longer has a "network-available" property. 2013-11-13 23:50:01 -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
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
4c2233114d Rename e-mail-enums.h to e-mail-engine-enums.h. 2013-11-11 08:29:20 -05:00
6387b1dae3 EMailAccountManager: Rename "Restore Default" button.
Rename it to "Reset Order".  A little less confusing, I think,
since there's also a "Default" button to set the default account.
2013-11-08 08:41:41 -05:00
acdf842238 Update error handling when sending offline.
Camel now uses GResolver for domain name resolution, so check for
G_RESOLVER_ERROR when sending so the "saving-to-outbox" alert can
work again.
2013-11-04 08:23:34 -05:00
428b0a481b Adapt to CamelDataCache API changes. 2013-11-02 09:39:37 -04:00
bc0d5d40ed Bug 710797 - Name all the timeouts added with g_timeout_add() 2013-10-29 15:22:35 -04:00
19cee36149 Use EProxyPreferences in EPreferencesWindow.
Replaces EMNetworkPrefs.
2013-10-25 12:51:12 -04:00
7a6be11ea6 Miscellaeous cleanups. 2013-10-20 11:15:41 -04:00
b5023d32bd Bug #215115 - Per-folder From: email address
The change also allows setting accounts for certain recipients (based
on a part of the recipient address). The option can be found in Folder
Properties and in Edit->Preferences->Composer Preferences->Send Account.
2013-10-08 13:22:48 +02:00
caef69cb73 Bug #708840 - Crash when closing subscription dialog with running operation 2013-09-30 17:53:42 +02:00
f240fb587f Remove all g_type_init() calls.
g_type_init() is deprecated in GLib 2.36.
2013-09-27 13:26:05 -04:00
2ff0a3ccf0 Adapt to CamelSession trust_prompt() changes. 2013-09-27 10:45:01 -04:00
6d96953703 Add debugging for formatter requests
With CAMEL_DEBUG=emformat:requests the evolution prints a debug messages
about requests being processed when formatting messages.
2013-09-25 09:19:47 +02:00
82010c57ec Adapt to Camel API changes. 2013-09-23 12:03:17 -04:00
bfc448800c Bug #708349 - Memory leaks around mail config 2013-09-23 17:43:18 +02:00
3d0ffdb864 Bug 708004 - Deleting in threaded mode moves cursor to incorrect message 2013-09-14 13:48:43 -04:00
969d801553 Bug #707392 - Only very first Collapse/Expand button in message header pane works
When we were collecting the elements for adding the onclick event
listeners, we were using the webkit_dom_document_get_element_by_id
method, but when email had multiple TO, CC or BCC headers it was
returning just the first elements with given id. To fix this we moved
to webkit_dom_*_query_selector methods that give us more powerfull
element extraction from document.

When toggling the visibility of header row, we are now operating just
in the row that contains the clicked element.

This patch also remove the suffixes from all  __evo-moreaddr ids.
2013-09-13 11:23:14 +02:00
68f27ce0c8 Bug #706008 - Workaround gnome-shell style change on focus change
Avoid redrawing (thus loosing the selection and scroll position) of
preview window on style change by defining the colors through CSS styles.
On style change we just update the CSS color definitions and preview will
update itself without redraw.
2013-09-12 15:29:58 +02:00
5136f4e554 Fix folder name encoding in em_folder_utils_create_folder().
When creating a top-level folder, the folder name was still URI-encoded.
So for example "Top Level Folder" was coming out "Top%20Level%20Folder".

The em_folder_tree_store_root_selected() "if" branch is uncommented and
looks unnecessary to me, so I'm removing it.  Always parse the URI with
e_mail_folder_uri_parse(), which produces a decoded folder name.
2013-09-08 13:26:24 -04:00
3da4948c0f Miscellaneous cleanups. 2013-09-07 19:08:54 -04:00
c54c552e63 EMailDisplay: Remove mail_display_plugin_widget_realize_cb().
Apparently not required anymore, and was actually causing embedded
widgets for attachments to malfunction when collapsed and expanded
again -- particularly audio attachments.
2013-08-31 13:28:41 -04:00
d5f59aee0d EMailDisplay: Remove bind_iframe_content_visibility().
None of my attachment samples invoke bind_iframe_content_visibility().
Both it and toggle_widget_visibility() appear to dead code.  Removing
the functions causes no ill side-effects as far as I can tell.
2013-08-31 12:16:17 -04:00
b4870d386c Bug #706814 - Do not use folder uri in copy/move folder errors 2013-08-29 09:36:55 +02:00
aa25597235 Bug #659715 - Reject folder copy/move in offline 2013-08-27 01:52:02 +02:00
25d9c75be3 Bug 706463 - Refcounting error in e_mail_reader_reply_to_message()
Highlight a section of a mailing list post, click Reply, answer "Reply
Privately", Evolution mishandles the source message's reference count,
causing the message to finalize too early and crash in Camel.
2013-08-23 10:27:06 -04:00
34547da643 EMailReader cleanups. 2013-08-23 10:07:36 -04:00
996055c6e5 Bug #698275 - Enable/disable account yields to a several seconds busy loop 2013-08-21 12:52:31 +02:00
dbec52ebe2 Bug #656804 - Cannot create folder with special characters in name 2013-08-20 12:17:21 +02:00
b7e728dd46 Bug #682277 - Multiselect of messages causes slow UI update 2013-08-20 11:25:06 +02:00
18f8381651 folder_tree_model_folder_renamed_cb: Avoid duplicate rows.
Testing IMAP NOTIFY and folder renames, I observed a "folder-created"
signal emission before the "folder-renamed" signal emission.  So the
renamed folder already exists in the tree model when we receive the
"folder-renamed" signal.  Make sure we handle that sanely.
2013-08-17 12:49:03 -04:00
8cbeb646cf Bug #705657 - Crash in em_utils_selection_set_urilist() 2013-08-08 10:53:31 +02:00
77a825c693 Bug #705119 - File descriptors for images not closed 2013-07-30 12:32:15 +02:00
a1775b683c EMailRequest cleanups. 2013-07-27 21:24:02 -04:00
83134a75c3 EWebView: Add an "image-save" action.
There's now enough hooks in EWebView that it can take over image saving
from EMailDisplay / EMailReader, with the added perk that a "Save Image"
pop-up menu item now appears for images in ALL preview panes.
2013-07-27 21:24:02 -04:00
3eda7a50de Add e_web_view_cursor_image_copy().
Asynchronously copies the image under the cursor to the clipboard.

This replaces the "cursor-image" property, which attempts to match the
image URI to a subresource from WebKitWebDataSource.  The problem with
that approach is EMailDisplay redirects several URI schemes to its own
custom request handlers which further mutate the URI.  So for example,
a text/html message may use a "cid:" URI to refer to an embedded image,
which EMailDisplay transforms to a "mail:" URI and finally to a "data:"
URI.  The final image URI might not be derivable from the original URI
without retracing the SoupRequest.

The "image-copy" action now calls e_web_view_cursor_image_copy().

This also adds an explicit requirement on gdk-pixbuf-2.0 >= 2.24 for
gdk_pixbuf_new_from_stream_async() / finish().

New functions:

  e_web_view_cursor_image_copy()

Removed functions:

  e_web_view_get_cursor_image()
  e_web_view_set_cursor_image()
2013-07-27 21:24:01 -04:00
69837f33cc Add e_web_view_suggest_filename().
Attempts to derive a suggested filename from the given URI for use in a
"Save As" dialog.

By default the suggested filename is the last path segment of the given
URI (the unless the given URI looks like a query), but subclasses can use
other mechanisms for custom URI schemes.  For example, "cid:" URIs in an
email message may refer to a MIME part with a suggested filename in its
Content-Disposition header.
2013-07-27 15:27:09 -04:00
51b74eee72 Add e_web_view_redirect_uri().
Replaces the given URI with a redirected URI as necessary, primarily for
use with custom SoupRequest handlers.  Typically this function would be
called just prior to handing a request off to a SoupSession, such as
from a WebKitWebView "resource-request-starting" signal handler.

Case in point: EMailDisplay now implements the redirect_uri() method,
and calls it from its own "resource-request-starting" signal handler.
2013-07-27 02:16:53 -04:00
14b4291ebd Remove e_web_view_get_uri().
Trivial wrapper for webkit_web_view_get_uri().

Probably made sense while we were transitioning from GtkHTML to WebKit,
but we don't need it anymore.
2013-07-27 02:16:53 -04:00
6b0d293efa EMailPrinter: Disable frame flattening directly.
Not worth having dedicated EWebView APIs for this.
2013-07-27 02:16:52 -04:00
3f3ae7f2c8 Rename e_mail_display_set_parts_list().
Rename to e_mail_display_set_part_list().

Function takes an EMailPartList, not an "EMailPartsList".
2013-07-27 02:16:47 -04:00
a8d2cba23a Rename e_mail_display_get_parts_list().
Rename to e_mail_display_get_part_list().

Function returns an EMailPartList, not an "EMailPartsList".
2013-07-26 08:16:39 -04:00
5cffe63121 Do not mask CAMEL_ERROR_GENERIC in composer_send_completed()
Any provider can return a generic error code, which makes the check
useless, only hiding important error information from a user. Since
the camel_getaddrinfo() returns CAMEL_SERVICE_ERROR_URL_INVALID,
the check could be adapted and be more useful.
2013-07-22 12:03:55 +02:00
8a0bb56823 EMailRequest: Handle empty message bodies more gracefully. 2013-07-19 12:39:58 -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
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