diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-12 11:55:42 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-12 11:55:42 +0200 |
| commit | 8b67ed8d6d727aa99c091c6eb46160ecb6300f72 (patch) | |
| tree | a17578371f2c87c1ffb0730555ae3c3bb03d8f84 /src/keymap.cpp | |
| parent | 0afd62360ffa7f28bd24b7a37ddbe53456f94aa9 (diff) | |
| download | qtmaildir-8b67ed8d6d727aa99c091c6eb46160ecb6300f72.tar.gz qtmaildir-8b67ed8d6d727aa99c091c6eb46160ecb6300f72.zip | |
feat(rules): open the tagging rules from the Message menu
Counts are generation-stamped and dropped when stale or when the dialog
has closed: counting every rule against a cold index takes seconds, so
an in-flight reply outliving its dialog is ordinary rather than rare.
The stamp is its own counter, not m_generation as drafted. That one is
the QUERY generation, compared against directly by every thread, tree
and message load, so bumping it to count rules would discard whatever
the user was opening at the time and blank the message pane for an
unrelated reason.
Registering an action obliges two more entries, both enforced by tests:
the name in KeyMap::knownActions(), and a default binding, since every
action carries one. Ctrl+Shift+T, shifted against Ctrl+T for edit_tags
the way Ctrl+Shift+U is shifted against Ctrl+U.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/keymap.cpp')
| -rw-r--r-- | src/keymap.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/keymap.cpp b/src/keymap.cpp index cdd26a1..71c5355 100644 --- a/src/keymap.cpp +++ b/src/keymap.cpp @@ -35,6 +35,7 @@ QStringList KeyMap::knownActions() QStringLiteral("toggle_unread"), QStringLiteral("mark_all_read"), QStringLiteral("edit_tags"), + QStringLiteral("tag_rules"), QStringLiteral("flag"), QStringLiteral("focus_query"), QStringLiteral("complete_query"), @@ -89,6 +90,11 @@ QList<QPair<QString, QString>> KeyMap::defaultBindings() { QStringLiteral("Ctrl+Shift+U"), QStringLiteral("mark_all_read") }, { QStringLiteral("Ctrl+I"), QStringLiteral("flag") }, { QStringLiteral("Ctrl+T"), QStringLiteral("edit_tags") }, + // Shifted against Ctrl+T for the same reason Ctrl+Shift+U is shifted + // against Ctrl+U: this is the standing version of tagging, applied to + // every message that arrives rather than to the selection, so it takes + // the harder chord. + { QStringLiteral("Ctrl+Shift+T"), QStringLiteral("tag_rules") }, { QStringLiteral("Ctrl+L"), QStringLiteral("focus_query") }, // Ctrl+Space is the completion idiom users already carry over from // shells and editors, and it is a named key rather than a symbol, so |
