| Date: Tue, 1 May 2001 02:20:31 +0000
Keypad numbers now work in 'Jet' dialog
Diffstat:
M src/gtk_client.c | 5 +++++
M src/gtkport.h | 11 +++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
--- |
| t@@ -1082,6 +1082,11 @@ void Jet() {
/* Display of locations in 'Jet' window (%tde="The Bronx" etc. by default) */
name=dpg_strdup_printf(_("_%c. %tde"),AccelChar,Location[i].Name);
SetAccelerator(button,name,button,"clicked",accel_group);
+/* Add keypad shortcuts as well */
+ if (i<9) {
+ gtk_widget_add_accelerator(button,"clicked",accel_group,GDK_KP_1+i,
+ 0,GTK_ACCEL_VISIBLE | GTK_ACCEL_SIGNAL_VISIBLE);
+ }
g_free(name);
}
gtk_widget_set_sensitive(button,i != ClientData.Play->IsAt); |
| t@@ -54,6 +54,17 @@ typedef enum {
GDK_INPUT_EXCEPTION = 1 << 2
} GdkInputCondition;
+#define GDK_KP_0 0xFFB0
+#define GDK_KP_1 0xFFB1
+#define GDK_KP_2 0xFFB2
+#define GDK_KP_3 0xFFB3
+#define GDK_KP_4 0xFFB4
+#define GDK_KP_5 0xFFB5
+#define GDK_KP_6 0xFFB6
+#define GDK_KP_7 0xFFB7
+#define GDK_KP_8 0xFFB8
+#define GDK_KP_9 0xFFB9
+
typedef gint (*GtkFunction)(gpointer data);
typedef void (*GdkInputFunction)(gpointer data,gint source,
GdkInputCondition condition); |