[gnome-2048/arnaudb/wip/gtk4] Uncomment something.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-2048/arnaudb/wip/gtk4] Uncomment something.
- Date: Thu, 16 Jul 2020 16:53:45 +0000 (UTC)
commit bc931bd594f7181216582f1e927114ff6190e4d3
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Wed Jul 15 17:23:30 2020 +0200
Uncomment something.
src/game-window.vala | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/game-window.vala b/src/game-window.vala
index 69ed039..eeb261f 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -45,6 +45,7 @@ private class GameWindow : ApplicationWindow
StyleContext.add_provider_for_display ((!) gdk_display, css_provider,
STYLE_PROVIDER_PRIORITY_APPLICATION);
_settings = new GLib.Settings ("org.gnome.TwentyFortyEight");
+ close_request.connect (_on_close_request);
_install_ui_action_entries ();
@@ -70,13 +71,13 @@ private class GameWindow : ApplicationWindow
_init_gestures ();
}
-// [GtkCallback]
-// private void on_destroy ()
-// {
-// _game.save_game ();
-// _save_window_state (this, ref _settings);
-// base.destroy ();
-// }
+ private inline bool _on_close_request ()
+ {
+ _game.save_game ();
+ _save_window_state (this, ref _settings);
+
+ return /* do not stop other handlers */ false;
+ }
/*\
* * init
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]