Skip to content

Commit 5a7c85d

Browse files
author
Stephan Dilly
committed
rename
1 parent 8fb5065 commit 5a7c85d

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

src/components/changes.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::{
2-
filetree::FileTreeComponent,
2+
filetree::StatusTreeComponent,
33
utils::filetree::{FileTreeItem, FileTreeItemKind},
44
CommandBlocking, DrawableComponent, SharedOptions,
55
};
@@ -18,7 +18,7 @@ use tui::{backend::Backend, layout::Rect, Frame};
1818

1919
///
2020
pub struct ChangesComponent {
21-
files: FileTreeComponent,
21+
files: StatusTreeComponent,
2222
is_working_dir: bool,
2323
queue: Queue,
2424
key_config: SharedKeyConfig,
@@ -37,7 +37,7 @@ impl ChangesComponent {
3737
options: SharedOptions,
3838
) -> Self {
3939
Self {
40-
files: FileTreeComponent::new(
40+
files: StatusTreeComponent::new(
4141
title,
4242
focus,
4343
Some(queue.clone()),

src/components/commit_details/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ mod style;
44

55
use super::{
66
command_pump, event_pump, CommandBlocking, CommandInfo,
7-
Component, DrawableComponent, EventState, FileTreeComponent,
7+
Component, DrawableComponent, EventState, StatusTreeComponent,
88
};
99
use crate::{
1010
accessors, keys::SharedKeyConfig, queue::Queue, strings,
@@ -29,7 +29,7 @@ pub struct CommitDetailsComponent {
2929
commit: Option<CommitFilesParams>,
3030
single_details: DetailsComponent,
3131
compare_details: CompareDetailsComponent,
32-
file_tree: FileTreeComponent,
32+
file_tree: StatusTreeComponent,
3333
git_commit_files: AsyncCommitFiles,
3434
visible: bool,
3535
key_config: SharedKeyConfig,
@@ -56,7 +56,7 @@ impl CommitDetailsComponent {
5656
false,
5757
),
5858
git_commit_files: AsyncCommitFiles::new(sender),
59-
file_tree: FileTreeComponent::new(
59+
file_tree: StatusTreeComponent::new(
6060
"",
6161
false,
6262
Some(queue.clone()),
@@ -126,7 +126,7 @@ impl CommitDetailsComponent {
126126
}
127127

128128
///
129-
pub const fn files(&self) -> &FileTreeComponent {
129+
pub const fn files(&self) -> &StatusTreeComponent {
130130
&self.file_tree
131131
}
132132

src/components/filetree.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ use crossterm::event::Event;
1919
use std::{borrow::Cow, cell::Cell, convert::From, path::Path};
2020
use tui::{backend::Backend, layout::Rect, text::Span, Frame};
2121

22-
//TODO: rename so that its clear this only works for Statuses
2322
//TODO: use new `filetreelist` crate
2423

2524
///
26-
pub struct FileTreeComponent {
25+
pub struct StatusTreeComponent {
2726
title: String,
2827
tree: StatusTree,
2928
pending: bool,
@@ -36,7 +35,7 @@ pub struct FileTreeComponent {
3635
scroll_top: Cell<usize>,
3736
}
3837

39-
impl FileTreeComponent {
38+
impl StatusTreeComponent {
4039
///
4140
pub fn new(
4241
title: &str,
@@ -308,7 +307,7 @@ struct TextDrawInfo<'a> {
308307
item_kind: &'a FileTreeItemKind,
309308
}
310309

311-
impl DrawableComponent for FileTreeComponent {
310+
impl DrawableComponent for StatusTreeComponent {
312311
fn draw<B: Backend>(
313312
&self,
314313
f: &mut Frame<B>,
@@ -377,7 +376,7 @@ impl DrawableComponent for FileTreeComponent {
377376
}
378377
}
379378

380-
impl Component for FileTreeComponent {
379+
impl Component for StatusTreeComponent {
381380
fn commands(
382381
&self,
383382
out: &mut Vec<CommandInfo>,
@@ -496,7 +495,7 @@ mod tests {
496495
let mut frame = terminal.get_frame();
497496

498497
// set up file tree
499-
let mut ftc = FileTreeComponent::new(
498+
let mut ftc = StatusTreeComponent::new(
500499
"title",
501500
true,
502501
None,
@@ -537,7 +536,7 @@ mod tests {
537536
let mut frame = terminal.get_frame();
538537

539538
// set up file tree
540-
let mut ftc = FileTreeComponent::new(
539+
let mut ftc = StatusTreeComponent::new(
541540
"title",
542541
true,
543542
None,

src/components/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ mod taglist;
3131
mod textinput;
3232
mod utils;
3333

34-
pub use self::filetree::FileTreeComponent;
34+
pub use self::filetree::StatusTreeComponent;
3535
pub use blame_file::BlameFileComponent;
3636
pub use branchlist::BranchListComponent;
3737
pub use changes::ChangesComponent;

src/tabs/stashing.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::{
33
components::{
44
command_pump, event_pump, visibility_blocking,
55
CommandBlocking, CommandInfo, Component, DrawableComponent,
6-
EventState, FileTreeComponent,
6+
EventState, StatusTreeComponent,
77
},
88
keys::SharedKeyConfig,
99
queue::{InternalEvent, Queue},
@@ -31,7 +31,7 @@ pub struct StashingOptions {
3131
}
3232

3333
pub struct Stashing {
34-
index: FileTreeComponent,
34+
index: StatusTreeComponent,
3535
visible: bool,
3636
options: StashingOptions,
3737
theme: SharedTheme,
@@ -51,7 +51,7 @@ impl Stashing {
5151
key_config: SharedKeyConfig,
5252
) -> Self {
5353
Self {
54-
index: FileTreeComponent::new(
54+
index: StatusTreeComponent::new(
5555
&strings::stashing_files_title(&key_config),
5656
true,
5757
Some(queue.clone()),

0 commit comments

Comments
 (0)