Commit graph

6199 commits

Author SHA1 Message Date
Michael Gratton
2d12b25e2c build: Switch over to use libhandy-1
Add as a optional submodule for people who don't have it installed yet.
2020-08-18 22:10:34 +10:00
Michael Gratton
62ccfdafcd build: Generate valadoc vapidir args to reduce command boilerplate 2020-08-18 22:10:34 +10:00
Michael Gratton
2532f94bab build: Remove local vapi directory from valadoc target 2020-08-18 22:10:34 +10:00
Michael Gratton
6b87249959 Merge branch 'mjog/i18n-fixes' into 'mainline'
I18n fixes

See merge request GNOME/geary!547
2020-08-18 09:04:19 +00:00
Michael Gratton
462edf7eb8 src/client/plugins: Reduce translations needed for internal plugins
Remove `Description` key from internal plugin desktop files and
leave a note about not bothering to translate `Name`, since they
will ever be seen.
2020-08-18 18:10:39 +10:00
Michael Gratton
193aaa2281 po/POTFILES.in: Add missing plugin source files 2020-08-18 18:09:26 +10:00
Michael Gratton
8a5ea12069 Composer.Widget: Avoid confusing xgettext with a verbatim string 2020-08-18 18:08:05 +10:00
Michael Gratton
0c1c7c11b1 Application.MainWindow: Fix info bar typo 2020-08-18 17:38:59 +10:00
Michael Gratton
5fef4b68ba Merge branch 'nightly-icon' into 'mainline'
Use a nightly icon for nightly builds

See merge request GNOME/geary!545
2020-08-18 07:11:38 +00:00
Michael Gratton
67a2d32a6c Merge branch 'mjog/dovecot-envelope-mailbox-quirk' into 'mainline'
Dovecot envelope mailbox quirk

See merge request GNOME/geary!546
2020-08-18 07:07:35 +00:00
Michael Gratton
858487d178 Merge branch 'mjog/mail-merge-plugin' into 'mainline'
Mail merge plugin

Closes #660

See merge request GNOME/geary!541
2020-08-18 07:03:05 +00:00
Michael Gratton
50f2ca98b5 Geary.Imap.Quirks: Add quirks for Dovecot
Dovecot 2.3.4.1 and earlier uses "MISSING_MAILBOX" and "MISSING_DOMAIN"
in the address structures of FETCH ENVELOPE replies when the mailbox or
domain is missing.

See https://dovecot.org/pipermail/dovecot/2020-August/119658.html
2020-08-18 16:34:24 +10:00
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
c3c134f09a MailMerge.Folder: Throttle sending rate to 30 per minute 2020-08-18 16:32:26 +10:00
Michael Gratton
182c498827 MailMerge.Folder: Implement sending merged email 2020-08-18 16:32:26 +10:00
Michael Gratton
d8d8abaef0 MailMerge.Folder: Update backing collections
Rename list and map collections to be a bit more descriptive, only
store ids in the list since they are already in the map.
2020-08-18 16:32:26 +10:00
Michael Gratton
99bc719fe1 MailMerge.Folder: Add skeleton properties for accessing folder state
Add properties to allow determining the data's file name, the number of
email total and sent, and if the folder is currently sending.
2020-08-18 16:32:26 +10:00
Michael Gratton
7d6078d7c9 Geary.ComposedEmail: Allow send date to be updated
We want to ensure there is a non-null, send date, but mail merge wants
to set the date to be when it was actually sent, so allow it to be
updated after construction.
2020-08-18 16:32:26 +10:00
Michael Gratton
a58e71aeb6 Plugin.MailMerge: Add info bar to merge folder with status and actions 2020-08-18 16:32:26 +10:00
Michael Gratton
44b62ed89c Plugin.Actionable: Support specifying icons
Add new ctor to `Actionable` to allow specifying an icon name but
keeping the class immutable. Add support for displaying icon in
`Plugin.InfoBar` buttons by implementing support for it
`Components.InfoBar`. Also support updating the primary button when
the plugin's primary button changes.
2020-08-18 16:32:26 +10:00
Michael Gratton
30e5e5bedc Plugin.InfoBar: Enable plugins to dynamically update info bar labels
Make status and description properties publicly settable, keep tabs
on changes in `Component.InfoBar` and update GTK labels as needed.
2020-08-18 16:32:26 +10:00
Michael Gratton
aae3a1a581 Plugin.Infobar: Allow plugins to be notified of close button activation
Add `close_activated` signal, update `Components.InfoBar` to emit it
when clicked.
2020-08-18 16:32:26 +10:00
Michael Gratton
c8aeeec67b Sidebar.Branch: Fix compiler warning, improve code style 2020-08-18 16:32:26 +10:00
Michael Gratton
4404496ad4 Application.MainWindow: Select another folder is when selected is removed 2020-08-18 16:32:26 +10:00
Michael Gratton
f7ea243c9d Sidebar.Branch: Fix assert when removing a folder
Doesn't help, just remove it.
2020-08-18 16:32:26 +10:00
Michael Gratton
c0795fa04b MailMerge: Implement initial email merging
Make `Processor` an instantiable class to handle merging from a
template email. Use this in `Folder` to implement merging for each
data row.
2020-08-18 16:32:26 +10:00
Michael Gratton
c89fe7ebbd MailMerge.Processor: Add field parser object, use in contains_field
Add a reusable private parser struct, reimplement `contains_field` using
it. Add unit tests for that and `is_mail_merge_template`.
2020-08-18 16:32:26 +10:00
Michael Gratton
67ecf11a83 MailMerge: Put non-plugin classes in own namespace, rename source files
Use a new top-level `MailMerge` namespace for non-plugin classes,
rename source files to match.
2020-08-18 16:32:26 +10:00
Michael Gratton
b1807df1be MailMerge: Break test source file into separate driver and test files
Allow adding additional, unrelated unit tests.
2020-08-18 16:32:26 +10:00
Michael Gratton
a6acf96d59 Plugin.MailMerge: Move merge field code from plugin to standalone class
Adds new processor class, moves merge field code into that, ensure that
both when checking email for merge fields and handing email off to the
merge folder that the email is loaded with fields required by the
processor.
2020-08-18 16:32:26 +10:00
Michael Gratton
2ce3d8b51f Plugin.MailMergeFolder: Load messages from template into the folder
This doesn't actually do the merging yet, just creates an email per
CSV row.
2020-08-18 16:32:26 +10:00
Michael Gratton
da9e01897a Plugin.MailMerge: Register folder with the engine rather than client
Use new support for registering local folders with the engine to do
just that for the merge folder, allowing the conversation monitor to
successfully load and display email in the folder.
2020-08-18 16:32:26 +10:00
Michael Gratton
0d283dfc72 Geary.RFC822.MailboxAddresses: Update append methods
Rename append method to concatenate_list since that's what it actually does. Add new method
for cat'ing a single mailbox, add methods for merging both a single mailbox and mailbox
list into a new list.
2020-08-18 16:32:26 +10:00
Michael Gratton
6c944703e5 Fix valadoc warning 2020-08-18 16:32:26 +10:00
Michael Gratton
334c8e0a40 Application.MainWindow: Fix custom folder path showing in window title 2020-08-18 16:32:26 +10:00
Michael Gratton
df7a30cbe1 Geary.Account: Add {de}register_local_folder methods
Support API clients registering their own local folder implementations.
Use this (and the last commit) to generalise handling of the outbox by
GenericAccount by registering it when the outbox postie is started, and
when creating a map of folders that contain specific ids.

This also ensures API clients are informed of the outbox becoming
available, allowing some special case code to be removed from the app
controller.
2020-08-18 16:32:26 +10:00
Michael Gratton
910228093c Geary.Folder: Add new contains_identifiers method
Add new public method that allows API clients to query whether a folder
contains a specific set of email ids. Add implementation to all
derived classes.
2020-08-18 16:32:26 +10:00
Michael Gratton
77b1683c42 Plugin.MailMerge: Show merge virtual folder when merging
Create and display mail merge virtual folder when merging.
2020-08-18 16:32:26 +10:00
Michael Gratton
ba0ed1c018 Plugin.MailMerge: Allow CSV chooser to be re-used 2020-08-18 16:32:26 +10:00
Michael Gratton
8d297afa33 Plugin.MailMergeFolder: New virtual folder for displaying merged email 2020-08-18 16:32:26 +10:00
Michael Gratton
c5e31cecf4 Sidebar.Branch: Remove some harmless asserts 2020-08-18 16:32:26 +10:00
Michael Gratton
b8bbe53425 Application, Plugin: Make object conversion methods consistent.
Publicly, get objects for a variant rather than from it since we're
not actually getting the objects from the variant, just looking them
up using the variant as an id.

Internally, use `to_` rather than `get_` when converting between plugin
and engine objects, since its typically just a cast or a lookup to do
so.
2020-08-18 16:32:26 +10:00
Michael Gratton
c252133222 Application.AccountContext: Make folder context methods public
Making the context public allows third-party code (e.g. trusted plugins)
insert additional folders into the application.
2020-08-18 16:32:26 +10:00
Michael Gratton
ee53621d3b Plugin.MailMerge: Add some missing comments to translators 2020-08-18 16:32:26 +10:00
Michael Gratton
3f5f4a4ac4 Plugin.MailMerge: Add composer action bar menu for inserting CSV fields 2020-08-18 16:32:26 +10:00
Michael Gratton
5d5f04e3df Plugin.Composer: Add insert_text method
Supports plugins that insert text into the composer.
2020-08-18 16:32:26 +10:00
Michael Gratton
20dffabb23 Plugin.Composer: Add new action_group_name property
Since GLib.Menu instances require fully qualified action names for menu
item actions, plugins need to be able to access the group name their
actions have been added to.

This lets plugins activate arbitrary actions, but that's perhaps not a
big risk?
2020-08-18 16:32:26 +10:00