summaryrefslogtreecommitdiff
path: root/src/components/mail/listing/plain.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/mail/listing/plain.rs')
-rw-r--r--src/components/mail/listing/plain.rs23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/components/mail/listing/plain.rs b/src/components/mail/listing/plain.rs
index abcc9717..3e45f528 100644
--- a/src/components/mail/listing/plain.rs
+++ b/src/components/mail/listing/plain.rs
@@ -621,7 +621,6 @@ impl fmt::Display for PlainListing {
}
impl PlainListing {
- //const DESCRIPTION: &'static str = "plain listing";
pub fn new(coordinates: (AccountHash, MailboxHash)) -> Box<Self> {
Box::new(PlainListing {
cursor_pos: (0, 1, 0),
@@ -1084,19 +1083,19 @@ impl Component for PlainListing {
match (&event, self.focus) {
(UIEvent::Input(ref k), Focus::Entry)
- if shortcut!(k == shortcuts[Listing::DESCRIPTION]["focus_right"]) =>
+ if shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_right"]) =>
{
self.set_focus(Focus::EntryFullscreen, context);
return true;
}
(UIEvent::Input(ref k), Focus::EntryFullscreen)
- if shortcut!(k == shortcuts[Listing::DESCRIPTION]["focus_left"]) =>
+ if shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_left"]) =>
{
self.set_focus(Focus::Entry, context);
return true;
}
(UIEvent::Input(ref k), Focus::Entry)
- if shortcut!(k == shortcuts[Listing::DESCRIPTION]["focus_left"]) =>
+ if shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_left"]) =>
{
self.set_focus(Focus::None, context);
return true;
@@ -1112,22 +1111,22 @@ impl Component for PlainListing {
match *event {
UIEvent::Input(ref k)
if matches!(self.focus, Focus::None)
- && (shortcut!(k == shortcuts[Listing::DESCRIPTION]["open_entry"])
- || shortcut!(k == shortcuts[Listing::DESCRIPTION]["focus_right"])) =>
+ && (shortcut!(k == shortcuts[Shortcuts::LISTING]["open_entry"])
+ || shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_right"])) =>
{
self.set_focus(Focus::Entry, context);
return true;
}
UIEvent::Input(ref k)
if !matches!(self.focus, Focus::None)
- && shortcut!(k == shortcuts[Listing::DESCRIPTION]["exit_entry"]) =>
+ && shortcut!(k == shortcuts[Shortcuts::LISTING]["exit_entry"]) =>
{
self.set_focus(Focus::None, context);
return true;
}
UIEvent::Input(ref k)
if !matches!(self.focus, Focus::None)
- && shortcut!(k == shortcuts[Listing::DESCRIPTION]["focus_left"]) =>
+ && shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_left"]) =>
{
match self.focus {
Focus::Entry => {
@@ -1144,7 +1143,7 @@ impl Component for PlainListing {
}
UIEvent::Input(ref key)
if !self.unfocused()
- && shortcut!(key == shortcuts[Listing::DESCRIPTION]["select_entry"]) =>
+ && shortcut!(key == shortcuts[Shortcuts::LISTING]["select_entry"]) =>
{
if self.modifier_active && self.modifier_command.is_none() {
self.modifier_command = Some(Modifier::default());
@@ -1357,8 +1356,10 @@ impl Component for PlainListing {
ShortcutMaps::default()
};
- let config_map = context.settings.shortcuts.listing.key_values();
- map.insert(Listing::DESCRIPTION, config_map);
+ map.insert(
+ Shortcuts::LISTING,
+ context.settings.shortcuts.listing.key_values(),
+ );
map
}