Implement desktop view toggles, part of #547
This commit is contained in:
parent
cc2a62a14c
commit
c511242dd4
8 changed files with 459 additions and 125 deletions
14
src/menu.rs
14
src/menu.rs
|
|
@ -95,7 +95,10 @@ pub fn context_menu<'a>(
|
|||
match (&tab.mode, &tab.location) {
|
||||
(
|
||||
tab::Mode::App | tab::Mode::Desktop,
|
||||
Location::Path(_) | Location::Search(_, _) | Location::Recents,
|
||||
Location::Desktop(_, _)
|
||||
| Location::Path(_)
|
||||
| Location::Search(_, _)
|
||||
| Location::Recents,
|
||||
) => {
|
||||
if selected > 0 {
|
||||
if selected_dir == 1 && selected == 1 || selected_dir == 0 {
|
||||
|
|
@ -189,11 +192,18 @@ pub fn context_menu<'a>(
|
|||
children.push(sort_item(fl!("sort-by-name"), HeadingOptions::Name));
|
||||
children.push(sort_item(fl!("sort-by-modified"), HeadingOptions::Modified));
|
||||
children.push(sort_item(fl!("sort-by-size"), HeadingOptions::Size));
|
||||
children.push(divider::horizontal::light().into());
|
||||
children.push(
|
||||
menu_item(fl!("desktop-view-options"), Action::DesktopViewOptions).into(),
|
||||
);
|
||||
}
|
||||
}
|
||||
(
|
||||
tab::Mode::Dialog(dialog_kind),
|
||||
Location::Path(_) | Location::Search(_, _) | Location::Recents,
|
||||
Location::Desktop(_, _)
|
||||
| Location::Path(_)
|
||||
| Location::Search(_, _)
|
||||
| Location::Recents,
|
||||
) => {
|
||||
if selected > 0 {
|
||||
if selected_dir == 1 && selected == 1 || selected_dir == 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue