Commit graph

5855 commits

Author SHA1 Message Date
Michael Gratton
b75e251abe Components.PreferencesWindow: Add pref page icons
Per advice in #813 these are required by libhandy.
2020-04-26 13:35:22 +10:00
Michael Gratton
b19d170329 Merge branch 'mjog/741-inbox-getting-closed' into 'mainline'
Inbox getting closed

Closes #741

See merge request GNOME/geary!504
2020-04-24 05:51:44 +00:00
Michael Gratton
97d34b2d4b Geary.ClientService: Set as unreachable on connectivity check error
Mark the service as unreachable if a connectivity check error occurs
since if we can't determine it is reachable, we probably can't connect
to it either.
2020-04-24 15:30:04 +10:00
Michael Gratton
0e673ce5f8 Geary.ClientService: Update connectivity timeouts
Swap reachable and unreachable timeouts periods so that connections
are dropped sooner and not re-established too early.
2020-04-24 15:30:04 +10:00
Michael Gratton
530c205ce7 Geary.Util.ConnectivityManager: Fix a spurious connectivity error report
When a general error occurs checking connectivity of a remote server,
only treat it as an error if GNetworkMonitor indicates the network is
available (i.e. that a default route exists). If there is no network,
it's not surprising that the error occurred.

This fixes a spurious error when the delayed check runs but the host
is offline.
2020-04-24 15:30:04 +10:00
Michael Gratton
991c9ef5d7 Geary.App.ConversationMonitor: Fix more races when starting/stopping
Ensure that if stopping the conversation monitor while it is waiting
for the folder to open that the folder isn't closed, and if an error
is thrown when opening the folder that it gets thrown by
::start_monitoring anyway.

Hopefully fixes #741
2020-04-24 15:30:04 +10:00
Michael Gratton
a385ce8fc2 Geary.App.ConversationMonitor: Throw error closing folder when possible 2020-04-24 15:30:04 +10:00
Michael Gratton
81a22175ab Geary.FolderMock: Convert to use new async mock calls. 2020-04-24 15:22:55 +10:00
Anders Jonsson
97163e314f Update Swedish translation 2020-04-23 19:14:51 +00:00
Yuri Chornoivan
64bfb11ef2 Update Ukrainian translation 2020-04-23 05:56:41 +00:00
Michael Gratton
4a469d7898 po/POTFILES.in: Add missing lines for email templates files 2020-04-23 14:11:55 +10:00
Michael Gratton
ee3f3c9930 Merge branch 'mjog/folder-order' into 'mainline'
FolderList.AccountBranch: Fix ordering of special-use folders

See merge request GNOME/geary!501
2020-04-23 02:02:51 +00:00
Michael Gratton
11754cb63b Merge branch 'mjog/phantom-parent-folders' into 'mainline'
Geary.ImapEngine.GenericAccount: Fix duplicate folders on first load

See merge request GNOME/geary!500
2020-04-23 01:59:36 +00:00
Michael Gratton
9e0acad23d FolderList.AccountBranch: Fix ordering of special-use folders
Don't rely on the special-use enum ordinal, there's no reason to
expect the engine lists uses in an order people would file helpful.
2020-04-23 11:45:11 +10:00
Michael Gratton
df2bce4eb8 Geary.ImapEngine.GenericAccount: Fix duplicate folders on first load
When loading an account for the first time, folders may not be processed
such that parents are handled first, leading to phantom folders created
for them.

This is particularly noticeable for GMail accounts, where the `[GMail]`
folder would typically show up, since it was created twice.
2020-04-23 11:17:01 +10:00
Michael Gratton
ab9d83987a Merge branch 'mjog/gmail-all-mail-missing' into 'mainline'
Geary.Imap.MailboxAttributes: Fix missing SPECIAL-USE \All case

See merge request GNOME/geary!499
2020-04-23 01:14:45 +00:00
Michael Gratton
779d1906d8 Merge branch 'fix/missing_itstool_dependecy' into 'mainline'
INSTALL: add missing itstool dependency for Fedora

