app: remove quit mentu entry

The quit menu entry is dispensable as
the application can be quit with cross
This commit is contained in:
Stéphane Cerveau 2022-02-08 14:13:18 +01:00
parent 4893b6fd68
commit 78b2bd4a6f
3 changed files with 5 additions and 16 deletions

View file

@ -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

View file

@ -263,6 +263,9 @@ impl GPSApp {
}
fn setup_app_actions(&self, application: &gtk::Application) {
application.add_action(&gio::SimpleAction::new("new-window", None));
application.set_accels_for_action("app.new-window", &["<primary>n"]);
application.add_action(&gio::SimpleAction::new("open", None));
application.set_accels_for_action("app.open", &["<primary>o"]);
@ -271,15 +274,10 @@ impl GPSApp {
application.add_action(&gio::SimpleAction::new("delete", None));
application.set_accels_for_action("app.delete", &["<primary>d", "Delete"]);
application.add_action(&gio::SimpleAction::new("preferences", None));
application.set_accels_for_action("app.preferences", &["<primary>p"]);
application.add_action(&gio::SimpleAction::new("quit", None));
application.set_accels_for_action("app.quit", &["<primary>q"]);
application.add_action(&gio::SimpleAction::new("new-window", None));
application.set_accels_for_action("app.new-window", &["<primary>n"]);
application.add_action(&gio::SimpleAction::new("about", None));
application.set_accels_for_action("app.about", &["<primary>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);

View file

@ -27,10 +27,6 @@
<attribute name="label" translatable="yes" comments="Primary menu entry that opens the About dialog.">_About GstPipelineStudio</attribute>
<attribute name="action">app.about</attribute>
</item>
<item>
<attribute name="label" translatable="yes" comments="Primary menu entry that quit app">_Quit GstPipelineStudio</attribute>
<attribute name="action">app.quit</attribute>
</item>
</section>
</menu>
<menu id="port_menu">