diff options
author | orhun <orhun@archlinux.org> | 2021-07-08 01:02:37 +0300 |
---|---|---|
committer | orhun <orhun@archlinux.org> | 2021-07-08 01:02:37 +0300 |
commit | cb1df0b004e04f7aa71ac5398355877f18e46ae4 (patch) | |
tree | 4bdd1a235f415a8eaa5bdde14f6e1e4846bfac32 /src/app/handler.rs | |
parent | 6a9008742215d49481b2c9f1fc0557dcad887419 (diff) |
refactor: Rename clipboard module and CopyType struct to 'selection'
Diffstat (limited to 'src/app/handler.rs')
-rw-r--r-- | src/app/handler.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/app/handler.rs b/src/app/handler.rs index 8e9f07e..fa1cc18 100644 --- a/src/app/handler.rs +++ b/src/app/handler.rs @@ -1,8 +1,8 @@ -use crate::app::clipboard::CopyType; use crate::app::command::Command; use crate::app::launcher::App; use crate::app::mode::Mode; use crate::app::prompt::OutputType; +use crate::app::selection::Selection; use crate::app::tab::Tab; use crate::app::util; use crate::gpg::key::KeyType; @@ -212,7 +212,7 @@ fn handle_key_event(key_event: KeyEvent, app: &mut App) -> Command { } Key::Char('x') | Key::Char('X') => { if app.mode == Mode::Copy { - Command::Copy(CopyType::Key) + Command::Copy(Selection::Key) } else { match app.keys_table.selected() { Some(selected_key) => Command::ExportKeys( @@ -245,7 +245,7 @@ fn handle_key_event(key_event: KeyEvent, app: &mut App) -> Command { } Key::Char('1') => { if app.mode == Mode::Copy { - Command::Copy(CopyType::TableRow(1)) + Command::Copy(Selection::TableRow(1)) } else { Command::Set( String::from("detail"), @@ -255,7 +255,7 @@ fn handle_key_event(key_event: KeyEvent, app: &mut App) -> Command { } Key::Char('2') => { if app.mode == Mode::Copy { - Command::Copy(CopyType::TableRow(2)) + Command::Copy(Selection::TableRow(2)) } else { Command::Set( String::from("detail"), @@ -268,7 +268,7 @@ fn handle_key_event(key_event: KeyEvent, app: &mut App) -> Command { } Key::Char('i') | Key::Char('I') => { if app.mode == Mode::Copy { - Command::Copy(CopyType::KeyId) + Command::Copy(Selection::KeyId) } else { Command::Set( String::from("prompt"), @@ -278,7 +278,7 @@ fn handle_key_event(key_event: KeyEvent, app: &mut App) -> Command { } Key::Char('f') | Key::Char('F') => { if app.mode == Mode::Copy { - Command::Copy(CopyType::KeyFingerprint) + Command::Copy(Selection::KeyFingerprint) } else { Command::Set( String::from("prompt"), @@ -288,7 +288,7 @@ fn handle_key_event(key_event: KeyEvent, app: &mut App) -> Command { } Key::Char('u') | Key::Char('U') => { if app.mode == Mode::Copy { - Command::Copy(CopyType::KeyUserId) + Command::Copy(Selection::KeyUserId) } else { match app.keys_table.selected() { Some(selected_key) => Command::Confirm(Box::new( @@ -398,7 +398,7 @@ fn handle_command_execution<B: Backend>( tui.toggle_pause()?; toggle_pause = true; } - Command::Copy(CopyType::Key) => { + Command::Copy(Selection::Key) => { if app.gpgme.config.armor { tui.toggle_pause()?; toggle_pause = true; |