Commit graph

1339 commits

Author SHA1 Message Date
Jim Nelson
0bb4dd8329 Moving icons COPYING file next to ours and Snowball's 2013-09-05 18:58:38 -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
1d9ea39dd1 Several mnemonic and capitalization fixes
Missing mnemonics in composer context menu: Closes #7439
Context menu items need capitazliation: Closes #6862
No tooltip for remove button in Accounts window: Closes #6551
Print menu item needs ellipsis: Closes #7259
"Saving..." -> "Saving" in composer: Refs #7365
2013-09-04 19:15:24 -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
Eric Gregory
8d1f7a2b26 Closes #7417 Only show read/unstarred icon in conversation list when hovering 2013-08-30 15:49:47 -07:00
Eric Gregory
9c458e34fc Closes #7395 Added labels to unlabeled items in conversation list context menu 2013-08-30 15:23:59 -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
Eric Gregory
c91d64e992 Closes #7381 Mark unread from here. 2013-08-29 18:18:51 -07:00
Avi Levy
59df8a4b47 Multiple selections when clicking on conversation list: Closes #6138 2013-08-29 15:59:07 -07:00
Avi Levy
a0a20c813f Incorrect detection of email address link: Closes #7400
Now require mailto: URI in order to offer "Copy Email Address"
in context menu.
2013-08-29 15:20:54 -07:00
Yosef Or Boczko
74076f06fa Mark overlooked Glade strings for translation: Closes #7414 2013-08-29 13:03:44 -07:00
Eric Gregory
374981ef77 Closes #7374 Resolved issue where draft not deleted when sending mail 2013-08-29 12:38:34 -07:00
Eric Gregory
0b391fcead Closes #7407 Mark/copy button sensitivity fix 2013-08-29 12:37:31 -07:00
Avi Levy
ab2326611b Donate menu item: Closes #6881 2013-08-28 19:58:05 -07:00
Eric Gregory
28d71fb1a7 Closes #7397 Capitalization fixes in menus 2013-08-28 18:41:00 -07:00
Eric Gregory
de413a7b8f Ticket to ride, gray line highway
Tell all your friends, Geary looks my way
Pay your toll, sell your soul
Pound-for-pound grid lines are old
2013-08-28 16:51:38 -07:00
Eric Gregory
de2941cf8d Fix for WebKitGTK 2.1 conversation viewer CSS issues. Closes #7291 2013-08-27 18:57:43 -07:00
Eric Gregory
15ba8cdd9f Make search folder list icon symbolic Closes #7408 2013-08-27 18:40:45 -07:00
Eric Gregory
99aade327e Rounded count badges. Closes #7309 2013-08-27 17:19:53 -07:00
Angelo Marchesin
104671d35f Add period after "etc" in nickname help text: Closes #6723 2013-08-27 16:05:43 -07:00
Yosef Or Boczko
0d6ef36de8 Fix button margins for RTL language: Closes #7393 2013-08-27 15:53:30 -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
Charles Lindsay
0cb7352a34 Bump version for trunk 2013-08-26 15:48:34 -07:00
Charles Lindsay
9a49a3d426 Bump version for prerelease 2013-08-26 15:11:08 -07:00
Eric Gregory
bb72647b26 UI refresh. Closes #7267 Closes #7199 Closes #7198 Closes #7043 Closes #6819 Closes #5839 2013-08-26 14:56:46 -07:00
Jim Nelson
1c111ad966 Fix issues with fetching emails from vector expansion
Vector expansion was broken in that the unfulfilled map was being
populated with EmailIdentifiers lacking a message_id, only a UID
(from Imap.Folder).  More rigorous unfulfilled map now in
AbstractListEmail that requires a UID, not an EmailIdentifier.
Also guarantees that the email is fetched exactly once per
transaction by mapping UID -> fields, then "flipping" the map
back to fields -> UIDs, maximizing the number of emails requested
per FETCH.
2013-08-26 12:46:47 -07:00
Jim Nelson
59c1f1215d Fix earliest UID assertion: Closes #7390
MIN() and MAX() in Sqlite returns an unanticipated NULL when a column
result set is empty.  Fix is to catch when that happens.
2013-08-26 12:35:47 -07:00
Jim Nelson
0129af9c81 Force remote folder to open after timeout
A recent optimization for EmailStore was to only open a connection
to the remote folder if a command came in requiring it.  If an
ImapEngine.GenericFolder is opened for monitoring, however, no command
may come in requiring a remote connection, meaning no folder
normalization or unsolicited notifications arrive.

This patch "forces" the remote to open after a timeout, which is
cancelled if it's opened by a command.
2013-08-23 17:14:51 -07:00
Jim Nelson
4feba6c970 Quicker and simpler folder normalization: Closes #7364
Folder normalization is now much simpler, faster, and requires
less resources than prior implementation.  Normalization affects
the ReplayOperations, so an interface was changed here.
2013-08-23 16:58:24 -07:00
Jim Nelson
4e6e0bb0e8 Conversations accessible after search matches no msgs: Closes #7274
Two problems: (1) Error was being thrown while mutex was held, causing
the SearchFolder to forever be locked.  (2) INCOMPLETE_MESSAGE Error
was causing list operation to abort prematurely (which in turn was
due to #6604).
2013-08-22 12:29:46 -07:00
Charles Lindsay
bb726a2a98 Check for null collection; fix #7369 2013-08-21 16:14:20 -07:00
Charles Lindsay
7e35dac757 Don't ask DB for UIDs we haven't recoded; fix #7363
We were erroneously going into the database to find UIDs for messages we
just did vector expansion on, and thus hadn't yet recorded in the
database.  With this patch, we use the UID from the EmailIdentifier
itself in that case.
2013-08-20 16:43:49 -07:00
Charles Lindsay
93ae747f3c Keep 2 indexes by UID to determine flag changes; fix #7338
Previously, the EmailIdentifier key's hash value was sometimes changing
during the execution of the function, so when someone later went to look
up the flags, the hash map was returning NULL.  This way we delay
hashing the EmailIdentifier till right before it's used, so its hash
value can't change.
2013-08-20 15:55:54 -07:00
Jim Nelson
4794702ead "(null)" & no previews in search folder: Closes #7151, Closes #7368
Both these problems stemmed from conversations holding messages from
in-folder and out-of-folder, and that all messages in the search
folder are considered out-of-folder.
2013-08-20 15:13:34 -07:00
Jim Nelson
4444ab36bf Removed some leftover debug()
If it remained, would fill log with extraneous cruft.
2013-08-20 12:50:05 -07:00
Jim Nelson
b3506715e7 Drafts occassionally don't save or cause crash: Closes #7344, Closes #7353
The problem was due a timing issue in ClientConnection FSM; it was possible
for the machine to still be in the IDLE or IDLING state when ready to
SYNCHRONIZE.  This is due to a timing hole where the server's response to
close IDLE (requested when the APPEND command was sent) didn't return in
time.  This closes that timing hole and deals with SYNCHRONIZE occurring
while in IDLING/IDLE.
2013-08-20 12:48:18 -07:00
Eric Gregory
1f859dea4d Closes #7357 Draft geometry problem. 2013-08-20 12:25:04 -07:00
Charles Lindsay
5594abd96c Allow operations on email in any folder; fix #6496
This is squashed commit (sorry -- we'll get better about maintaining a
clean history in collaborative branches in the future!) of a massive
amount of work from Jim and myself.

* EmailIdentifiers for normal (i.e. not outbox, etc.) emails are the
  same regardless of which folder they came from
* New EmailStore interface to manipulate messages that reside in any
  folder, without having to care what folders are open
* Relevant places that manipulate emails (e.g. the toolbar) have been
  updated to use the new EmailStore interface
* Conversation and ImplConversation have been smooshed together
* Many, many more items and bugfixes related to the above points
2013-08-19 16:39:53 -07:00
Jim Nelson
48b7296855 ConversationSet error when searching or archiving: Closes #7275
We discovered a situation where, depending on the order email is
processed, it's possible for logically associated emails to form
two or more conversations.  When an email is processed that belongs
in more than one conversation, its removal triggers this error (as
a Message-ID can be associated with one and only one conversation).

Bogus email headers, especially email that does not list a complete
References: list, aggravate this problem.
2013-08-16 17:35:56 -07:00
Jim Nelson
a803810db8 Display oldest unread message as preview: Closes #5921 2013-08-13 19:21:30 -07:00
Jim Nelson
1b7e652211 Sort conversations by date received, not sender's date: Closes #6856
Also displays date received in conversation list.
2013-08-13 18:35:19 -07:00