Add menu items for projects and closing files
This commit is contained in:
parent
e278317565
commit
5032f74356
4 changed files with 33 additions and 5 deletions
|
|
@ -72,6 +72,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub enum Message {
|
||||
Config(Config),
|
||||
CloseFile,
|
||||
CloseProject,
|
||||
Copy,
|
||||
Cut,
|
||||
DefaultFont(usize),
|
||||
|
|
@ -523,6 +525,12 @@ impl cosmic::Application for App {
|
|||
self.update_config();
|
||||
}
|
||||
}
|
||||
Message::CloseFile => {
|
||||
return self.update(Message::TabClose(self.tab_model.active()));
|
||||
}
|
||||
Message::CloseProject => {
|
||||
log::info!("TODO");
|
||||
}
|
||||
Message::Copy => match self.active_tab() {
|
||||
Some(tab) => {
|
||||
let editor = tab.editor.lock().unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue