Commit graph

6125 commits

Author SHA1 Message Date
Michael Gratton
31f10e2787 Geary.Imap: Add quirk for Envelope address structure placeholders
Some servers (e.g. Dovecot) use placeholder strings instead of the empty
string (e.g. "MISSING_DOMAIN") in FETCH Envelope responses when a
required address part (e.g. local part, domain) are empty.

This adds a quirk that can be enabled for such servers to check for the
placeholders and if found, replace them with empty strings.
2020-08-18 16:34:24 +10:00
Michael Gratton
757c0542dc Geary.Imap.ServerResponse: Add quirks property
Add a quirks object as a property so code that parses the response has
access to it. Simplify constructing server responses slightly and pass
the IMAP connection's quirks when doing so.
2020-08-18 16:34:24 +10:00
Michael Gratton
ebf7a8ad1d Geary.Imap: Update IMAP quirks based on server greeting rather type
Use server greeting to update IMAP quirks, so that if e.g. a GMail
account is configured as a generic account, it still gets the right
quirks.
2020-08-18 16:34:24 +10:00
Michael Gratton
15a87be780 Geary.Imap.ClientSession: Add property for the IMAP server's greeting 2020-08-18 16:34:24 +10:00
Michael Gratton
1c22eb4ebd Geary.RFC822.MailboxAddress: Handle empty mailbox and domain parts better
If an address does not have an `@`, or if the IMAP constructor is called
with empty mailbox or domain parts, then these properties will be empty.
This is not uncommon, especially on UNIX hosts where system accounts
send email.

Ensure this is handled correctly in the constructors and are
round-tripped correctly by `to_rfc822_address` and hence
`to_rfc822_string`.
2020-08-18 16:14:37 +10:00
Michael Gratton
747df10b9d Geary.RFC822.MailboxAddress: Compile is-valid regex only once 2020-08-18 12:23:49 +10:00
Michael Gratton
87f82166a7 Geary.RFC822.Mailbox: Fix typo in doc comment 2020-08-18 12:23:49 +10:00
Michael Gratton
cb648cd839 Merge branch 'mjog/vala-switch-warnings' into 'mainline'
Fix vala mainline switch statement build warnings

See merge request GNOME/geary!543
2020-08-17 01:01:33 +00:00
Michael Gratton
850bb3139f Fix vala mainline switch statement build warnings 2020-08-17 10:33:33 +10:00
Michael Gratton
108853a009 Merge branch 'mjog/sound-plugin-feedback' into 'mainline'
Sent sound plugin feedback

See merge request GNOME/geary!542
2020-08-16 05:35:03 +00:00
Michael Gratton
492d66239e Plugin.SentSound: Play a sound on when first activated
This provides feedback that the plugin is working, and displays an
error if not.
2020-08-16 14:44:11 +10:00
Michael Gratton
9f5bea33f0 Plugin.SentSound: Report an error when sound doesn't play 2020-08-16 14:44:11 +10:00
Michael Gratton
10c7ab197e Plugin.PluginBase: Add is_startup parameter to activate
This allows plugins to take different actions depending on if they are
being first loaded or not.
2020-08-16 14:42:23 +10:00
Michael Gratton
4411e00b18 Merge branch 'mjog/plugin-problem-reports' into 'mainline'
Plugin problem reports

See merge request GNOME/geary!538
2020-08-16 03:44:03 +00:00
Michael Gratton
c37cf0640b Plugin.Application: Add support for reporting problems 2020-08-16 09:48:23 +10:00
sicklylife
817bc7f216 Update Japanese translation 2020-08-15 19:44:30 +00:00
sicklylife
2dc73ab29c Update Japanese translation 2020-08-15 19:40:24 +00:00
Daniel Mustieles
9bd855181e Updated Spanish translation 2020-08-14 11:11:07 +02:00
Michael Gratton
e5247a260d Merge branch 'mjog/composer-context-loading-fixes' into 'mainline'
Composer context loading fixes

See merge request GNOME/geary!539
2020-08-13 10:50:53 +00:00
Michael Gratton
e5bfd7295c test-client: Fix test failure for new composer widget tests under CI
Init icon factory so composer tests work under CI, add rsvg as a test
dependency for Ubuntu which as of 20.10 does not include it by default.
2020-08-13 19:52:12 +10:00
Michael Gratton
29ba9311e6 Composer.Widget: Handle non-Geary HTML and plain text drafts better
Commit 37d904b5 added a partial change to how drafts are saved and
loaded - saving plain text only when not in rich text mode and
loading HTML-based drafts that don't seem to have originated from Geary
and plain-text-only drafts as the body so that Geary's composer-internal
HTML markup is still present.

However this introduced a double signature when loading plain text
drafts back since Geary would assume the body (including sig) is the
message body and appending a new sig to that.

This addresses the issue above by always saving drafts with HTML parts
even when in plain text only mode.
2020-08-13 19:52:12 +10:00
Michael Gratton
44654e3f76 Composer.Widget: Rework context email loading
Ensure composer state is restored when loading draft replies and that
`referred_ids` is updated top include the messages the draft refers to.

Make the process for loading different context types more obvious by
doing the work in-place, especially for replies, and avoiding multiple
utility methods that also branch based on type.

Use standard RFC822 classes for managing In-Reply-To and References, and
merge id lists rather than simply concatenating them. Ensure both are
updated when adding additional replies to the email, and they are always
set on any composed email constructed.

