Commit graph

685 commits

Author SHA1 Message Date
Jim Nelson
29ae18b3f0 In Non-English locales, Geary displays wrong month: Closes #7354
Stricter parsing and application of INTERNALDATE.
2013-09-25 18:04:58 -07:00
Jim Nelson
cb1421a52b Remove Gee.TreeSet workaround: Closes #7304
Now require Gee 0.8.5 or better.
2013-09-25 12:58:11 -07:00
Charles Lindsay
1ea30afa18 Add delay before retrying IMAP connection; fix #7489 2013-09-25 12:13:28 -07:00
Eric Gregory
ac7be842e6 Closes #7138 Fix for unnecessary SMTP password prompt 2013-09-25 12:10:08 -07:00
Charles Lindsay
4b03618f08 Set SQLite page size to 4K: Closes #7423
This speeds up startup time immensely, probably due it matching the
the filesystem's or Linux memory mgmt's page size.  It's also
expected that this will improve database performance in other ways,
as the default was 1K, meaning potentially more I/O than necessary
for standard operations.
2013-09-24 18:48:12 -07:00
Charles Lindsay
20ac1078f6 Add words from query to highlighting; fix #7205 2013-09-24 17:48:35 -07:00
Jim Nelson
1cca5a5e1a Perform database upgrade in background thread: Closes #7206
Db.VersionedDatabase.open_background() will do open() in background
thread.  ImapDB.Database now uses upcalls to schedule progress
monitor updates and a polled callback to pump the event loop.
2013-09-24 17:08:02 -07:00
Eric Gregory
0b4bc055b2 Closes #7496 Drafts! support! in! Yahoo! Mail! 2013-09-24 14:46:40 -07:00
Eric Gregory
15fd856d20 Closes #7535 Closes #7533 Check if DB is open in imap-db-account public methods 2013-09-24 12:50:41 -07:00
Eric Gregory
5f0bf21677 Closes #7138 Closes #7139 Prompt for password if stored password is incorrect 2013-09-23 18:27:56 -07:00
Jim Nelson
3cd37b9fed Improvements and bug fixes while working on #7512
Working on Outlook.com identified some small bugs that affect
all services.  This patch is a culmination of that work.
2013-09-23 17:58:49 -07:00
Charles Lindsay
f945ce93ba Respect removed flag in location table; fix #7507
A couple of queries (at least the search blacklist query and the folders
for each email query) weren't respecting the flag in
MessageLocationTable that means we should treat the row as if it didn't
exist.  This was causing problems where a draft that was also a search
result would keep being duplicated in the search results as you typed
more in the draft.  The cause was that the removed signal was fired
after the message had been marked as removed, but before it was actually
deleted, so it was still being found in the search even though
folderless emails are blacklisted.
2013-09-19 18:12:03 -07:00
Charles Lindsay
b7bfe388fa Treat unbalanced quotes as no quotes; fix #7128 2013-09-19 14:29:59 -07:00
Charles Lindsay
4e529e717e Don't pass % to database in search; fix #7155 2013-09-19 14:24:17 -07:00
Eric Gregory
9148fe0d02 Closes #7513 Fixed debug bug 2013-09-19 12:01:33 -07:00
Charles Lindsay
542b2ff914 Revamp status bar
* Increase the size of the spinner; fix #7184
* In the event of an error sending a message, display text in the status
  bar indicating as such (and display a notification too); fix #7481
* Display a status bar message and spin the spinner when sending;
  fix #4629
* Re-add the sound played when a message is sent; fix #5429
2013-09-17 16:55:03 -07:00
Jim Nelson
c8b4f9e0e2 Support Outlook.com IMAP: Closes #7479
This takes advantage of Outlook.com's new IMAP support, meaning
Geary works with Outlook.com, Hotmail, and Live.com users.

Because Outlook.com doesn't support UIDPLUS, some features
(in particular, draft auto-save) is unavailable, as is the
ability to use its Archive folder directly.

This patch fixes a couple of bugs that occur when a server doesn't
support UIDPLUS.  Also fixes a use case with UID increment/decrement
that caused a flag watcher bug due to ImapDB.Folder always
returning the same email if only one was present in the folder.
2013-09-17 16:23:48 -07:00
Jim Nelson
94861a0bef Bad state after selecting folder due to close hang: Closes #7433
ImapEngine.GenericFolder.internal_close_async() was hanging due to
the ReplayQueue never closing.  This could occur if there was a
hard error (i.e. network) while opening the Folder.  In essence,
this hung Folder.open_async(), which put the client into a bad state.

Now the ReplayQueue doesn't hang and is flushed if a "clean" close,
while outstanding operations are dropped if closing due to an error.

This also includes some small fixes in ClientSessionManager to
prevent a hang due to mutex reentrancy, and a State problem in
ClientSession that is unrelated but bad enough that it should be
included here.
2013-09-17 16:00:53 -07:00
Eric Gregory
0e8e10e4e5 Closes #7398 Update search box placeholder text on account rename 2013-09-17 15:27:16 -07:00
Eric Gregory
3321a6dc40 Closes #7483 Use email address as default nickname 2013-09-16 18:56:34 -07:00
Eric Gregory
38b2710de6 Closes #7244 Closes #7490 Unread count fixes, out-of-folder unread count support 2013-09-16 17:47:51 -07:00
Jim Nelson
6393362473 Fixes regression introduced in commit:6d1010ab
strip_prefixes() should use decoded string, not original, otherwise
the encoded Subject is returned.
2013-09-16 13:02:21 -07:00
Jim Nelson
6d1010abdd Don't display reply/forwarding prefixes in notifications: Closes #6121
This also properly strips both Re: and Fwd: prefixes, even when
stacked up, in the conversation list.
2013-09-13 18:11:34 -07:00
Jim Nelson
bee2068f3e Don't allow two accounts with the same email: Closes #6284
Engine validation now takes options flags indicating if the
validation is for adding or editing an account, and if the
network connections need to be checked.
2013-09-12 16:23:20 -07:00
Charles Lindsay
fc91de0c68 Prevent sending deleted outbox messages; fix #6797 2013-09-12 15:17:45 -07:00
Jim Nelson
9a8f96310c Save inline images displayed via MIME Content-ID: Closes #7475
Some reorganization of how data: URIs are assembled and injected
into the document.

Also, mild improvement to the GMime bindings.
2013-09-11 19:21:44 -07:00
Charles Lindsay
f91ad80283 Handle outbox email ids properly; fix #7453 2013-09-11 12:03:52 -07:00
Eric Gregory
adf9b4dad5 Closes #6548 Don't show draft emails in conversations 2013-09-10 19:16:53 -07:00
Charles Lindsay
c0d8522b70 Use insert, not append, in search folder; fix #7444
It was a good idea in theory to trigger an append when search results
are first added, but this hits the conversation monitor too hard, which
can't easily handle large appends (ticketed at #7464).

This also updates the conversation monitor to listen to the new inserted
signal instead of looking at count-changed.
2013-09-10 14:44:45 -07:00
Eric Gregory
afe33527ef Closes #7374 Ensure draft is deleted on send 2013-09-09 17:51:47 -07:00
Charles Lindsay
394fb32741 Clean up type juggling of search results; fix #7445 2013-09-09 16:05:20 -07:00
Avi Levy
6cdba3a77f Inline images included twice in message: Closes #7299
This handles the case when an image is specified in the message
with no Content-Disposition; in that case, use the "natural"
disposition for the client (i.e. images are inline, other types
are attachments).
2013-09-09 15:51:09 -07:00
Jim Nelson
78977b3f54 Better schema version checking against newer schemas: Closes #7058
If the database's current schema version does not have a corresponding
schema file in the schema directory, throw an Error and report it to
the user.  Most likely this means the user is trying to run an older
version of Geary against a newer database.
2013-09-09 15:41:31 -07:00
Jim Nelson
ddc6403aad Cleaned up Geary.Attachments implementation and interface
While working on #7345, I grew dissatisfied with how Geary.Attachment
was implemented.  It knew too much about imap-db's internal workings,
so I've broken it up a little bit.  It's now an abstract base class
completed by ImapDB.Attachment, a private implementation class.
This corresponds with the coding patterns used throughout the
Geary API.
2013-09-09 15:05:22 -07:00
Jim Nelson
e09a056e8d Warn when user data is corrupted: Closes #7345
The database is now tested for corruption at startup.  If a problem
is detected, one of three error messages are displayed in a dialog box
(corruption, permission problems, and "general error").
2013-09-09 14:44:36 -07:00
Charles Lindsay
2e8e589b37 Fix some typos in the normalize routine; fix #7450 2013-09-06 18:47:20 -07:00
Charles Lindsay
4666a74c02 Add quotes around search "words"; fix #7097
With this, you can search for something like

   chaz@yorba.org

and due to the tokenizer, it'll end up like

   "chaz yorba org"

which at least means the tokens have to appear sequentially.
Previously, it would appear like

   chaz yorba org

which lets them appear anywhere in the message; clearly not what you
wanted.
2013-09-06 12:21:28 -07:00
Jim Nelson
2e8c3dbbb8 Improved Folder notification of added email
Folder now offers an "email-inserted" and "email-locally-inserted"
signal to indicate when email has been added (or discovered) but
is not added to the top of the message vector.  SearchFolder and
ConversationMonitor may be able to use this better in the future.
2013-09-05 18:46:38 -07:00
Jim Nelson
9fb2fd9611 Don't call GObject.get_type() in ctor
Just experienced a crash in the SmtpOutboxEmailIdentifier
constructor trying to get its own type name.  Past experience
has shown that calling into GObject (or GType) in the constructor
before calling base() is dangerous, so changing this to a flat
string.
2013-09-05 18:23:31 -07:00
Jim Nelson
3bb0dca6f5 Segfault when saving draft: Closes #7366
Imap.Folder is now more paranoid about checking if the ClientSession
is available before performing an operation.  The ReplayQueue does
a better job of flushing pending commands when closing the Folder.
2013-09-05 16:38:34 -07:00
Charles Lindsay
9a13769907 Speed up search, add SearchEmailIds; fix #7372
This optimizes the search query itself, and also how we get the results:
instead of turning around and selecting the full row for each resulting
id, we simply pull out the id and internal date and that becomes the new
SearchEmailIdentifier.  This new class also lets us more properly order
EmailIdentifiers everywhere else.
2013-09-05 11:06:52 -07:00
Jim Nelson
495f162abb notify_remote_removed_ids can be called at any time: Closes #7435
This was recently changed for the double-archive problem and now these
ReplayOperation calls can happen at any time, not just after the
location execution, so they need to do null checking every time.
2013-09-03 17:56:36 -07:00
Jim Nelson
e7baa8cdaa More time for notification timing delay: Refs #6085
I noticed the double-archive problem again just now.  Looking at
the log, it took even longer than 250ms for Gmail to notify of the
EXPUNGEs after the append, so this patch increases the delay to a
full second.

It may be that this delay strategy is only pushing the timing hole
around, but until we can come up with a better solution, it'll have
to do.
2013-09-03 17:47:47 -07:00
Jim Nelson
e064ce739e Load mail on ukr.net's Freemail server: Closes #7425
Two bugs are fixed in this patch:

(a) Freemail's XLIST returns the Inbox's name in Ukranian.  This
is a problem when doing a direct list (i.e. XLIST "" "Inbox") to
get folder properties.  This is fixed by using LIST whenever listing
Inbox.

(b) Freemail returns FETCH BODY[] header fields back in an
indeterminate order.  Previously the IMAP stack relied on a string
comparison to match up the response with the request.  New code
now properly (but painfully) parses the BODY[] response, obviating
the need for FetchBodyDataIdentifier.
2013-09-03 15:29:10 -07:00
Jim Nelson
0dd3edf7a2 No pauses while writing drafts: Closes #7426
The slight pause (sometimes up to 2s on my machine) was due to some
CPU-intensive work occurring during folder normalization.  Some of
the work can be done in a background thread (using the new
Nonblocking.Concurrent class), but some of the problem was simply
that the Deserializer's priority was too high, causing it to block
UI events when it was busy (such as requesting a lot of UIDs from
the server).
2013-09-03 15:09:39 -07:00
Jim Nelson
1638468978 Use 7-bit ASCII throughout IMAP stack
This was also developed while working on #7426.  Before, the IMAP
implementation walked and built-up strings using unichars.  However,
IMAP guarantees 7-bit ASCII in all data transfers (except in literal
data, which isn't processed at this level), so use old-style ASCII
processing of request and response strings, which is slightly more
efficient.
2013-09-03 15:00:58 -07:00
Jim Nelson
ecd6fe3701 Small fixes discovered while working on #7426
MessageIntData doesn't need to be so sophisticated about calculating
a hash; slight optimization to the hash_memory() function.
2013-09-03 14:53:32 -07:00
Jim Nelson
3abbb95c98 Full normalization when marked messages are not removed: Closes #7402
Because full folder normalization is avoided whenever possible,
need to go back to marking messages as removed in the database (vs.
just in memory) so if messages are not removed on the server (or
the response was not received for some reason), the folder is seen
as "dirty" and a full normalization is processed.
2013-09-02 16:59:01 -07:00
Jim Nelson
9ac7349f59 Archive removes two messages, fails to show new: Closes #6085
This is a tricky timing bug triggered by Gmail sending EXPUNGE and
EXISTS notifications in a particular order with a slight timing delay
between them.

Normally Gmail will send one or more EXPUNGE notifications followed by
EXISTS to finish up a list of removal notifications.  Even if the
client sends an APPEND followed by STORE/EXPUNGE, the EXPUNGE
notifications are first.

However, if the client STORE/EXPUNGEs on one connection and a new
message arrives from another (or via SMTP), Gmail will issue an
EXISTS (append), wait 250 msec, then issue the EXPUNGE(s).  In
that 250msec delay, Geary has already turned around and requested
the new message, which no longer exists at the reported position
because the EXPUNGEs (which have not arrived yet) have shifted it
downward.

The solution is to pause when notifications come in so all can
be accounted for, shifting positions as necessary.
2013-08-30 14:38:43 -07:00
Jim Nelson
449a6aad56 Unread message counts appear when connected: Closes #7145
This should take care of the problem, exacerbated by multiple Inbox
folders being allowed in the root of the FolderTable.  Much more
strict in this patch about folders named "Inbox".
2013-08-26 17:04:27 -07:00