tKeypad numbers now work in 'Jet' dialog - vaccinewars - be a doctor and try to vaccinate the world
 (HTM) git clone git://src.adamsgaard.dk/vaccinewars
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 1ef350a163d338351723d2021d32cc4f2a6bd016
 (DIR) parent 77a97be1b15b3b2fdb5a30974df4f52db6561b98
 (HTM) Author: Ben Webb <ben@salilab.org>
       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(-)
       ---
 (DIR) diff --git a/src/gtk_client.c b/src/gtk_client.c
       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);
 (DIR) diff --git a/src/gtkport.h b/src/gtkport.h
       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);