Add unit tests for all of the above.
2020-08-13 19:52:12 +10:00
Michael Gratton
1ed1f82a12 Composer.Widget: Rename get_composed_email to to_composed_email
It's a factory method, not an accessor.
2020-08-13 19:52:12 +10:00
Michael Gratton
a781e0ebf5 Composer.WebView: Rework HTML consts so that IDs have internal access 2020-08-13 19:52:12 +10:00
Michael Gratton
691a239031 Composer.ApplicationInterface: New composer app interface
Defining an interface for the composer to access application objects
and services decouples it from Application.Controller, allowing it to be more
easily unit tested.

Replace use of Application.Client and Application.Controller in the
composer and add some basic unit tests.
2020-08-13 19:52:12 +10:00
Michael Gratton
ea5c95bbbb Trivial code formatting fixup 2020-08-13 19:52:12 +10:00
Michael Gratton
c73888b2c4 Geary.RFC822.MessageIDList: Support merging message id lists
Add support for merging a list with a single id or a another list,
only appending the new id(s) if not already present. Add unit tests.
2020-08-13 19:52:12 +10:00
Michael Gratton
c41515a2c7 Geary.RFC822.MessageIDList: Replace append with concatenate
Add new method for appending a single id, rename to `concatenate` to
disambiguate.
2020-08-13 19:51:33 +10:00
Michael Gratton
2957f15297 Geary.RFC822.MailboxAddresses: Update equality semantics
Although when processing mailbox addresses lists are effectively sets,
the ordering can be important for people. As such, make `equal_to`
comparisons require identical ordering, and add new `contains_all` for
order-independent comparisons.
2020-08-13 19:51:33 +10:00
Michael Gratton
8608293367 Application.AccountInterface: New interface for accessing account objects
By defining an interface for account object access, classes that use it
are decoupled from Application.Controller, allowing them to be more
easily unit tested.
2020-08-13 19:51:33 +10:00
Michael Gratton
6e0aa316d8 build: Generate client internal VAPI and build client tests with it 2020-08-13 19:51:33 +10:00
Michael Gratton
35683dd6eb build: Reduce verbosity of meson vars by removing geary_ prefixes 2020-08-13 19:51:33 +10:00
Michael Gratton
2030b2dec7 test: Break out engine mock objects into their own name-space
Engine mocks don't need to be in the `Geary` namespace, and including
them there makes it difficult to use them in client tests, so put them
all in their own name-space and corresponding directory.
2020-08-13 19:51:33 +10:00
Michael Gratton
3e156525ae Merge branch 'mjog/message-id-db' into 'mainline'
Message-Id data stored incorrectly in the database

Closes #834

See merge request GNOME/geary!540
2020-08-13 08:28:26 +00:00
Michael Gratton
175c7dc7f2 Geary.RFC822.MessageIDList: Add unit tests for parsing RFC822 id lists 2020-08-13 17:55:07 +10:00
Michael Gratton
33801f22ef sql: Add migration for bad message-id data in the database 2020-08-13 15:50:07 +10:00
Michael Gratton
d280bcbbeb Geary.ImapDB: Use RFC822 strings for Message-Id values in the database
Ensure `RFC822.MessageID.to_rfc822_string` is used when storing and
searching for message ids in the database.
2020-08-13 15:21:23 +10:00
Rafael Fontenelle
fe61902367 Update Brazilian Portuguese translation 2020-08-10 10:22:36 +00:00
Michael Gratton
48e4dbfa82 Merge branch 'alatiera/flatpak-fixups' into 'mainline'
ci: couple of flatpak fixups

See merge request GNOME/geary!537
2020-08-09 00:41:00 +00:00
Emin Tufan Çetin
683cb33567 Update Turkish translation 2020-08-07 14:31:12 +00:00
Jordan Petridis
895321de32 ci: make deps of nightly job explicit
also remove the `only` field as its fixed on the template to run on mainline
2020-08-03 22:24:22 +00:00
Jordan Petridis
0aeb5b19aa ci: move the bundle var inline the flatpak jbo 2020-08-03 22:22:32 +00:00
Jordan Petridis
403fee4f14 ci: flatpak: remove meson-args variable
We no longer need to manually keep it in sync with the ci.
2020-08-03 22:19:29 +00:00
Michael Gratton
175333176e Merge branch 'mjog/crash-sending-multipart' into 'mainline'
Fix mainline crash sending multipart messages

See merge request GNOME/geary!535
2020-08-03 10:58:03 +00:00
Michael Gratton
ec4c6d3989 Geary.RFC822.Message: Fix get_body() critical with multipart messages
Fixes a bad assumption MR !534 made about GMime structure and causing
a crash on sending multipart messages. Add unit tests to cover this
case.
2020-08-03 20:14:32 +10:00
Michael Gratton
6424b66b56 Merge branch 'mjog/flatpak-ci-failure' into 'mainline'
Flatpak CI failure

See merge request GNOME/geary!536
2020-08-03 10:13:34 +00:00
Michael Gratton
27a9404bcf .gitlab-ci.yml: Remove CI jobs after they were removed from the template 2020-08-03 18:19:20 +10:00
Piotr Drąg
3ce81ed286 Update Polish translation 2020-08-02 13:36:55 +02:00
Kukuh Syafaat
202ae883ea Update Indonesian translation 2020-07-31 12:33:39 +00:00
Michael Gratton
e89a5cadbd Merge branch 'mjog/rfc822-cleanup-part-n' into 'mainline'
RFC822 error handling cleanup

Closes #889

See merge request GNOME/geary!534
2020-07-31 02:26:23 +00:00