if-else chain -> switch-case
This commit is contained in:
parent
5cbfb8113d
commit
a4de8fdbc1
|
@ -604,13 +604,14 @@ gboolean entry_key_press_cb(GtkEntry *entry, GdkEventKey *event, keybind_info *i
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event->keyval == GDK_KEY_Tab) {
|
switch (event->keyval) {
|
||||||
|
case GDK_KEY_Tab:
|
||||||
synthesize_keypress(GTK_WIDGET(entry), GDK_KEY_Down);
|
synthesize_keypress(GTK_WIDGET(entry), GDK_KEY_Down);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else if (event->keyval == GDK_KEY_ISO_Left_Tab) {
|
case GDK_KEY_ISO_Left_Tab:
|
||||||
synthesize_keypress(GTK_WIDGET(entry), GDK_KEY_Up);
|
synthesize_keypress(GTK_WIDGET(entry), GDK_KEY_Up);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else if (event->keyval == GDK_KEY_Down) {
|
case GDK_KEY_Down:
|
||||||
// this stops the down key from leaving the GtkEntry...
|
// this stops the down key from leaving the GtkEntry...
|
||||||
event->hardware_keycode = 0;
|
event->hardware_keycode = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue