[gnome-taquin] Better shutdown.



commit b2b5588206dace6daffdd1bbace1a624af497eb1
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Mar 3 09:28:11 2015 +0100

    Better shutdown.

 src/game-window.vala |    3 ++-
 src/taquin-main.vala |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/game-window.vala b/src/game-window.vala
index c75ffce..4770790 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -185,11 +185,12 @@ public class GameWindow : ApplicationWindow
         return false;
     }
 
-    public void save_state (GLib.Settings settings)
+    public void shutdown (GLib.Settings settings)
     {
         settings.set_int ("window-width", window_width);
         settings.set_int ("window-height", window_height);
         settings.set_boolean ("window-is-maximized", maximized_state);
+        destroy ();
     }
 
     /*\
diff --git a/src/taquin-main.vala b/src/taquin-main.vala
index 27dd8b6..23726d7 100644
--- a/src/taquin-main.vala
+++ b/src/taquin-main.vala
@@ -81,7 +81,7 @@ public class Taquin : Gtk.Application
         return new Taquin ().run (args);
     }
 
-    public Taquin ()
+    private Taquin ()
     {
         Object (application_id: "org.gnome.taquin", flags: ApplicationFlags.FLAGS_NONE);
 
@@ -198,8 +198,8 @@ public class Taquin : Gtk.Application
 
     protected override void shutdown ()
     {
+        window.shutdown (settings);
         base.shutdown ();
-        window.save_state (settings);
     }
 
     /*\


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