"Labels" (MAIL:label) will be used instead of the currently misused
"Status" (MAIL:status) to allow categorization of emails by the
user. These labels are only used on the locally download emails;
there's no syncing with a mail server.
(See also forum thread "Introducing a new indexed attribute META:tag" at
https://discuss.haiku-os.org/t/introducing-a-new-indexed-attribute-meta-tag.)
* Remove custom statuses from "Close and…" submenu and anything else
concerning custom statuses.
* Add a "Set label" menu with a submenu to
- Remove the current mail's label, if it has one
- Add a new label
- Choose from a list of labels (first 9 items with ALT+n shortcut)
- Open the labels folder in Tracker to manage labels
(delete/rename/etc.)
* Labels are saved as separate files in ~/config/settings/Mail/labels/
* Label files are queries for all files which have that particular
label in their MAIL:label attribute. This is convenient when
managing your label, e.g. see if there are any emails with a
certain label before deleting it.
* Added "Same label" to the "Queries" menu.
* In MenusBeginning() the files in ~/config/settings/Mail/labels/ are
read and shown with their file name as menu item.
* When an email is opened, its label file is created if it doesn't
exist already. That way the Mail app can provide labels that were
not created with it, but e.g. by manually filling the attribute in
Tracker, or via a script etc.
* Related: When populating the labels menu, make sure each label query
has the correct formula. A user may have created a label by hand or
duplicated an existing formula, in which case the query formula would
be missing or wrong.
Setting a label currently isn't supported when composing an email, as
we cannot set an attribute, because an email file isn't created until
it's sent.
Change-Id: I53fb4613ec1d2d96493169e0310c11c5ba0131c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10384
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: humdinger humdinger <[email protected]>