[gnome-tetravex] Add an hidden keyboard shortcut.



commit df319f8a1f86dce64e60e0fa595f38d9017d7b46
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Fri Sep 20 19:17:10 2019 +0200

    Add an hidden keyboard shortcut.
    
    Improve #15 fix 096865c44e.

 src/gnome-tetravex.vala | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/gnome-tetravex.vala b/src/gnome-tetravex.vala
index 06ffa40..25e21b3 100644
--- a/src/gnome-tetravex.vala
+++ b/src/gnome-tetravex.vala
@@ -514,7 +514,13 @@ private class Tetravex : Gtk.Application
 
     private void move_up ()     { puzzle.move_up ();    }
     private void move_down ()   { puzzle.move_down ();  }
-    private void move_left ()   { puzzle.move_left ();  }
+    private void move_left ()
+    {
+        if (puzzle.is_solved_right)
+            finish_cb ();
+        else
+            puzzle.move_left ();
+    }
     private void move_right ()  { puzzle.move_right (); }
 
     private void pause_cb (SimpleAction action, Variant? parameter)


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