[gnome-taquin] Introduce GameHeaderbar.



commit d0915ff79f4873c6859f7e4b20acda0325cf2638
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sun Jan 20 19:12:59 2019 +0100

    Introduce GameHeaderbar.
    
    That is needed for subclassing BaseWindow.

 data/game-headerbar.ui   |  92 +++++++++++++++++++++
 data/taquin.ui           | 110 +------------------------
 po/POTFILES.in           |   2 +
 po/POTFILES.skip         |   3 +-
 src/game-headerbar.vala  | 138 ++++++++++++++++++++++++++++++++
 src/game-window.vala     | 203 ++++++++++++++++-------------------------------
 src/meson.build          |   1 +
 src/taquin.gresource.xml |   1 +
 8 files changed, 307 insertions(+), 243 deletions(-)
---
diff --git a/data/game-headerbar.ui b/data/game-headerbar.ui
new file mode 100644
index 0000000..47c0cab
--- /dev/null
+++ b/data/game-headerbar.ui
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface domain="gnome-taquin">
+  <!-- interface-requires gtk+ 3.0 -->
+  <menu id="window-menu">
+    <section>
+      <item>
+        <!-- Translators: hamburger menu entry; sound togglebutton (with a mnemonic that appears pressing 
Alt) -->
+        <attribute name="label" translatable="yes">_Sound</attribute>
+        <attribute name="action">app.sound</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <!-- Translators: hamburger menu entry; open help (with a mnemonic that appears pressing Alt) -->
+        <attribute name="label" translatable="yes">_Help</attribute>
+        <attribute name="action">app.help</attribute>
+      </item>
+      <item>
+        <!-- Translators: hamburger menu entry; open about dialog (with a mnemonic that appears pressing 
Alt) -->
+        <attribute name="label" translatable="yes">_About Taquin</attribute>
+        <attribute name="action">app.about</attribute>
+      </item>
+    </section>
+  </menu>
+  <template class="GameHeaderBar" parent="GtkHeaderBar">
+    <property name="show-close-button">True</property>
+    <child>
+      <object class="GtkBox" id="controls_box">
+        <property name="visible">False</property>
+        <property name="orientation">horizontal</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkButton" id="back_button">
+        <property name="visible">False</property>
+        <property name="halign">center</property>
+        <property name="valign">center</property>
+        <!-- Translators: when configuring a new game, if the user has a started game, tooltip text of the 
Go back button -->
+        <property name="tooltip-text" translatable="yes">Go back to the current game</property>
+        <property name="use-underline">True</property>
+        <property name="action-name">win.back</property>
+        <style><class name="image-button"/></style>
+        <child>
+          <object class="GtkImage">
+            <property name="icon-name">go-previous-symbolic</property>
+            <property name="visible">True</property>
+            <property name="icon-size">1</property>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="pack_type">start</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkButton" id="new_game_button">
+        <property name="visible">True</property>
+        <property name="halign">center</property>
+        <property name="valign">center</property>
+        <!-- Translators: during a game, label of the Start Over button (with a mnemonic that appears 
pressing Alt) -->
+        <property name="label" translatable="yes">_Start Over</property>
+        <property name="use-underline">True</property>
+        <property name="action-name">win.new-game</property>
+        <!-- Translators: during a game, tooltip text of the Start Over button -->
+        <property name="tooltip-text" translatable="yes">Start a new game</property>
+      </object>
+      <packing>
+        <property name="pack-type">end</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkMenuButton" id="info_button">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="receives_default">False</property>
+        <property name="menu_model">window-menu</property>
+        <child>
+          <object class="GtkImage">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="icon_name">open-menu-symbolic</property>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="pack_type">end</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </template>
+</interface>
diff --git a/data/taquin.ui b/data/taquin.ui
index 169884a..7088cb0 100644
--- a/data/taquin.ui
+++ b/data/taquin.ui
@@ -4,73 +4,8 @@
   <template class="GameWindow" parent="GtkApplicationWindow">
     <!-- <initial-focus name="view"/> -->
     <child type="titlebar">
