mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-10 21:56:42 +01:00
wip: midi import/export browser, pt.4
This commit is contained in:
parent
a4febb8a0d
commit
bd354bbc67
3 changed files with 47 additions and 14 deletions
|
|
@ -266,18 +266,30 @@ impl<T: PhrasesControl> Command<T> for FileBrowserCommand {
|
|||
fn execute (self, state: &mut T) -> Perhaps<Self> {
|
||||
use FileBrowserCommand::*;
|
||||
match state.phrases_mode_mut().clone() {
|
||||
Some(PhrasesMode::Import(index, browser)) => {
|
||||
todo!()
|
||||
Some(PhrasesMode::Import(index, browser)) => match self {
|
||||
Cancel => {
|
||||
*state.phrases_mode_mut() = None;
|
||||
},
|
||||
Chdir(cwd) => {
|
||||
*state.phrases_mode_mut() = Some(PhrasesMode::Import(
|
||||
index, FileBrowser::new(Some(cwd))?
|
||||
));
|
||||
},
|
||||
_ => todo!(),
|
||||
_ => unreachable!()
|
||||
},
|
||||
Some(PhrasesMode::Export(index, browser)) => {
|
||||
todo!()
|
||||
},
|
||||
_ => match self {
|
||||
Begin => {
|
||||
todo!()
|
||||
Some(PhrasesMode::Export(index, browser)) => match self {
|
||||
Cancel => {
|
||||
*state.phrases_mode_mut() = None;
|
||||
},
|
||||
Chdir(cwd) => {
|
||||
*state.phrases_mode_mut() = Some(PhrasesMode::Export(
|
||||
index, FileBrowser::new(Some(cwd))?
|
||||
));
|
||||
},
|
||||
_ => unreachable!()
|
||||
}
|
||||
},
|
||||
_ => unreachable!(),
|
||||
};
|
||||
Ok(None)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue