[gnome-tetravex] Add a multi-click security.



commit bc69d65fd633ad8a503cb8709710aa03d0b2429f
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed Oct 16 15:07:54 2019 +0200

    Add a multi-click security.

 src/gnome-tetravex.vala | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/gnome-tetravex.vala b/src/gnome-tetravex.vala
index 3cba4a8..edf8e2d 100644
--- a/src/gnome-tetravex.vala
+++ b/src/gnome-tetravex.vala
@@ -672,6 +672,9 @@ private class Tetravex : Gtk.Application
     private bool has_been_solved = false;
     private void solve_cb ()
     {
+        if (puzzle.elapsed < 0.2)   // security against multi-click on new-game button
+            return;
+
         if (puzzle.game_in_progress)
         {
             MessageDialog dialog = new MessageDialog (window,


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