Ticket #1634: hotkeys.diff

File hotkeys.diff, 1.3 KB (added by theMIROn, 14 years ago)
  • src/widget.c

    diff --git a/src/widget.c b/src/widget.c
    index 16f4ec8..44aaa35 100644
    a b button_callback (Widget *w, widget_msg_t msg, int parm) 
    189189        } 
    190190 
    191191        if (b->text.hotkey != NULL) { 
    192             if (g_ascii_tolower ((gchar)b->text.hotkey[0]) == 
    193                 g_ascii_tolower ((gchar)parm)) { 
     192            if ((guchar)*(b->text.hotkey) == parm) { 
    194193                button_callback (w, WIDGET_KEY, ' '); 
    195194                return MSG_HANDLED; 
    196195            } 
    radio_callback (Widget *w, widget_msg_t msg, int parm) 
    370369    switch (msg) { 
    371370    case WIDGET_HOTKEY: 
    372371        { 
    373             int lp = g_ascii_tolower ((gchar)parm); 
    374  
    375372            for (i = 0; i < r->count; i++) { 
    376373                if (r->texts[i].hotkey != NULL) { 
    377                     int c = g_ascii_tolower ((gchar)r->texts[i].hotkey[0]); 
    378  
    379                     if (c != lp) 
     374                    if ((guchar)*(r->texts[i].hotkey) != parm) 
    380375                        continue; 
    381376                    r->pos = i; 
    382377 
    check_callback (Widget *w, widget_msg_t msg, int parm) 
    505500    switch (msg) { 
    506501    case WIDGET_HOTKEY: 
    507502        if (c->text.hotkey != NULL) { 
    508             if (g_ascii_tolower ((gchar)c->text.hotkey[0]) == 
    509                 g_ascii_tolower ((gchar)parm)) { 
    510  
     503            if ((guchar)*(c->text.hotkey) == parm) { 
    511504                check_callback (w, WIDGET_KEY, ' ');    /* make action */ 
    512505                return MSG_HANDLED; 
    513506            }