Commit graph

4460 commits

Author SHA1 Message Date
Michael Gratton
133167dfd0 Add a common interface for accessing headers from email classes.
This allows either type to be used interchangably as a source of
header data. Add documentation comments for the headers, add missing
message_id property to RFC822.Message.
2019-03-09 20:17:01 +11:00
Michael Gratton
31aa176ee2 Clean up client email util source file 2019-03-09 20:17:01 +11:00
Michael Gratton
76ee07595d Make avatar code a bit more robust in the face of bad input
Don't try to dray null initials, actually return null per API contract
when no initials can be found, don't include non-alphanumerics in the
initials. Add test case.
2019-03-09 20:17:01 +11:00
Michael Gratton
4e484e237d Make TestCase.assert_string robust in the face of null actuals 2019-03-09 20:17:01 +11:00
Michael Gratton
4d1e86e5d1 Add feature to appdata for next release 2019-03-09 20:17:01 +11:00
Michael Gratton
18039ed7ad Remove avatar URL setting and config now it is unused 2019-03-09 20:17:01 +11:00
Michael Gratton
f9ef6492ec Don't bother setting default icon for the ConversationMessage avatar
Since we are now using the GNOME 3.32 initals when there is no avatar
in Folks, it will never be displayed.
2019-03-09 20:17:01 +11:00
Michael Gratton
9306d7ccd0 Port GNOME 3.32 avatar code to vala, use when Folks avatar is missing
This ports the code written by Felipe Borges for GNOME/Initiatives#6 to
vala, and uses that when no Folks individual was found or it does not
have an avatar.
2019-03-09 20:17:01 +11:00
Michael Gratton
d2bafeeb09 Fix avatar cache not differentiating between senders w/ different names
Services like GitLab and mailing lists will use the same From address
but the actual user's name as the mailbox name. By using the mailbox
address as the cache key, these all get lumped together. This will make
different sender names use the same initials, so use the short display
name as the cache key instead.
2019-03-09 20:17:01 +11:00
Michael Gratton
cf793bf0a8 Evict from the avatar cache using LRU so it dosn't grow unbounded 2019-03-09 20:17:01 +11:00
Michael Gratton
786b3b0d42 Add basic Folks individual and pixbuf cache to AvatarStore 2019-03-09 20:17:01 +11:00
Michael Gratton
c12bdcdc66 Load avatars from Folks
Take a brute-force approach here for the moment.
2019-03-09 20:17:01 +11:00
Michael Gratton
742aca2b0c Add build dependencies for Folks
Flatpak manifest updates courtesy of gnome-contacts.
2019-03-09 20:17:01 +11:00
Michael Gratton
d93e5fe879 Update avatar size to be 48px, per recommendation
See #269
2019-03-09 20:17:01 +11:00
Michael Gratton
d11a5088d3 Fix compile warning 2019-03-09 20:16:09 +11:00
Fabio Tomat
5bbb35f17c Update Friulian translation 2019-03-09 08:47:46 +00:00
Michael Gratton
5c7999c69d Merge branch 'wip/301-auth-errors' into 'master'
Fix SMTP auth errors when using IMAP credentials

See merge request GNOME/geary!168
2019-03-09 03:19:15 +00:00
Michael Gratton
cd8ed40559 Fix SMTP auth errors when using IMAP credentials
AccountInformation.load_outgoing_credentials (and incoming) should be
true in case there's no credentials, but also loading ougoing must use
the incoming service and credentials when USE_INCOMING is set.

Fixes SMTP side of #301 at least.
2019-03-09 14:08:01 +11:00
Fabio Tomat
fcf07ad479 Add Friulian translation 2019-03-08 00:10:00 +00:00
Balázs Úr
bb2602166d Update Hungarian translation 2019-03-07 22:08:53 +00:00
Ryuta Fujii
d612af624a Update Japanese translation 2019-03-07 10:09:27 +00:00
Michael Gratton
2fc3db4ccf Update appdata with some forthcoming releases for 3.32
This will let translation teams translate release notes on Flathub
2019-03-07 14:55:11 +11:00
Michael Gratton
3f41e86e7d Add translation teams to THANKS as well 2019-03-07 14:53:50 +11:00
Michael Gratton
3ffd784a53 Sort NEWS by first name 2019-03-07 14:51:44 +11:00
Michael Gratton
2812e8bc25 Update THANKS with recent contributions 2019-03-07 14:50:10 +11:00
Michael Gratton
54f5ec397e Merge branch 'wip/285-cancelled-commands' into 'master'
Ensure that cancelled commands throw a cancelled error, not a timeout

Closes #285

See merge request GNOME/geary!167
2019-03-07 00:49:14 +00:00
Michael Gratton
2c8a232f97 Ensure that cancelled commands throw a cancelled error, not a timeout
Commands that were cancelled, e.g. because the network connection was
lost and so commands in progress were backed out, were throwing
timeout errors to callers of wait_until_complete since they had received
no response. This was causing e.g. account operations to fail, and the
alleged timeout be reported as problem in the UI.

This takes note of whether a command was cancelled and throws an
appropriate error in wait_until_complete if so. Callers can then clean
up and choose to be more circumspect in their error reporting.

Fixes #285
2019-03-07 11:24:06 +11:00
Rafael Fontenelle
ffe4775eb0 Update Brazilian Portuguese translation 2019-03-06 20:29:30 +00:00
Michael Gratton
65b8515d10 Merge branch 'wip/rework-password-prompting' into 'master'
Fix some issues with password prompting

See merge request GNOME/geary!166
2019-03-06 13:49:41 +00:00
Michael Gratton
58110dd452 Handle un-remembered passwords properly
Ensure that when the pref for non remembering passwords is changed, that
the account's config is updated. When not rememebering the password,
clear it from the controller instead of the libsecret mediator so its
obvious what's going on, and when updating creds in the mediator return
true if a password is present, so they don't cause an immediate auth
error.
2019-03-07 00:07:26 +11:00
Michael Gratton
cd10cd7c07 Fix a deadlock when notifying engine of updated credentials
Don't restart a service when in the middle of propting for creds for it,
since if there's another auth error while restarting, the client won't
prompt again, and the service never resumes. Instead, restart at the end
when finished prompting.
2019-03-06 23:53:50 +11:00
Michael Gratton
a0fbf847c5 Fix some crashes prompting for passwords in the controller
Ensure the credential's token is actually updated, is updated on the
right service, and that the right credentials and service are presented
in the password dialog.
2019-03-06 23:18:52 +11:00
Michael Gratton
30b55a0313 Remove now-unused prompting code from Mediator implementations 2019-03-06 22:53:00 +11:00
Michael Gratton
085518a65c Don't prompt for passwords from deep within the engine
The fix for !161 moved updating credentials to reasonably deep within
the IMAP service to fix some poor behaviour for GOA accounts, however
local accounts would still prompt for a password if not present in
libsecret from there, and if cancelled would prompt as many times as the
service attempted to re-open the pool.

This removes the call to prompt for a password from the libsecret
mediator, brings back some of the API removed by commit c8f5e029, so
that services can tell if credentials weren't loaded, and hence notify
appropriately so the controller can then do the prompting.
2019-03-06 22:46:56 +11:00
Michael Gratton
aa275681cd Merge branch 'wip/283-message-body-height-re-reux' into 'master'
More fixes for message body heights being inaccurate at times

Closes #283

See merge request GNOME/geary!164
2019-03-06 11:42:50 +00:00
Serdar Sağlam
d2c9464880 Update Turkish translation 2019-03-06 10:38:34 +00:00
Michael Gratton
15285ebeb6 Merge branch 'wip/fix-error-on-goa-account-disabled' into 'master'
Fix an error being thrown when an active GOA account is disabled

See merge request GNOME/geary!165
2019-03-06 10:06:37 +00:00
Michael Gratton
1e826e9f5d Remove obsolete comment 2019-03-06 20:44:44 +11:00
Michael Gratton
a2a31d3816 Fix an error being thrown when an active GOA account is disabled
When GOA accounts are disabled in Settings, they are updated in Geary.
This caused an error updating credentials since we were trying to
update the credentials for a now-disabled account.

This patch makes Geary not do this.
2019-03-06 20:43:23 +11:00
Michael Gratton
85fd1bbb0f Remove unused variable 2019-03-06 20:18:44 +11:00
Michael Gratton
9ed81ed759 Remove default instance of ClientWebView's PageState JS object
This default instance was causing double the number of preferred height
events, which was likely creating a race for ConversationWebView. This
might (should?) fix plain text email with quotes sometimes showing up
with a vastly incorrect height.

To ensure that a PageState is constructed properly, make ClientWebView
abstract and use replace the one direct use of the class in the accounts
editor for the signature with a new subclass.

See #283
2019-03-06 20:11:33 +11:00
Michael Gratton
833f1d5c5f Merge branch 'wip/validator-fixes' into 'master'
Validator polish and fixes

Closes #294

See merge request GNOME/geary!163
2019-03-06 08:11:32 +00:00
Michael Gratton
7dc07bdad6 Fix NetworkAddressValidator not updating port number
Ensure the validated address is updated even if we know it is valid,
since the port number may have changed.

Fixes #294
2019-03-06 18:38:44 +11:00
Michael Gratton
b86c28a32d Replace Validator's in-progress icon with Gtk.Entry's progres meter
Using the icon never worked prroperly, and wasn't even animated, so
use the entry's active progress state instead.
2019-03-06 18:37:25 +11:00
Ask Hjorth Larsen
760ddcd25d Updated Danish translation 2019-03-05 15:47:41 +01:00
Michael Gratton
52d1cb85c1 Merge branch 'wip/266-dns-errors' into 'master'
Fix spurious "Can't reach host" running under Flatpak, maybe elsewhere

See merge request GNOME/geary!162
2019-03-04 22:06:59 +00:00
Michael Gratton
c8f5e0295c Merge branch 'wip/goa-error-when-disconnected' into 'master'
Fix GOA accounts throwing an error when starting offline

See merge request GNOME/geary!161
2019-03-04 22:05:33 +00:00
Michael Gratton
b7d0f073d2 Fix spurious "Can't reach host" running under Flatpak, maybe elsewhere
When offline, the GLib.NetworkMonitor portal implementation will throw a
GLib.IOError.HOST_UNREACHABLE error instead of returning false. Handle
this case explicitly and treat it as being unreachable, not an error.

See #266
2019-03-04 15:52:26 +11:00
Michael Gratton
82160e9ff4 Fix GOA accounts throwing an error when starting offline
Don't check service credentials are loaded when the account is being
opened, since GOA accounts will do a
org.gnome.OnlineAccounts.Account::EnsureCredentials() call, and this
will error out if the creds are invalid or not available.

Instead, check when we know that the services should be reachable, and
hope that means the GOA provider's auth service is reachable, too.
2019-03-03 22:20:41 +11:00
Michael Gratton
224ccb1834 Fix critical and clean up error handling in FetchEmail replay op
Don't assume target email is non-null after fetching from local store
since it might be if not present and it needs to be fetched from the
remote. Also, just throw the NOT_FOUND error when local-only, and don't
bother checking for INCOMPLETE_MESSAGE since it's specified that partial
is okay anyway.
2019-03-03 22:18:22 +11:00