See merge request GNOME/geary!498
2020-04-23 00:48:35 +00:00
Michael Gratton
e94ce67605 Geary.Imap.MailboxAttributes: Fix missing SPECIAL-USE \All case
This was causing GMail's All Mail folder to not show up as a special-use
folder.
2020-04-23 10:41:09 +10:00
Michael Gratton
9e0ae0eb8d Merge branch 'mjog/email-templates' into 'mainline'
Email templates plugin

Closes #803

See merge request GNOME/geary!497
2020-04-23 00:38:04 +00:00
Michael Gratton
1986633351 Plugin.EmailTemplate: Create templates folder if it does not exist 2020-04-23 09:35:19 +10:00
Michael Gratton
1b529d2195 Minor doc comment update 2020-04-23 09:35:19 +10:00
Michael Gratton
13e339f009 Plugin.Account: Support creating folders in the personal name space
Add `create_personal_folder` method and implement it in
Application.FolderStoreImpl.
2020-04-23 09:35:19 +10:00
Michael Gratton
48ed8d9fe3 Geary.Account: Support creating folders in the personal name space
Add `create_personal_folder` method, implement it in
ImapEngine.GenericAccount. Use this when creating required special
folders to reduce code duplication.
2020-04-23 09:35:19 +10:00
Michael Gratton
e0dc785240 Geary.ImapEngine: Don't add local folders then update their special use
Set local folder special use when they are loaded rather than doing it
in two steps, so that when client code is notified of the folders
being available, they will already have the correct special type.
2020-04-23 09:35:19 +10:00
Michael Gratton
400850cc44 Geary.AccountInformation: Rework how special use folder paths are stored
Use a simple list of strings to store path steps, since we don't know
what the root will be in advance, and this leads to errors if callers
try to compare the info's paths to (say) an actual IMAP path.

Store path steps in a SpecialUse to path step map property, rather than
as individual properties for each special use, to reduce repetition.
2020-04-23 09:35:19 +10:00
Björn Daase
8d24b1499e INSTALL: add missing itstool dependency for Fedora
Otherwise, the post install script on Fedora crashes with:
`FileNotFoundError: [Errno 2] No such file or directory: 'itstool'`.

It is in the Ubuntu/Debian dependencies so simply add it for Fedora as well
2020-04-22 23:31:13 +02:00
Michael Gratton
9a2fe63a5f Application.Controller: Ensure outboxes appear in the folder list 2020-04-21 23:36:24 +10:00
Michael Gratton
47d4056010 Plugins: Add EmailTemplate plugin 2020-04-21 23:36:24 +10:00
Michael Gratton
10510727b6 Plugin.Composer: Support disabling sending a composer
Allow disabling send in the composer for editing templates.
2020-04-21 23:36:24 +10:00
Michael Gratton
33a6134864 Plugin.Composer: Support specifying a folder to save email 2020-04-21 23:36:24 +10:00
Michael Gratton
4f92c2b548 Plugin.InfoBar: Allow secondary buttons to be specified. 2020-04-21 23:36:24 +10:00
Michael Gratton
14f3dd0c36 Application.Controller: Allow creating composers with alt save folders
Allow a non-draft folder to be specified as the location to save
email being composed.
2020-04-21 23:36:24 +10:00
Michael Gratton
085ed9a6a3 Geary.App.DraftManaager: Update API to something more RAII-like
Replace open method with an async ctor, so we can make a few properties
non-null by default, and callers need to call one less call. Make
destination folder configurable, and require email flags passed in
via the ctor, not every time when saving.
2020-04-21 23:36:24 +10:00
Michael Gratton
924231d103 Plugins.SpecialFolders: Actually implement the edit draft action
Fixes #803
2020-04-21 16:22:55 +10:00
Michael Gratton
6fd3f36551 Plugin.Composer: Add support for editing an email in the composer
Add `edit_email` method, and implement in the underlying implementation.
2020-04-21 16:22:55 +10:00
Michael Gratton
2cd43de8ee ConversationViewer: Avoid re-enabling kinetic scrolling if disabled 2020-04-21 16:22:55 +10:00
Michael Gratton
480277e9c2 Application.MainWindow: Email not found error when discarding a draft
When the drafts folder is selected, and a draft is being edited, and
that dis discarded, there is a race between the composer disappearing
(and hence the draft being shown again) and the draft itself being
removed from the folder. Attempt to check for this and avoid reporting
the problem.
2020-04-21 16:22:55 +10:00
Michael Gratton
a67f1b2157 Application.{Controller,MainWindow}: Clean up displaying composers
When displaying a new empty composer, only consider those attached to
the current main window. Ensure that when re-using an existing composer,
that no composers in the undo buffer are used. Ensure drafts are
displayed full-pane when appropriate. Clean up redundant parts of
the `show_composer` API a bit.
2020-04-21 16:22:55 +10:00
Michael Gratton
6a33266cfb Composer.Widget: Re-load a context email with missing fields if needed
Rather than just throwing an error, try re-loading context emails in
`load_context` from the store.
2020-04-21 16:22:55 +10:00
Michael Gratton
fc4bc926c3 Composer.Widget: Convert to using AccountContext objects
Use AccountContext objects so the composer can access the account's
cancellable, contacts, etc. Simplify cancellable handling as a result.
2020-04-21 16:22:55 +10:00
Michael Gratton
96ddd5aee0 ConversationListBox: Remove obsolete action and signal 2020-04-21 16:22:55 +10:00
Michael Gratton
aac59ec53b Application.Controller, Composer.Widget: Clean up composer construction
Clean up and simplify how composers are constructed. Ensure all
composers are constructed via Application.Composer. Provide a set of
APIs for constructing different kinds of composers with minimal
parameters, rather than having one method with eleventy different
parameters.

