[gnome-chess/arnaudb/gesture-multi-press: 1/3] Delay setting settings.
- From: Arnaud B. <arnaudb src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-chess/arnaudb/gesture-multi-press: 1/3] Delay setting settings.
 
- Date: Mon,  6 Apr 2020 17:51:28 +0000 (UTC)
 
commit 4d12730eadba613d1aa51dc4ef2dd9cc97d73a4f
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Mon Apr 6 18:42:25 2020 +0200
    Delay setting settings.
 src/chess-view.vala  | 2 +-
 src/gnome-chess.vala | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/chess-view.vala b/src/chess-view.vala
index 85cbc0b..4314fb9 100644
--- a/src/chess-view.vala
+++ b/src/chess-view.vala
@@ -36,7 +36,7 @@ public class ChessView : Gtk.DrawingArea
         get { return square_size / 2; }
     }
 
-    public ChessView ()
+    construct
     {
         add_events (Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK);
     }
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index edc65e9..18ea284 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -261,9 +261,11 @@ Copyright © 2015–2016 Sahil Sareen""";
         base.shutdown ();
 
         /* Save window state */
+        settings.delay ();
         settings.set_int ("width", window_width);
         settings.set_int ("height", window_height);
         settings.set_boolean ("maximized", is_maximized);
+        settings.apply ();
     }
 
     private void set_layout_mode(LayoutMode new_layout_mode)
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]