Commit graph

4967 commits

Author SHA1 Message Date
Michael Gratton
b9cbe81e12 Merge branch 'wip/christopherdavis/dual-install' into 'mainline'
build: Set up dual install for flatpak

See merge request GNOME/geary!229
2019-08-28 09:10:14 +00:00
Michael Gratton
f6e97db5b5 Merge branch 'wip/imap-disconnects-ignored' into 'mainline'
IMAP disconnects ignored

See merge request GNOME/geary!292
2019-08-28 07:53:45 +00:00
Michael Gratton
81e566a78f Merge branch 'wip/131-sent-mail' into 'mainline'
Sent mail not immediately showing up in a conversation

Closes #131

See merge request GNOME/geary!281
2019-08-28 01:22:59 +00:00
Michael Gratton
8cb0cdcfa6 Merge branch 'wip/prefetcher-missing-mail' into 'mainline'
Fix prefetcher missing mail on folder open

See merge request GNOME/geary!294
2019-08-28 00:42:08 +00:00
Michael Gratton
df3e273cc5 Merge branch 'wip/minor-cleanup' into 'mainline'
Minor code cleanup

See merge request GNOME/geary!293
2019-08-28 00:22:01 +00:00
Michael Gratton
5fc0ddfd9b Clean up EmailPrefetcher's class API docs a bit 2019-08-28 10:18:59 +10:00
Michael Gratton
0c59a8c4a3 Ensure EmailPrefetcher's cancellable actually gets cancelled 2019-08-28 10:18:31 +10:00
Michael Gratton
f4aeac5584 Ensure EmailPrefetecher doesn't ignore mail found on folder open
EmailPrefetecher was deliberately ignoring new mail found during
folder normalisation on folder open to avoid the kind of deadlock
solved by the last commit. Since this is no longer a problem, it can
now stop dropping those.

This should fix a number of issues where email is only partly
downloaded.
2019-08-28 10:13:10 +10:00
Michael Gratton
4ec936fe7c Ensure background sync ops are cancelled if the folder closes
Since MinimalFolder.synchronize_remote() waits for the prefetcher to
finish, but the prefetcher only closes when the folder closes, this
could deadlock.
2019-08-28 10:10:24 +10:00
Michael Gratton
935f75e4af Enable valadoc and refcounting in dev build by default 2019-08-28 09:59:05 +10:00
Michael Gratton
4ac29628d5 Fix variable name speeling error 2019-08-28 09:58:40 +10:00
Michael Gratton
b88278c2af Fix build warning 2019-08-28 09:58:15 +10:00
Emin Tufan Çetin
ef289b4135 Update Turkish translation 2019-08-27 21:23:50 +00:00
Christopher Davis
bfcee9bff7 build: Set up dual install for flatpak
Part of https://gitlab.gnome.org/GNOME/Initiatives/issues/1;
Sets up dual installation for flatpaks, allowing us to
build and run geary without affecting our system install.
This will allow testing of nightlies and CI artifacts as well
via the flatpak, so we can iterate on designs and share
bundles to test with.
2019-08-26 09:38:31 -07:00
Michael Gratton
eb6afae358 Rename UNCONNECTED FSM and protocol state to NOT_CONNECTED
The former is ambiguous, the latter is not.
2019-08-26 13:55:43 +10:00
Michael Gratton
63210247dd Rename the BROKEN FSM state to CLOSED
BROKEN sounds bad, whereas it's actually a normal state.
2019-08-26 13:52:32 +10:00
Michael Gratton
0b923a29ea Ensure bad IMAP response are treated as other errors
Send a receive error event to the FSM when a bad response is received so
that the connection is closed, in the same way as for other receive
errors.
2019-08-26 13:52:32 +10:00
Michael Gratton
5a9944a9df Handle Imap.Deserialiser EOS better
Ensure that the client connection is disconnected when the deserialiser
receives an EOS from its underlying stream. Rename the signal used
by Imap.ClientConnection to notify the Imap.ClientSession of EOS to make
it more clear what is going on.

Resolves the issue in #481 where an EOS was recevied but the connection
was not pulled down until after a NOOP was sent and timed out.
2019-08-26 13:52:32 +10:00
Michael Gratton
3ff35bcb67 Remove some duplicate debug logging
Only log from FSM event handlers, not from connection signal handlers.
2019-08-26 13:52:32 +10:00
Michael Gratton
c3fc7c4533 Merge branch 'wip/infinte-filling-redux' into 'mainline'
Make App.ReseedOperation alway check the window for re-filling

See merge request GNOME/geary!291
2019-08-26 03:47:46 +00:00
Michael Gratton
08c057345d App.ConversationMonitor: Don't force load ops to be local-only
In an attempt to prevent ConversationMonitor for blocking when a
connection went bad, load operations were set to local-only when
the remote was not open. This meant however that if the remote was in
the process of being opened, that local-only would be set, and hence any
incomplete messages would fail to be downloaded. Now that the Fill op
now explicitly handles filling local-only by default, we can remove
this.

This ensures that when the conversation monitor is notified of new
messages, but they are not yet fullly downloaded since the prefetcher
is still running, that the messge will still show up.
2019-08-26 13:32:53 +10:00
Michael Gratton
02f1d89d27 Smtp.ClientService: Explcitly poll when waiting for sent mail
At least GMail takes some time to copy new messages to the Sent folder
on the server side when sending them, which means the mail may not show
up even after doing a manual remote sync.

This adds an explicit poll, listing new mail in Sent after sending
a message to check for the sent message showing up.
2019-08-26 13:32:53 +10:00
Michael Gratton
4ae0414e44 MinimalFolder::synchronise_remote: Handle sessions gone bad
Since the NOOP that ::synchronise_remote sends doesn't go through the
replay queue, it will throw an error if the connection has gone bad.
Instead, catch it and retry.
2019-08-26 13:32:53 +10:00
Michael Gratton
7b53137c8f Fix missing outbox messages body preview in ConversationViewer 2019-08-26 13:32:53 +10:00
Michael Gratton
dd24b220d0 Ensure new sent mail is found for services that auto-save
Ensure that sent mail shows up in a conversartion ASAP for Google,
Outlook and others that automatically save sent mail by performing a
manual sync of the Sent folder after delivering the mail.
2019-08-26 13:32:53 +10:00
Michael Gratton
d56508f1e7 Clean up ImapEngine.CreateEmail replay op source code 2019-08-26 13:32:53 +10:00
Michael Gratton
4cc71e6930 Handle headers having null date in ConversationMessage 2019-08-26 13:32:53 +10:00
Michael Gratton
079d0205b7 Handle Smtp.ClientService null condition better 2019-08-26 13:32:53 +10:00
Michael Gratton
8bb7d3aeee Ensure folder is refreshed ASAP after creating a new message
If the server supports UID plus, update the message after it was
created to get its IMAP fields and anything else missing filled in.
If not, schedule a explicit folder sync.
2019-08-26 13:32:53 +10:00
Michael Gratton
b717c323bb Schedule folders for background sync even when open
Although the folder normalisation process and email prefetcher should
be enough to sync a folder without requiring an explcit sync, if the
folder opens and closes fast enough that new mail is notified but not
downloaded, the folder will still close and the mail will be missed.

To fix this, if a folder has changed, queue it for sync'ing even if it
is currently open.
2019-08-26 13:32:53 +10:00
Michael Gratton
6871c1cd90 Make remote folder synchronisation a top-level API method
Add Geary.Folder::synchronise_remote method to allow clients to
explicitly check for new mail in a folder. Move code from
ImapEngine.AccountSynchronizer as the basic implementation, but also
ensure pending replay queue notifications are processed before the
process is complete.
2019-08-26 13:32:53 +10:00
Michael Gratton
ee11d0d8ec Allow sending NOOP commands from Imap.FolderSession
This provides API users a means of poking the server to get pending
notifications out.
2019-08-26 13:32:53 +10:00
Michael Gratton
d7006f3b5e Ensure the prefetcher considers all local email
Handle email without IMAP properties in ImapEngine.EmailPrefetcher
when listing email to prefetch, in case any appear in the database.
2019-08-26 13:32:53 +10:00
Michael Gratton
006b4c5ca5 Make App.ReseedOperation alway check the window for re-filling
When the remote re-opens, new messages may have become available that
could be added to the conversation set if the window is not yet full.
Thus always check whether a fill operation should be queued.
2019-08-26 13:32:04 +10:00
Michael Gratton
52f0817116 Fix Geary.Logging.Flag serialisation
Add missing serialisation for CONVERSATION and PERIODIC, shorten all
serialised values to a recognisable abbreviation to reduce verbosity.
2019-08-25 16:45:31 +10:00
Michael Gratton
94a8acad2f Merge branch 'wip/update-duplicate-inbox-hack' into 'mainline'
Update ImapDb.Account hack to remove duplicate inboxes

See merge request GNOME/geary!290
2019-08-25 01:06:05 +00:00
Michael Gratton
a122f334dd Merge branch 'wip/fix-first-run-deadlock' into 'mainline'
Fix a deadlock resulting in no UI being shown on first run

See merge request GNOME/geary!289
2019-08-25 00:50:51 +00:00
Michael Gratton
c6197adce0 Update ImapDb.Account hack to remove duplicate inboxes
Two of my account's databases had duplicate inboxes which were not being
removed by the existing workaroud, this updates it so that they are.

I had removed the duplicate from a third account ages ago and it hasn't
come back since, so maybe the underlying problem is gone, but the
correct fix would be to move this workaround to a migration and add a
uniquness constraint on (parent_id, name).
2019-08-25 10:44:31 +10:00
Michael Gratton
976e989b8c Fix a deadlock resulting in no UI being shown on first run
After switching to DBus activation, we need to ensure that a controller
is present when arbitrary GApplication actions are executed so a
main window also exists. This lead to a deadlock on first run since
when the application was activated, it would be in the middle of
constructing the controller when it showed the Accounts Editor, which
would block since it would also try to construct a controller.

This fixes the deadlock by moving the first-run check to the
application, outside of the lock.
2019-08-25 10:23:16 +10:00
Federico Bruni
2c028a6e03 Update Italian translation 2019-08-24 06:55:24 +00:00
Michael Gratton
93acc93330 Make unread/read shortcut help text same for Ctrl & single keys
See https://mail.gnome.org/archives/gnome-i18n/2019-August/msg00022.html
2019-08-21 21:14:32 +10:00
Daniel Mustieles
318790aa87 Update Spanish translation 2019-08-21 10:18:37 +00:00
Federico Bruni
ba64c429d0 Update Italian translation 2019-08-21 07:31:04 +00:00
Daniel Șerbănescu
c0e13cee22 Update Romanian translation 2019-08-20 18:57:25 +00:00
Jordi Mas
89682e6eca Update Catalan translation 2019-08-18 21:27:11 +02:00
Jiri Grönroos
b3a44d1483 Update Finnish translation 2019-08-18 14:55:14 +00:00
Michael Gratton
e65d45fe74 Merge branch 'wip/search-fixes' into 'mainline'
Search cleanup

Closes #478 and #420

See merge request GNOME/geary!282
2019-08-18 14:38:37 +00:00
Piotr Drąg
1bab91e6cc Update Polish translation 2019-08-18 15:38:28 +02:00
Michael Gratton
724450c661 Minor source code formatting improvements 2019-08-18 22:04:56 +10:00
Michael Gratton
389f31dc96 Fix search including results from spam, trash and drafts
ImapDB.SearchFolder wasn't paying attention to the
Account.folders_special_type signal, hence folders getting promoted to
these were missed.
2019-08-18 22:04:56 +10:00