Do not show operations page any time an operation is done

This commit is contained in:
Jeremy Soller 2024-02-27 13:08:31 -07:00
parent 326fb4ba1f
commit f31f8a0559
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
2 changed files with 5 additions and 3 deletions

View file

@ -50,6 +50,7 @@ pub enum Action {
MoveToTrash,
NewFile,
NewFolder,
Operations,
Paste,
Properties,
RestoreFromTrash,
@ -77,6 +78,7 @@ impl Action {
Action::MoveToTrash => Message::MoveToTrash(entity_opt),
Action::NewFile => Message::NewItem(entity_opt, false),
Action::NewFolder => Message::NewItem(entity_opt, true),
Action::Operations => Message::ToggleContextPage(ContextPage::Operations),
Action::Paste => Message::Paste(entity_opt),
Action::Properties => Message::ToggleContextPage(ContextPage::Properties),
Action::RestoreFromTrash => Message::RestoreFromTrash(entity_opt),
@ -220,9 +222,6 @@ impl App {
let id = self.pending_operation_id;
self.pending_operation_id += 1;
self.pending_operations.insert(id, (operation, 0.0));
//TODO: have some button to show current status
self.core.window.show_context = true;
self.context_page = ContextPage::Operations;
}
fn rescan_tab(

View file

@ -146,6 +146,9 @@ pub fn menu_bar<'a>(key_binds: &HashMap<KeyBind, Action>) -> Element<'a, Message
menu_item(fl!("copy"), Action::Copy),
menu_item(fl!("paste"), Action::Paste),
menu_item(fl!("select-all"), Action::SelectAll),
MenuTree::new(horizontal_rule(1)),
//TODO: edit history
menu_item(fl!("operations"), Action::Operations),
],
),
MenuTree::with_children(