Commit graph

6106 commits

Author SHA1 Message Date
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
Michael Gratton
8e33f8fe07 Merge branch 'diegoe_prefs-window-size' into 'mainline'
preferences: Set default_width to omit back button

See merge request GNOME/geary!528
2020-07-31 01:53:32 +00:00
Anders Jonsson
5df1c6e8fd Update Swedish translation 2020-07-30 11:19:25 +00:00
Yuri Chornoivan
223ecd1b6f Update Ukrainian translation 2020-07-30 09:56:57 +00:00
Michael Gratton
75ec2fe279 Merge branch 'nomailinglist' into 'mainline'
geary-list mailing list is obsolete

See merge request GNOME/geary!532
2020-07-30 04:08:31 +00:00
Michael Gratton
1319120e9f Merge branch 'mainline' into 'mainline'
Added detach composer shortcut to UI

See merge request GNOME/geary!531
2020-07-30 04:06:01 +00:00
Michael Gratton
53ddf81927 Geary.Imap.FolderSession: Ensure Email fields updated for null values
Ensure that when setting values from server responses on a Geary.Email
that the flags are still updated even when values are null (e.g. set
Email.Field.DATE even if no Date header was present) so that clients
can tell that the value is in fact null and that email field prereq
checks aren't accidentally triggered.
2020-07-30 13:03:31 +10:00
Michael Gratton
c2a1bae025 Geary.Memory.OffsetBuffer: Remove now unused class 2020-07-30 12:53:11 +10:00
Michael Gratton
784bac58a1 Geary.Imap.FolderSession: Tighten up preview generation error handling 2020-07-30 12:53:11 +10:00
Michael Gratton
6af5b2f0e6 Geary.Email: Rework RFC822.Message.get_email into an Email constructor
This also allows us to remove the message buffer hack in Message.
2020-07-30 12:53:11 +10:00
Michael Gratton
e2f2b6cdab Geary.RFC822.Message: Add accessors for message headers and raw body
Allow accessing Header and Text representations of the message.
2020-07-30 12:53:11 +10:00
Michael Gratton
0b8bf7375f Geary.Imap.EnvelopeDecoder: Suppress message id errors
Even if the a message has an invalid message id or message id list
header value, we need to keep parsing the message to ensure we can
do *something* useful with it.
2020-07-30 12:53:11 +10:00
Michael Gratton
26f5fdef38 Geary.RFC822.Message: Suppress message id errors in ctors
Even if the a message has an invalid message id or message id list
header value, we need to keep parsing the message to ensure we can
do *something* useful with it.
2020-07-30 12:53:11 +10:00
Michael Gratton
537410f76e Geary.RFC822.{MessageID,MessageIdList}: Throw error parsing empty rfc822
An empty string is not a valid RFC822 message id or message id list, so
don't treat it as such.
2020-07-30 12:53:11 +10:00
Michael Gratton
b78dfe7cb8 Composer.Widget: Convert references to a MessageIdList instance
Using the high-level representation avoids having to re-parse and
re-format the list.

Update the util method Geary.RFC822.Utils.reply_references to support
this.
2020-07-30 12:53:11 +10:00
Rafael Fontenelle
7f632703b7 Update Brazilian Portuguese translation 2020-07-18 12:19:51 +00:00
Jordi Mas
7a0b4fb3f1 Update Catalan translations 2020-07-11 22:35:17 +02:00
Federico Bruni
fbef65754c geary-list mailing list is obsolete
Archives are still available at:
https://mail.gnome.org/archives/geary-list/
2020-07-10 13:19:32 +02:00
Jordi Mas
1f24530e57 Update Catalan translation 2020-07-09 23:05:35 +02:00
Andre Klapper
49f3f17ddc Fix broken markup in Italian help translation 2020-07-07 18:51:05 +02:00