We've become more confident about saving drafts (although issues
remain ensure old ones are deleted as new ones take their place).
I'm dropping the timeout to 10 seconds to reduce network activity
and the number of discarded drafts generated while writing them, which
fills up the users' trash.
The text label needed to have an ellipsize mode set, otherwise it
enforced a minimum width of the label text itself. Worse, even if
that label was removed, the minimum width remained.
This fix might be too generous, as it allows for the sidebar to be
collapsed pretty narrowly, causing all text to be ellipsized. It's a
start, however.
The assertion was a sanity check that's outlived its original purpose.
When it triggers now, it means an internationalization/encoding issue,
usually with non-Gmail servers that implement XLIST. Rather than
assert and make Geary unusuable for a subset of our non-English
speaking users, log a message and continue.
This also closes bug #713808, as lesser-used fields (Reply-To, Bcc)
are hidden unless the user expands the composer to show them. Right
now that is an option in the composer's toolbar menu; that may change
in the future if we can find the right place to put the widgetry.
This is the result of the recent fix for Turkish locale users. That
patch was sufficient to solve their issue, but this patch is more
thorough in naming to ensure in the future it's understood that the
IMAP StringParameter objects deal in ASCII, not UTF-8. If a string
cannot be converted into a StringParameter (must be represented by a
LiteralParameter), that is now also enforced via an ImapError.
Discovered while working on Turkish UTF-8 bug, technically the IMAP
Deserializer was missing two things: (a) NUL is never allowed in an
IMAP line, even if the string is quoted, and so it should be dropped
rather than processed and cause potential issues, and (b)
DataInputStream will read to EOL, potentially leaving embedded NULs in
the line, meaning the old code would stop without processing the
entire IMAP response.
Although no server has been reported with these issues, I felt it
important to get this right as a defensive measure.
This also has the effect of avoiding excessive draft saves due to
the multiple From: widget's changed signal firing even though the
account didn't actually change.
When connecting to any IMAP server while the local user's locale is
configured to be Turkish, Geary will mis-parse many of the IMAP
server's responses, leading to essentially a failed connection due to
state issues and more.
The problem is that some of the parsing code was using g_utf8_strdown
to convert received text to lowercase to perform case-insensitive
string comparisons. Turkish has multiple letter I's (dotted and
dotless), and when the UTF-8 code transformed it to lowercase, a
different UTF-8 code point was selected than the English/ASCII 'i'.
The solution is to explicitly use ASCII variants of string
transformation, comparison, and hashing to ensure 7-bit operations are
used throughout the IMAP and RFC822 stack. Further commits will
follow that enforce this a bit more, but this commit is sufficient to
correct the problem for our Turkish users.
In addition to changes in prior three commits, this updates the
password prompt UI to closer match the new GNOME HIG. It uses
dim-label labels and suggested-action for the OK button, whose text
is changed to "Authenticate". It also cleans up the inter-widget
spacing, which was a bit excessive.
Although commit for bug #720769 ensures that the password dialog is
transient for Geary's main window, this text change ensures the user
knows the password being asked for is for Geary.
Not only a transient parent, but the main window is shown and
presented if hidden to ensure everything is displayed. This ensures
the password prompt is associated with Geary, answering some of the
concerns in bug #739195.
Status.FAILED was only being used by CreateEmailOperation, and even
then it was being used inappropriately. ReplayOperations should throw
an Error on failure.
This change does two things: (a) Only activate the search index
progress monitor if indexing has actually started (i.e. doesn't
display if no work is to be done), and (b) better estimates the amount
of work to be performed so the progress bar doesn't "jump" at the very
end.
SELECT within a SELECT can be deadly with SQLite and we've coded them
out of other places to improve database performance. The initial
search table scan at startup also used a SELECT within a SELECT, and
so refactoring it to manually perform the UNION operation improves
performance. The normal case (no rows must be indexed) is completed
almost instantaneously now.
This disables SSLv3 in GnuTLS (and therefore WebKit) to avoid
susceptibility to the POODLE attack vector. This is an extremely
unlikely vector for Geary as Javascript is disabled for all WebKit
views.
If the Welcome dialog (used to create the initial account) is visible
and Geary was re-run, an empty main window would appear. This is due
to the Welcome dialog hiding the main window until the first account
is created. Now, if Geary is re-run the Welcome dialog is presented
to the user.
This may possibly solve bug #737811.
Inline images with a Content-ID were being processed by the inline
image replacer but post-processing code would then drop the IMG tag
and replace it with the full-sized unrotated image data URI. This
corrects that problem by noting when an image with a Content-ID has
been replaced.
Inline images are rotated and scaled when displayed in the
conversation viewer for speed reasons (as well as to make extremely
large images manageable for the user to view). They were converted
to PNG during this operation.
Saving the image was, in turn, saving the rotated/scaled PNG although
the filename remained the original name (i.e. .jpg, usually), causing
issues for other tools who detect image type from the extension.
This patch solves this problem by maintaining the original image
buffer in memory. When the user goes to save the image, the original
buffer is saved, not the rotated and scaled PNG.