See the ticket (comment #2) for more information on the thinking and
strategy here, but in a nutshell this will remove from the Geary
database all emails no longer accessible via any folder and not seen
on the server in over 30 days. It also deletes those messages
attachment(s) and removes any empty directories in the attachment/
directory to prevent clutter. If enough messages are garbage
collected, Geary will vacuum the database at startup, which will
lower its disk footprint and reduce fragmentation, potentially
increasing performance.
This introduces a new full-text search algorithm that attempts to
curb the effects of overstemming in the Porter Snowball stemmer.
The FTS table will be regenerated with this update.
The crux of this new algorithm is a configurable heuristic that
reduces stemmed matching. The configuration is not available via the
UI (I suspect it will only confuse users) but can be changed by power
users via GSettings. More information is available at:
https://wiki.gnome.org/Apps/Geary/FullTextSearchStrategy
Although prior fix for bug #737811 solved problem for some users,
apparently Geary still had an issue when upgrading a database with
new GLib Mutex implementation, which uses Linux's futexes whenever
available. This solution gives the notifying thread a chance to
signal the waiter that its work is completed.
Prior code inadvertantly limited UID and UIDVALIDITY to signed, not
unsigned, 32-bit integers. I've also added stronger checking of
numbers received off the wire, both that they're truly numeric
according to RFC and that they're within boundaries, if specified.
This also enforces bit width of integers from IMAP string parameters
to avoid similar problems in the future.
Bug #740041.
* src/engine/imap/message/imap-internal-date.vala:
Geary.Imap.InternalDate::to_search_parameter was returning the result
of serialize(), rather than serialize_for_search().
Commit 96aaf3 fixed a bug with regard to IDLE status responses being
improperly reported to ClientSession. As it turned out, that fix
introduced a bug by not properly decrementing outstanding_cmds, which
left the ClientConnection in a state where it would never enter IDLE
thereafter.
The problem is a change I pondered at the time but didn't commit due
to that fix being so close to release time: not reporting the original
IDLE command to ClientSession either. That in itself is harmless, but
not doing that also avoids incrementing outstanding_cmds for that
command, meaning when the IDLE completes that value returns to zero
and the ClientConnection is in an appropriate state to return to IDLE
when ready.
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.