[quadrapassel] Start a new game when pause button pressed outside of a game
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [quadrapassel] Start a new game when pause button pressed outside of a game
- Date: Wed, 5 Dec 2018 23:12:08 +0000 (UTC)
commit 79fe179dcd0fec9ba0fe0c5c497c5d979025ea5f
Author: Chris Lamb <chris chris-lamb co uk>
Date: Sun Sep 10 21:41:18 2017 +0100
Start a new game when pause button pressed outside of a game
This means you don't have to use a mouse to start a new game.
Closes: https://gitlab.gnome.org/GNOME/quadrapassel/issues/16
src/quadrapassel.vala | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/quadrapassel.vala b/src/quadrapassel.vala
index 8938d87..a0f9662 100644
--- a/src/quadrapassel.vala
+++ b/src/quadrapassel.vala
@@ -649,8 +649,16 @@ public class Quadrapassel : Gtk.Application
{
var keyval = upper_key (event.keyval);
- if (game == null)
+ if (game == null) {
+ // Pressing pause with no game will start a new game.
+ if (keyval == upper_key (settings.get_int ("key-pause")))
+ {
+ new_game ();
+ return true;
+ }
+
return false;
+ }
if (keyval == upper_key (settings.get_int ("key-pause")))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]