-      <object class="GtkHeaderBar" id="headerbar">
+      <object class="GameHeaderBar" id="headerbar">
         <property name="visible">True</property>
-        <property name="show-close-button">True</property>
-        <child>
-          <object class="GtkBox" id="controls_box">
-            <property name="visible">False</property>
-            <property name="orientation">horizontal</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkButton" id="back_button">
-            <property name="visible">False</property>
-            <property name="halign">center</property>
-            <property name="valign">center</property>
-            <!-- Translators: when configuring a new game, if the user has a started game, tooltip text of 
the Go back button -->
-            <property name="tooltip-text" translatable="yes">Go back to the current game</property>
-            <property name="use-underline">True</property>
-            <property name="action-name">win.back</property>
-            <style><class name="image-button"/></style>
-            <child>
-              <object class="GtkImage">
-                <property name="icon-name">go-previous-symbolic</property>
-                <property name="visible">True</property>
-                <property name="icon-size">1</property>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="pack_type">start</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="new_game_button">
-            <property name="visible">True</property>
-            <property name="halign">center</property>
-            <property name="valign">center</property>
-            <!-- Translators: during a game, label of the Start Over button (with a mnemonic that appears 
pressing Alt) -->
-            <property name="label" translatable="yes">_Start Over</property>
-            <property name="use-underline">True</property>
-            <property name="action-name">win.new-game</property>
-            <!-- Translators: during a game, tooltip text of the Start Over button -->
-            <property name="tooltip-text" translatable="yes">Start a new game</property>
-          </object>
-          <packing>
-            <property name="pack-type">end</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkMenuButton" id="info_button">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="receives_default">False</property>
-            <property name="menu_model">window-menu</property>
-            <child>
-              <object class="GtkImage">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="icon_name">open-menu-symbolic</property>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="pack_type">end</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
       </object>
     </child>
     <child>
@@ -88,51 +23,8 @@
             <property name="height-request">350</property>
             <property name="spacing">6</property>
           </object>
-          <packing>
-            <property name="name">start-box</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkAspectFrame">
-            <property name="visible">True</property>
-            <property name="shadow-type">GTK_SHADOW_NONE</property>
-            <property name="obey-child">false</property>
-            <property name="ratio">1.4</property>
-            <property name="margin">25</property>
-            <child>
-              <object class="GtkBox" id="game_box">
-                <property name="visible">True</property>
-                <property name="orientation">horizontal</property>
-                <property name="spacing">25</property>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="name">frame</property>
-          </packing>
         </child>
       </object>
     </child>
   </template>
-  <menu id="window-menu">
-    <section>
-      <item>
-        <!-- Translators: hamburger menu entry; sound togglebutton (with a mnemonic that appears pressing 
Alt) -->
-        <attribute name="label" translatable="yes">_Sound</attribute>
-        <attribute name="action">app.sound</attribute>
-      </item>
-    </section>
-    <section>
-      <item>
-        <!-- Translators: hamburger menu entry; open help (with a mnemonic that appears pressing Alt) -->
-        <attribute name="label" translatable="yes">_Help</attribute>
-        <attribute name="action">app.help</attribute>
-      </item>
-      <item>
-        <!-- Translators: hamburger menu entry; open about dialog (with a mnemonic that appears pressing 
Alt) -->
-        <attribute name="label" translatable="yes">_About Taquin</attribute>
-        <attribute name="action">app.about</attribute>
-      </item>
-    </section>
-  </menu>
 </interface>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f8bc6df..a7fc35f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,8 +3,10 @@
 data/org.gnome.Taquin.appdata.xml.in
 data/org.gnome.Taquin.desktop.in
 data/org.gnome.Taquin.gschema.xml
+data/game-headerbar.ui
 data/taquin-screens.ui
 data/taquin.ui
+src/game-headerbar.vala
 src/game-window.vala
 src/taquin-main.vala
 src/taquin-game.vala
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 3dde2ec..297b08b 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,4 +1,5 @@
+src/game-headerbar.c
+src/game-window.c
 src/taquin-main.c
 src/taquin-game.c
 src/taquin-view.c
-src/game-window.c
diff --git a/src/game-headerbar.vala b/src/game-headerbar.vala
new file mode 100644
index 0000000..2f1fbc8
--- /dev/null
+++ b/src/game-headerbar.vala
@@ -0,0 +1,138 @@
+/* -*- Mode: vala; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * Copyright (C) 2019 – Arnaud Bonatti <arnaud bonatti gmail com>
+ *
+ * This file is part of a GNOME game.
+ *
+ * This application is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This application is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this application. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+using Gtk;
+
+[GtkTemplate (ui = "/org/gnome/Taquin/ui/game-headerbar.ui")]
+private class GameHeaderBar : HeaderBar
+{
+    [GtkChild] private Box          controls_box;
+    [GtkChild] private Button       new_game_button;
+    [GtkChild] private Button       back_button;
+    [GtkChild] private MenuButton   info_button;
+
+    internal void add_controls (GameWindowFlags flags)
+    {
+        if (GameWindowFlags.SHOW_UNDO in flags)
+        {
+            Box history_box = new Box (Orientation.HORIZONTAL, 0);
+            history_box.get_style_context ().add_class ("linked");
+
+            Button undo_button = new Button.from_icon_name ("edit-undo-symbolic", Gtk.IconSize.BUTTON);
+            undo_button.action_name = "win.undo";
+            /* Translators: during a game, tooltip text of the Undo button */
+            undo_button.set_tooltip_text (_("Undo your most recent move"));
+            undo_button.valign = Align.CENTER;
+            undo_button.show ();
+            history_box.pack_start (undo_button, true, true, 0);
+
+            /* if (GameWindowFlags.SHOW_REDO in flags)
+            {
+                Button redo_button = new Button.from_icon_name ("edit-redo-symbolic", Gtk.IconSize.BUTTON);
+                redo_button.action_name = "app.redo";
+                / Translators: during a game, tooltip text of the Redo button /
+                redo_button.set_tooltip_text (_("Redo your most recent undone move"));
+                redo_button.valign = Align.CENTER;
+                redo_button.show ();
+                history_box.pack_start (redo_button, true, true, 0);
+            } */
+
+            history_box.show ();
+            controls_box.pack_start (history_box, true, true, 0);
+        }
+        /* if (GameWindowFlags.SHOW_HINT in flags)
+        {
+            Button hint_button = new Button.from_icon_name ("dialog-question-symbolic", Gtk.IconSize.BUTTON);
+            hint_button.action_name = "app.hint";
+            / Translators: during a game, tooltip text of the Hint button /
+            hint_button.set_tooltip_text (_("Receive a hint for your next move"));
+            hint_button.valign = Align.CENTER;
+            hint_button.show ();
+            controls_box.pack_start (hint_button, true, true, 0);
+        } */
+    }
+
+    /*\
+    * * Showing the Stack
+    \*/
+
+    internal /* grabs focus */ bool show_new_game_screen (bool game_finished)
+    {
+        set_subtitle (null);      // TODO save / restore?
+
+        controls_box.hide ();
+
+        if (!game_finished && back_button.visible)
+        {
+            back_button.grab_focus ();
+            return true;
+        }
+        else
+            return false;
+    }
+
+    internal /* grabs focus */ bool show_view (bool game_finished)
+    {
+        back_button.hide ();        // TODO transition?
+        new_game_button.show ();    // TODO transition?
+        controls_box.show ();
+
+        if (game_finished)
+        {
+            new_game_button.grab_focus ();
+            return true;
+        }
+        else
+            return false;
+    }
+
+    /*\
+    * * Switching the Stack
+    \*/
+
+    internal void new_game ()
+    {
+        back_button.show ();
+        new_game_button.hide ();        // TODO transition?
+    }
+
+    /*\
+    * * Some public calls
+    \*/
+
+    internal void new_game_button_grab_focus ()
+    {
+        new_game_button.grab_focus ();
+    }
+
+    internal bool new_game_button_is_focus ()
+    {
+        return new_game_button.is_focus;
+    }
+
+    /*\
+    * * hamburger menu
+    \*/
+
+    internal void toggle_hamburger (/* SimpleAction action, Variant? variant */)
+    {
+        info_button.active = !info_button.active;
+    }
+}
diff --git a/src/game-window.vala b/src/game-window.vala
index ba0590f..da53be3 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -40,53 +40,14 @@ public class GameWindow : ApplicationWindow
     private bool game_finished = false;
 
     /* private widgets */
-    [GtkChild]
-    private HeaderBar headerbar;
-    [GtkChild]
-    private Stack stack;
+    [GtkChild] private GameHeaderBar    headerbar;
+    [GtkChild] private Stack            stack;
 
     private Button? start_game_button = null;
-    [GtkChild]
-    private Button new_game_button;
-    [GtkChild]
-    private Button back_button;
-
-    [GtkChild]
-    private Box controls_box;
-    [GtkChild]
-    private Box game_box;
-    [GtkChild]
-    private Box new_game_box;
 
-    private Widget view;
-
-    /* signals */
-    public signal void play ();
-    public signal void wait ();
-    public signal void back ();
-
-    public signal void undo ();
-    public signal void redo ();
-    public signal void hint ();
+    [GtkChild] private Box new_game_box;
 
-    /* actions */
-    private const GLib.ActionEntry win_actions[] =
-    {
-        { "new-game", new_game_cb },
-        { "start-game", start_game_cb },
-        { "back", back_cb },
-
-        { "undo", undo_cb },
-        { "redo", redo_cb },
-        { "hint", hint_cb },
-
-        { "toggle-hamburger", toggle_hamburger }
-    };
-
-    private SimpleAction back_action;
-
-    public SimpleAction undo_action;
-    public SimpleAction redo_action;
+    private Widget view;
 
     public GameWindow (string? css_resource, string name, int width, int height, bool maximized, bool 
start_now, GameWindowFlags flags, Box new_game_screen, Widget _view)
     {
@@ -100,15 +61,7 @@ public class GameWindow : ApplicationWindow
         view = _view;
 
         /* window actions */
-        add_action_entries (win_actions, this);
-
-        back_action = (SimpleAction) lookup_action ("back");
-        undo_action = (SimpleAction) lookup_action ("undo");
-        redo_action = (SimpleAction) lookup_action ("redo");
-
-        back_action.set_enabled (false);
-        undo_action.set_enabled (false);
-        redo_action.set_enabled (false);
+        install_win_action_entries ();
 
         /* window config */
         set_title (name);
@@ -123,6 +76,7 @@ public class GameWindow : ApplicationWindow
 
         /* add widgets */
         new_game_box.pack_start (new_game_screen, true, true, 0);
+
         if (GameWindowFlags.SHOW_START_BUTTON in flags)
         {
             /* Translators: when configuring a new game, label of the blue Start button (with a mnemonic 
that appears pressing Alt) */
@@ -138,50 +92,12 @@ public class GameWindow : ApplicationWindow
             new_game_box.pack_end (start_game_button, false, false, 0);
         }
 
-        game_box.pack_start (view, true, true, 0);
-        game_box.set_focus_child (view);            // TODO test if necessary; note: view could grab focus 
from application
-        view.halign = Align.FILL;
+        stack.add (view);
+        view.margin = 25;
         view.can_focus = true;
         view.show ();
 
-        /* add controls */
-        if (GameWindowFlags.SHOW_UNDO in flags)
-        {
-            Box history_box = new Box (Orientation.HORIZONTAL, 0);
-            history_box.get_style_context ().add_class ("linked");
-
-            Button undo_button = new Button.from_icon_name ("edit-undo-symbolic", Gtk.IconSize.BUTTON);
-            undo_button.action_name = "win.undo";
-            /* Translators: during a game, tooltip text of the Undo button */
-            undo_button.set_tooltip_text (_("Undo your most recent move"));
-            undo_button.valign = Align.CENTER;
-            undo_button.show ();
-            history_box.pack_start (undo_button, true, true, 0);
-
-            /* if (GameWindowFlags.SHOW_REDO in flags)
-            {
-                Button redo_button = new Button.from_icon_name ("edit-redo-symbolic", Gtk.IconSize.BUTTON);
-                redo_button.action_name = "app.redo";
-                / Translators: during a game, tooltip text of the Redo button /
-                redo_button.set_tooltip_text (_("Redo your most recent undone move"));
-                redo_button.valign = Align.CENTER;
-                redo_button.show ();
-                history_box.pack_start (redo_button, true, true, 0);
-            } */
-
-            history_box.show ();
-            controls_box.pack_start (history_box, true, true, 0);
-        }
-        /* if (GameWindowFlags.SHOW_HINT in flags)
-        {
-            Button hint_button = new Button.from_icon_name ("dialog-question-symbolic", Gtk.IconSize.BUTTON);
-            hint_button.action_name = "app.hint";
-            / Translators: during a game, tooltip text of the Hint button /
-            hint_button.set_tooltip_text (_("Receive a hint for your next move"));
-            hint_button.valign = Align.CENTER;
-            hint_button.show ();
-            controls_box.pack_start (hint_button, true, true, 0);
-        } */
+        headerbar.add_controls (flags);
 
         /* start or not */
         if (start_now)
@@ -237,7 +153,7 @@ public class GameWindow : ApplicationWindow
     public void finish_game ()
     {
         game_finished = true;
-        new_game_button.grab_focus ();
+        headerbar.new_game_button_grab_focus ();
     }
 
     /* public void about ()
@@ -251,35 +167,64 @@ public class GameWindow : ApplicationWindow
 
     private void show_new_game_screen ()
     {
-        headerbar.set_subtitle (null);      // TODO save / restore?
-
-        stack.set_visible_child_name ("start-box");
-        controls_box.hide ();
-
-        if (!game_finished && back_button.visible)
-            back_button.grab_focus ();
-        else if (start_game_button != null)
+        bool grabs_focus = headerbar.show_new_game_screen (game_finished);
+        if (!grabs_focus && start_game_button != null)
             start_game_button.grab_focus ();
+        // TODO else if (!grabs_focus && start_game_button == null)
+        stack.set_visible_child (new_game_box);
     }
 
     private void show_view ()
     {
-        stack.set_visible_child_name ("frame");
-        back_button.hide ();        // TODO transition?
-        new_game_button.show ();        // TODO transition?
-        controls_box.show ();
-
-        if (game_finished)
-            new_game_button.grab_focus ();
-        else
+        stack.set_visible_child (view);
+        bool grabs_focus = headerbar.show_view (game_finished);
+        if (!grabs_focus)
             view.grab_focus ();
     }
 
     /*\
-    * * Switching the Stack
+    * * actions
     \*/
 
-    private void new_game_cb ()
+    public signal void play ();
+    public signal void wait ();
+    public signal void back ();
+
+    public signal void undo ();
+    public signal void redo ();
+    public signal void hint ();
+
+    private SimpleAction back_action;
+    public  SimpleAction undo_action;
+    public  SimpleAction redo_action;
+
+    private void install_win_action_entries ()
+    {
+        add_action_entries (win_actions, this);
+
+        back_action = (SimpleAction) lookup_action ("back");
+        undo_action = (SimpleAction) lookup_action ("undo");
+        redo_action = (SimpleAction) lookup_action ("redo");
+
+        back_action.set_enabled (false);
+        undo_action.set_enabled (false);
+        redo_action.set_enabled (false);
+    }
+
+    private const GLib.ActionEntry win_actions[] =
+    {
+        { "new-game", new_game_cb },
+        { "start-game", start_game_cb },
+        { "back", back_cb },
+
+        { "undo", undo_cb },
+        { "redo", redo_cb },
+        { "hint", hint_cb },
+
+        { "toggle-hamburger", toggle_hamburger }
+    };
+
+    private void new_game_cb (/* SimpleAction action, Variant? variant */)
     {
         if (stack.get_visible_child_name () != "frame")
             return;
@@ -289,14 +234,12 @@ public class GameWindow : ApplicationWindow
         stack.set_transition_type (StackTransitionType.SLIDE_LEFT);
         stack.set_transition_duration (800);
 
-        back_button.show ();
-        new_game_button.hide ();        // TODO transition?
+        headerbar.new_game ();
         back_action.set_enabled (true);
-
         show_new_game_screen ();
     }
 
-    private void start_game_cb ()
+    private void start_game_cb (/* SimpleAction action, Variant? variant */)
     {
         if (stack.get_visible_child_name () != "start-box")
             return;
@@ -313,10 +256,11 @@ public class GameWindow : ApplicationWindow
         show_view ();
     }
 
-    private void back_cb ()
+    private void back_cb (/* SimpleAction action, Variant? variant */)
     {
         if (stack.get_visible_child_name () != "start-box")
             return;
+
         // TODO change back headerbar subtitle?
         stack.set_transition_type (StackTransitionType.SLIDE_RIGHT);
         stack.set_transition_duration (800);
@@ -325,49 +269,42 @@ public class GameWindow : ApplicationWindow
         back ();
     }
 
-    /*\
-    * * Controls_box actions
-    \*/
-
-    private void undo_cb ()
+    private void undo_cb (/* SimpleAction action, Variant? variant */)
     {
         if (stack.get_visible_child_name () != "frame")
             return;
 
         game_finished = false;
 
-        if (new_game_button.is_focus)
+        if (headerbar.new_game_button_is_focus ())
             view.grab_focus();
         redo_action.set_enabled (true);
+
         undo ();
     }
 
-    private void redo_cb ()
+    private void redo_cb (/* SimpleAction action, Variant? variant */)
     {
         if (stack.get_visible_child_name () != "frame")
             return;
 
-        if (new_game_button.is_focus)
+        if (headerbar.new_game_button_is_focus ())
             view.grab_focus();
         undo_action.set_enabled (true);
+
         redo ();
     }
 
-    private void hint_cb ()
+    private void hint_cb (/* SimpleAction action, Variant? variant */)
     {
         if (stack.get_visible_child_name () != "frame")
             return;
+
         hint ();
     }
 
-    /*\
-    * * hamburger menu
-    \*/
-
-    [GtkChild] private MenuButton info_button;
-
     private void toggle_hamburger (/* SimpleAction action, Variant? variant */)
     {
-        info_button.active = !info_button.active;
+        headerbar.toggle_hamburger ();
     }
 }
diff --git a/src/meson.build b/src/meson.build
index 5926e69..251daf7 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -2,6 +2,7 @@ resources = gnome.compile_resources (meson.project_name(), 'taquin.gresource.xml
 
 executable(meson.project_name(),[
         'config.vapi',
+        'game-headerbar.vala',
         'game-window.vala',
         'taquin-game.vala',
         'taquin-main.vala',
diff --git a/src/taquin.gresource.xml b/src/taquin.gresource.xml
index 704da09..431ef28 100644
--- a/src/taquin.gresource.xml
+++ b/src/taquin.gresource.xml
@@ -5,6 +5,7 @@
     <file preprocess="to-pixdata" alias="16-Puzzle.png">../data/schema-16.png</file>
   </gresource>
   <gresource prefix="/org/gnome/Taquin/ui">
+    <file preprocess="xml-stripblanks" alias="game-headerbar.ui">../data/game-headerbar.ui</file>
     <file preprocess="xml-stripblanks" alias="game-window.ui">../data/taquin.ui</file>
     <file preprocess="xml-stripblanks" alias="taquin-screens.ui">../data/taquin-screens.ui</file>
     <file alias="taquin.css">../data/taquin.css</file>


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