Freeze break request for gnome-games.
- From: Callum McKenzie <callum spooky-possum org>
- To: release-team gnome org
- Subject: Freeze break request for gnome-games.
- Date: Tue, 07 Mar 2006 19:55:55 +1300
As described in bug #333696 it is impossible to use normal alphabetic
keys to control Robots. The attached patch fixes the code by removing a
piece of code which translated the key presses to upper case (a remnant
of a previous control system).
This problem has actually been around for a release cycle or two now,
but the fix is simple (90% of it is removing now-dead code) and the bug
affects laptop users. Most importantly, the bug-reporter is a regular
contributor and I'd like to make him happy.
- Callum
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-games/gnobots2/ChangeLog,v
retrieving revision 1.112
diff -u -r1.112 ChangeLog
--- ChangeLog 18 Feb 2006 08:10:48 -0000 1.112
+++ ChangeLog 7 Mar 2006 06:44:40 -0000
@@ -1,3 +1,9 @@
+2006-03-07 Callum McKenzie <callum spooky-possum org>
+
+ * keyboard.h:
+ * keyboard.c: Don't upper-case key-presses. This allows alphabetic
+ keys to be used as controls. Fixes bug #333696.
+
2006-02-18 Callum McKenzie <callum spooky-possum org>
* gnobots.c: Use the new SVG file for the appicon, not the old PNG
Index: keyboard.c
===================================================================
RCS file: /cvs/gnome/gnome-games/gnobots2/keyboard.c,v
retrieving revision 1.8
diff -u -r1.8 keyboard.c
--- keyboard.c 23 Jun 2003 10:37:21 -0000 1.8
+++ keyboard.c 7 Mar 2006 06:44:40 -0000
@@ -58,25 +58,6 @@
return name;
}
-
-/**
- * keyboard_preferred
- * @ksym: KeySym
- *
- * Description:
- * Returns the preferred alternative keysym. e.g. converts
- * all lovercase letters to uppercase
- *
- * Returns:
- * preferred keysym
- **/
-gint
-keyboard_preferred (gint ksym)
-{
- return gdk_keyval_to_upper (ksym);
-}
-
-
/**
* keyboard_set
* @keys: array of keysyms
@@ -113,7 +94,7 @@
gint
keyboard_cb (GtkWidget *widget, GdkEventKey *event, gpointer data)
{
- gint i, kv;
+ gint i;
/* This is a bit of a kludge to let through accelerator keys, otherwise
* if N is used as a key, then Ctrl-N is never picked up. The cleaner
@@ -122,10 +103,8 @@
if (event->state &= (GDK_CONTROL_MASK | GDK_MOD1_MASK))
return FALSE;
- kv = keyboard_preferred (event->keyval);
-
for (i = 0; i < 12; ++i) {
- if (kv == control_keys[i]) {
+ if (event->keyval == control_keys[i]) {
game_keypress (i);
return TRUE;
}
Index: keyboard.h
===================================================================
RCS file: /cvs/gnome/gnome-games/gnobots2/keyboard.h,v
retrieving revision 1.4
diff -u -r1.4 keyboard.h
--- keyboard.h 18 Jun 2003 17:35:41 -0000 1.4
+++ keyboard.h 7 Mar 2006 06:44:40 -0000
@@ -6,7 +6,6 @@
/* Exported functions */
/**********************************************************************/
gchar* keyboard_string (gint);
-gint keyboard_preferred (gint);
void keyboard_set (gint*);
gint keyboard_cb (GtkWidget*, GdkEventKey*, gpointer);
/**********************************************************************/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]