* desktop/CMakeLists.txt: Translate the appdata file rather than just
installing it directly.
* desktop/geary.appdata.xml.in: Rename from 'geary.appdata.xml', make
name, summary and description translatable.
* cmake/FindIntltool.cmake: Add a CMake command for the appdata file.
* po/POTFILES.in: Include geary.appdata.xml.in.
Commit 0c31607 made it possible for Geary to send messages as both
US-ASCII and ISO-8859-1, as part of the workaround for Bug 769137.
This introduced a bug however where if a message contained 8-bit
ISO-8859-1 chars but didn't include ant UTF-8 chars, the UTF-8 message
body would be encoded as if it was ISO-8859-1, and hence the high-bit
chars would be corrupted.
The solution is to re-encode the body in whatever charset it will be sent
as, before sending it.
* src/engine/rfc822/rfc822-message.vala (Message): Break out the common
parts of generating a message body part from
Message::from_composed_email into the new ::body_data_to_part method.
Ensure that the body data is conveted into US-ASCII or ISO-8859-1
before attempting to guess what transfer encoding should be used or
setting it as the content of the new body part.
* src/engine/rfc822/rfc822-utils.vala (Geary.RFC822.Utils): Replace
get_best() with get_best_charset(), since we can't guess both charset
and transfer encoding at the same time any more. Ensure we reset the
source stream after guessing (and in get_best_encoding) so that
subsequent uses don't simply get an EOS.
If one account DB upgrade completes before the next one starts, the
upgrade will be destroyed and become invalid, leading to errors when the
next does start.
This fix keeps the dialog around permanently, which is a waste of RAM,
but that's better than crashing.
* src/client/dialogs/upgrade-dialog.vala (Object): Hide, don't destroy
the upgrade dialog when it is hidden.
* src/client/composer/composer-widget.vala (ComposerWidget): Move code
from connect_to_draft_manager and disconnect_from_draft_manager into
their callers. Tidy up the source a bit.
* desktop/CMakeLists.txt: Fix name of Elementary Contractor desktop file
and disable Desktop file validation for it since it doesn't actually
validate.
* cmake/FindDesktopFileValidate.cmake, cmake/FindIntltool.cmake: Don't
assume XDG Desktop files are named ".desktop" - they aren't for
Elementary's Contractor. Require callers to pass the full name in, fix
call sites.
Use Gdk.Screen to determne what is a reasonable size. Follow the
reccomendations at https://wiki.gnome.org/HowDoI/SaveWindowState to save
main window maximised state, width and height.
This also fixes Geary forgetting its maximised setting when the window is
closed, and ensures the window is centered on the screen when mapped.
Bug 730356.
WebKitGTK+ will occasionally crash when removing a node from the document
that has nested tables as descendants and the nested table's cells have
borders. Removing the nested table's cell's children depth-first in
reverse order will avoid triggering the bug. See Bug 769010.
Bug 769010.
Despite RFC 3676 defining format=flowed lines as ending in CRLF, some
software doesn't do that. Workaround this when parsing F=F by always
converting CRLF to just LF, then just looking for LF alone as line
endings.
Bug 769137
* src/engine/rfc822/rfc822-message.vala
(Message::mime_part_to_memory_buffer): Unconditionally convert CRLF to
just LF, do so before applying the F=F filter.
* src/engine/rfc822/rfc822-gmime-filter-flowed.vala: Re-write to not
expect CRLF sequences, or treat CR any differently. As a bonus, also
check for signature lines without requiring the whole sig line to be in
the bufer.
* src/client/conversation-viewer/conversation-web-view.vala
(ConversationWebView::on_resource_request_starting): Check that the URI
is not null before using it.
(ConversationWebView::is_always_loaded): Remove null check and don't
allow the param to be null, since all uses now pass in a non-null
param.
* src/engine/imap-engine/imap-engine-minimal-folder.vala
(MinimalFolder::start_remote_open_timer): Set the soruce id to 0 when
the timer callback executes, so it is not attempted to be removed in
the future. Tidy up the source a bit.
Additional follow-up to Bug 767438.
* src/client/conversation-viewer/conversation-viewer.vala
(ConversationViewer::set_message_html): Always call
::insert_html_markup since that is where we are taking care of a
possibly null body_text.
Commit f6518b0 relied on the load being cancelled, which only happens if
you change conversation, not folder. Changing the foldler will eventually
change the conversation, but not after a nnumber of async calls.
Bug 714509.
* src/client/conversation-viewer/conversation-viewer.vala
(ConversationViewer::on_folder_selected): Cancel existing load before
preceeding.
* src/client/conversation-viewer/conversation-viewer.vala
(ConversationViewer::select_conversation_async): Ensure loading
has not been cancelled after yielding to the list_full_messages_async
call before attempting to add the messages.
Previously, Geary would simply assume that UTF-8 is a reasonable charset
to use when sending both plain text and HTML parts. It is, however
Mailman will re-encode content sent ast UTF-8 using Base64, and break
format=flowed in the process.
This works around the problem for messages containing US-ASCII or
ISO-8859-1 chars, at least. No solution yet for UTF-8 except maybe
getting Mailman fixed.
Bug 769137
* src/engine/rfc822/rfc822-message.vala (Message): Guess the best charset
for a message's content rather than assuming UTF-8. Set the charset for
both plain text and HTML parts, but only guess it and the encoding at
max once for both.
* src/engine/rfc822/rfc822-utils.vala: Replace get_best_content_encoding
with get_best for determing both charset and encoding, and
get_best_encoding for just guessing encoding, both using
GMime.FilterBest instead of our own custom code.
* src/client/util/util-webkit.vala (Util.DOM.html_to_flowed_text): If a
line is space-stuffed, ignore the stuffing space when determining where
to break the line.
* src/engine/api/geary-service-provider.vala
(ServiceProvider::from_string): Throw an error rather than an assert
when the provided string is not found.