summaryrefslogtreecommitdiffstats
path: root/src/app/widgets/bottom_widgets/disk.rs
diff options
context:
space:
mode:
authorClementTsang <cjhtsang@uwaterloo.ca>2021-09-26 01:18:03 -0400
committerClementTsang <cjhtsang@uwaterloo.ca>2021-09-26 01:54:59 -0400
commit9089231bc46e9732aac522be89877dcd53a06c6d (patch)
tree9db62c188b8c20116e07adf63fcec7ba1f162383 /src/app/widgets/bottom_widgets/disk.rs
parentb6ca3e0a2274a49b512e8332cb107f8419c9d993 (diff)
refactor: delete more stuff
Mostly previously re-added files during the merge conflict resolution, and a lot of unused code. Still more to delete after I finish rewriting the process kill dialog.
Diffstat (limited to 'src/app/widgets/bottom_widgets/disk.rs')
-rw-r--r--src/app/widgets/bottom_widgets/disk.rs30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/app/widgets/bottom_widgets/disk.rs b/src/app/widgets/bottom_widgets/disk.rs
index 74b63f86..c3ec8bcd 100644
--- a/src/app/widgets/bottom_widgets/disk.rs
+++ b/src/app/widgets/bottom_widgets/disk.rs
@@ -1,43 +1,17 @@
-use std::collections::HashMap;
-
use crossterm::event::{KeyEvent, MouseEvent};
use tui::{backend::Backend, layout::Rect, widgets::Borders, Frame};
use crate::{
app::{
data_farmer::DataCollection, event::ComponentEventResult,
- sort_text_table::SimpleSortableColumn, text_table::TextTableData, AppScrollWidgetState,
- CanvasTableWidthState, Component, TextTable, Widget,
+ sort_text_table::SimpleSortableColumn, text_table::TextTableData, Component, TextTable,
+ Widget,
},
canvas::Painter,
data_conversion::convert_disk_row,
options::layout_options::LayoutRule,
};
-pub struct DiskWidgetState {
- pub scroll_state: AppScrollWidgetState,
- pub table_width_state: CanvasTableWidthState,
-}
-
-#[derive(Default)]
-pub struct DiskState {
- pub widget_states: HashMap<u64, DiskWidgetState>,
-}
-
-impl DiskState {
- pub fn init(widget_states: HashMap<u64, DiskWidgetState>) -> Self {
- DiskState { widget_states }
- }
-
- pub fn get_mut_widget_state(&mut self, widget_id: u64) -> Option<&mut DiskWidgetState> {
- self.widget_states.get_mut(&widget_id)
- }
-
- pub fn get_widget_state(&self, widget_id: u64) -> Option<&DiskWidgetState> {
- self.widget_states.get(&widget_id)
- }
-}
-
/// A table displaying disk data.
pub struct DiskTable {
table: TextTable<SimpleSortableColumn>,