[gnome-builder] meson-templates: fix vala gtk4 template



commit bd7c6a3ba9aa36b00b4b93bc483eb55dd14d3c8e
Author: Christian Hergert <chergert redhat com>
Date:   Wed Mar 9 11:00:54 2022 -0800

    meson-templates: fix vala gtk4 template
    
    Fixes the following compilation error found while dogfooding Builder
    before release.
    
    application.vala:22.24-22.27: error: This access invalid outside of instance methods

 .../meson-templates/resources/src/application-gtk4.vala    | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/plugins/meson-templates/resources/src/application-gtk4.vala 
b/src/plugins/meson-templates/resources/src/application-gtk4.vala
index 9ac33e639..c626d7208 100644
--- a/src/plugins/meson-templates/resources/src/application-gtk4.vala
+++ b/src/plugins/meson-templates/resources/src/application-gtk4.vala
@@ -2,17 +2,15 @@
 
 namespace {{PreFix}} {
     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);
 
-            this.add_action_entries (this.APP_ACTIONS, this);
+            ActionEntry[] action_entries = {
+                { "about", this.on_about_action },
+                { "preferences", this.on_preferences_action },
+                { "quit", this.quit }
+            };
+            this.add_action_entries (action_entries, this);
             this.set_accels_for_action ("app.quit", {"<primary>q"});
         }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]