diff --git a/src/plugins/meson-templates/resources/src/application-gtk4.vala b/src/plugins/meson-templates/resources/src/application-gtk4.vala index 866f5ebe2b83546cc4b97ec27947c48fd02dcd9b..9ac33e6393947501d497f768bcd42733500f951d 100644 --- a/src/plugins/meson-templates/resources/src/application-gtk4.vala +++ b/src/plugins/meson-templates/resources/src/application-gtk4.vala @@ -1,40 +1,40 @@ {{include "license.vala"}} namespace {{PreFix}} { - public class Application : {{if is_adwaita}}Adw{{else}}Gtk{{end}}.Application { - private ActionEntry[] APP_ACTIONS = { - { "about", on_about_action }, - { "preferences", on_preferences_action }, - { "quit", quit } - }; + public class Application : {{if is_adwaita}}Adw{{else}}Gtk{{end}}.Application { + private ActionEntry[] APP_ACTIONS = { + { "about", this.on_about_action }, + { "preferences", this.on_preferences_action }, + { "quit", this.quit } + }; - public Application () { - Object (application_id: "{{appid}}", flags: ApplicationFlags.FLAGS_NONE); + public Application () { + Object (application_id: "{{appid}}", flags: ApplicationFlags.FLAGS_NONE); - this.add_action_entries(this.APP_ACTIONS, this); - this.set_accels_for_action("app.quit", {"q"}); - } + this.add_action_entries (this.APP_ACTIONS, this); + this.set_accels_for_action ("app.quit", {"q"}); + } - public override void activate () { - base.activate(); - var win = this.active_window; - if (win == null) { - win = new {{PreFix}}.Window (this); - } - win.present (); - } + public override void activate () { + base.activate (); + var win = this.active_window; + if (win == null) { + win = new {{PreFix}}.Window (this); + } + win.present (); + } - private void on_about_action () { - string[] authors = {"{{author}}"}; - Gtk.show_about_dialog(this.active_window, - "program-name", "{{name}}", - "authors", authors, - "version", "{{project_version}}"); - } + private void on_about_action () { + string[] authors = { "{{author}}" }; + Gtk.show_about_dialog (this.active_window, + "program-name", "{{name}}", + "authors", authors, + "version", "{{project_version}}"); + } - private void on_preferences_action () { - message("app.preferences action activated"); - } - } + private void on_preferences_action () { + message ("app.preferences action activated"); + } + } } diff --git a/src/plugins/meson-templates/resources/src/main-gtk4.vala b/src/plugins/meson-templates/resources/src/main-gtk4.vala index e8a05c989a6c4447c3d6079d6317ac39d8680ed2..5083b116f50121cade8f2da7a618e9f33ba2faf1 100644 --- a/src/plugins/meson-templates/resources/src/main-gtk4.vala +++ b/src/plugins/meson-templates/resources/src/main-gtk4.vala @@ -1,6 +1,6 @@ {{include "license.vala"}} int main (string[] args) { - var app = new {{PreFix}}.Application (); - return app.run (args); + var app = new {{PreFix}}.Application (); + return app.run (args); } diff --git a/src/plugins/meson-templates/resources/src/window-gtk4.vala b/src/plugins/meson-templates/resources/src/window-gtk4.vala index 7ef3be4106abea2867041f3f54878f564513cb11..4cacdb12f052d7803173501b271892935cd0caca 100644 --- a/src/plugins/meson-templates/resources/src/window-gtk4.vala +++ b/src/plugins/meson-templates/resources/src/window-gtk4.vala @@ -1,13 +1,13 @@ {{include "license.vala"}} namespace {{PreFix}} { - [GtkTemplate (ui = "{{appid_path}}/{{ui_file}}")] - public class Window : Gtk.ApplicationWindow { - [GtkChild] - unowned Gtk.Label label; + [GtkTemplate (ui = "{{appid_path}}/{{ui_file}}")] + public class Window : Gtk.ApplicationWindow { + [GtkChild] + private unowned Gtk.Label label; - public Window (Gtk.Application app) { - Object (application: app); - } - } + public Window (Gtk.Application app) { + Object (application: app); + } + } }