Mirror API changes in Composer.Widget by splitting `load` method up
into a method for each different composer type. Clean up internals a
bit as a result. Rename `ComposeType` enum and its values to
`ContextType` to better reflect what it does.
2020-04-21 16:22:55 +10:00
Michael Gratton
a98f953237 Application.Client: Use plugin variant formats for app actions
Expect the same variant format for the `show-folder` and `show-email`
application actions. Use existing email and folder store factory
lookup methods for these. Update DesktopNotifications plugin to simply
pass variant values from plugin classes through to notifications.
2020-04-20 10:53:27 +10:00
Michael Gratton
0b0efd026a Application.FolderStoreFactory: Move get_folder_from_variant to factory
Make the from variant method accessible to the client as per email
factory, so the client can reuse it.
2020-04-20 10:53:27 +10:00
Michael Gratton
aff599821a Plugin.EmailStore: Add methods for getting email ids from variants
Implement these in Application.EmailStoreFactory's implementation of
the interface.

This switches the variant format used to `(account_id,email_id)` to
match that used for folders, and so a folder doesn't need to be
specified when showing an email.

This breaks opening email from desktop notifications, but that will be
fixed shortly.
2020-04-20 10:53:27 +10:00
Piotr Drąg
0c33187fcb Update Polish translation 2020-04-19 10:31:52 +02:00
Michael Gratton
97b807f0b4 Application.FolderStoreFactory: Improve folder signal impl
Only signal folders available/unavailable if non-empty when adding or
removing accounts, avoid producing two collections when signalling, and
fix removing folders from the store before signalling that they have
been removed.
2020-04-18 18:37:35 +10:00
Michael Gratton
2f666213ca Application.FolderStoreFactory, EmailStorefactory: Remove controller use
Remove use of Application.Controller in these classes so they can be
more easily unit tested.
2020-04-18 18:37:35 +10:00
Michael Gratton
5519ba86cf Application.PluginManager: Use AccountContext keys for account impl map
Use AccountContext as keys the Plugin.Application implementation map to
reduce the need for getting instances from the controller.
2020-04-18 18:37:35 +10:00
Michael Gratton
624b9ab901 Minor doc comment updates 2020-04-18 18:37:35 +10:00