Add sort menu, fixes #192
This commit is contained in:
parent
24a44c3b52
commit
76cf9865f0
4 changed files with 59 additions and 0 deletions
|
|
@ -797,6 +797,7 @@ pub enum Message {
|
|||
MiddleClick(usize),
|
||||
Scroll(Viewport),
|
||||
SelectAll,
|
||||
SetSort(HeadingOptions, bool),
|
||||
Thumbnail(PathBuf, ItemThumbnail),
|
||||
ToggleFoldersFirst,
|
||||
ToggleShowHidden,
|
||||
|
|
@ -2017,6 +2018,10 @@ impl Tab {
|
|||
commands.push(Command::Iced(widget::button::focus(widget::Id::unique())));
|
||||
}
|
||||
}
|
||||
Message::SetSort(heading_option, dir) => {
|
||||
self.config.sort_name = heading_option;
|
||||
self.config.sort_direction = dir;
|
||||
}
|
||||
Message::Thumbnail(path, thumbnail) => {
|
||||
if let Some(ref mut items) = self.items_opt {
|
||||
for item in items.iter_mut() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue