diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-02-16 22:01:27 -0500 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-02-16 22:01:27 -0500 |
commit | 686033bfcf6d34bfb180e0b0f64ae4493340bf38 (patch) | |
tree | f9318e77aaa6dd317d084676faf4eeb0d99d09d0 /src/util | |
parent | 88da91c0f97dcb40e7e4cab54941af92a46d2e1a (diff) |
move topbar functionality into widget
- add ability to show file sizes in the main column
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/load_child.rs | 1 | ||||
-rw-r--r-- | src/util/menu.rs | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/util/load_child.rs b/src/util/load_child.rs index 386cd63..78872b8 100644 --- a/src/util/load_child.rs +++ b/src/util/load_child.rs @@ -2,7 +2,6 @@ use std::path::PathBuf; use crate::context::JoshutoContext; use crate::history::DirectoryHistory; -use crate::ui::TuiBackend; pub struct LoadChild {} diff --git a/src/util/menu.rs b/src/util/menu.rs index 6a9b5b2..d60c9a1 100644 --- a/src/util/menu.rs +++ b/src/util/menu.rs @@ -13,6 +13,7 @@ use tui::widgets::{Block, Borders, List, Paragraph, Text, Widget}; use tui::Terminal; use unicode_width::UnicodeWidthStr; +use crate::context::JoshutoContext; use crate::ui::TuiBackend; use crate::util::event::{Event, Events}; @@ -26,6 +27,10 @@ impl<'a> OptionMenu<'a> { Self { backend, events } } + pub fn render(&mut self, context: &JoshutoContext) { + + } + pub fn get_option(&mut self, options: &[&str]) -> Option<Key> { let events = self.events; |