diff --git a/TODO.md b/TODO.md index bf48ba1..acef0f6 100644 --- a/TODO.md +++ b/TODO.md @@ -96,6 +96,7 @@ - [ ] Implement zoom on the view (https://gitlab.gnome.org/World/obfuscate/-/blob/master/src/widgets/drawing_area.rs) - [ ] Settings: add a log level selection - [ ] reopen the last log on prematured exit (crash) +- [x] Remove quit as it's unnecessary with close cross ### CI/Infra diff --git a/src/app.rs b/src/app.rs index 24a8fb6..9cf6dda 100644 --- a/src/app.rs +++ b/src/app.rs @@ -263,6 +263,9 @@ impl GPSApp { } fn setup_app_actions(&self, application: >k::Application) { + application.add_action(&gio::SimpleAction::new("new-window", None)); + application.set_accels_for_action("app.new-window", &["n"]); + application.add_action(&gio::SimpleAction::new("open", None)); application.set_accels_for_action("app.open", &["o"]); @@ -271,15 +274,10 @@ impl GPSApp { application.add_action(&gio::SimpleAction::new("delete", None)); application.set_accels_for_action("app.delete", &["d", "Delete"]); + application.add_action(&gio::SimpleAction::new("preferences", None)); application.set_accels_for_action("app.preferences", &["p"]); - application.add_action(&gio::SimpleAction::new("quit", None)); - application.set_accels_for_action("app.quit", &["q"]); - - application.add_action(&gio::SimpleAction::new("new-window", None)); - application.set_accels_for_action("app.new-window", &["n"]); - application.add_action(&gio::SimpleAction::new("about", None)); application.set_accels_for_action("app.about", &["a"]); @@ -522,12 +520,6 @@ impl GPSApp { graph_view.delete_selected(); }); - let app = application.downgrade(); - self.connect_app_menu_action("quit", move |_, _| { - let app = app.upgrade().unwrap(); - app.quit(); - }); - let app_weak = self.downgrade(); self.connect_app_menu_action("about", move |_, _| { let app = upgrade_weak!(app_weak); diff --git a/src/ui/gps.ui b/src/ui/gps.ui index 9b3041e..4e2c95f 100644 --- a/src/ui/gps.ui +++ b/src/ui/gps.ui @@ -27,10 +27,6 @@ _About GstPipelineStudio app.about - - _Quit GstPipelineStudio - app.quit -