GNOME Bugzilla – Bug 224044
Keys to open attachments
Last modified: 2020-02-05 18:03:46 UTC
It would be nice to be able to open attachments from the keyboard. Eg, C-1 to open/close the first attachment, C-2 to open/close the second attachment, etc. (Where "open" means either open inline or open in an app depending on the attachment?)
So here is how I propose that this works: (note: magic gtkhtml keyboard navigability assumed) (First, ideally, we would add a "Open attachments" item to the right-click menu for the message list, and to the right-click menu for the message in the preview pane. This menu item should have a submenu where each attachment is listed...selecting the attachment would open it in the appropriate application. Reliable sources tell me this would be a first class pain in the butt , since the list of which apps can open which types of attachments is controlled by gnome-vfs. So, keep this in mind as a blue-sky scenario. Naively, it seems to me that gui-wise this would be simple-- we could add a tab to the mail preferences notebook for attachments and let the user specify their app of choice for 5? 6? 10? attachment types, as well as a default app for funky attachments. I am thinking of the way the labels gui works, I guess. ) ANYWAY. When I tab into the message (as seen in the preview pane, or in a separate window), hence placing focus there, I can then press tab again to access the first attachment, then press tab again for the subsequent attachment, etc; or, I can use the arrow keys to move through the list of attachments. When I have a particular attachment selected, I can view its context menu from the keyboard by using some keybinding that I haven't thought up yet. :) . Does this make sense?
you can't really add an 'open attachments' context menu to the message-list, since the message pane might not be shown. it would have to download and render the message first (determining what and what isn't an attachment isn't as simple as looking at the structure of the message).
Bumping version to a stable release.
Message preview pane displayed, you can *save* attachments by using the mnemonic (Alt+A for "Save _As"), but that's all.
Ctrl+1,...Ctrl+5 are used to switch between windows (Mail/Contacts/Calendar/Tasks/Memos). I guess the Ctrl+Alt+n can be used to access the first 'n' (1..0) attachment buttons, but rather than choose what to do for the user, which might be always wrong, just move to its associated button at the bottom of the message preview and simulate a click on it, to bring the popup menu to the user to select what to do. Another theoretical issue is what to do with message attachments, which have also attachments. Do you want to traverse only level 0, or also inner levels, in which order, ... and so on. Dan, is still still relevant for you? I'd guess, after so many years...
I made this work as mentioned above, that is, Ctrl+Alt+0..9 calls actions on attachments, where 0 means all, 1 is the first, 2 is the second and so no. While the 'all' can only expand/collapse attachments inline, the exact number can either expand/collapse, or open in external application (if there is any such default set in the system for it), or it opens a save dialog for it. The action for all expands all first, and if all are already expanded, then it collapses them. These accelerators can be overridden in ~/.config/evolution/accels they are the lines with 'e-mail-display-attachment-accel", like: /e-mail-display-attachment-accel/attachment-toggle-all /e-mail-display-attachment-accel/attachment-toggle-1 and so on. Created commit [1] in evo master (3.35.91+) [1] https://gitlab.gnome.org/GNOME/evolution/commit/70a098878b