[gnome-nibbles] Only check keyboard shortcuts for actual players
- From: Bryan Quigley <bryanquigs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles] Only check keyboard shortcuts for actual players
- Date: Sun, 16 Feb 2014 05:46:44 +0000 (UTC)
commit 3d4d9087ce20b68e1a432e4a4c70a3e1b4f1bfed
Author: Bryan Quigley <bryanquigs src gnome org>
Date: Sun Feb 16 00:02:01 2014 -0500
Only check keyboard shortcuts for actual players
src/games-controls.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/games-controls.c b/src/games-controls.c
index df643fb..6d6209f 100644
--- a/src/games-controls.c
+++ b/src/games-controls.c
@@ -29,6 +29,7 @@
#include "games-controls.h"
extern GSettings *worm_settings[NUMWORMS];
+extern GSettings *settings;
extern GtkWidget *window;
enum {
@@ -90,7 +91,7 @@ accel_edited_cb (GtkCellRendererAccel *cell,
}
/* Duplicate key check */
- for (i = 0; i < NUMWORMS; i++) {
+ for (i = 0; i < g_settings_get_int(settings, "players"); i++) {
if (g_settings_get_int (worm_settings[i], "key-up") == keyval ||
g_settings_get_int (worm_settings[i], "key-down") == keyval ||
g_settings_get_int (worm_settings[i], "key-left") == keyval ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]