mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* dialog.c (dlg_key_event): Simplify logic, return void.
This commit is contained in:
parent
db8db1268c
commit
26328c7af6
@ -1,5 +1,7 @@
|
||||
2003-10-24 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* dialog.c (dlg_key_event): Simplify logic, return void.
|
||||
|
||||
* dialog.c: Remove duplication between two chains of dialogs.
|
||||
* dialog.h (struct Dlg_head): Add "fullscreen" field, remove
|
||||
"refresh_pushed", rename "previous_dialog" to "parent".
|
||||
|
21
src/dialog.c
21
src/dialog.c
@ -624,22 +624,24 @@ dlg_try_hotkey (Dlg_head *h, int d_key)
|
||||
return handled;
|
||||
}
|
||||
|
||||
static int
|
||||
static void
|
||||
dlg_key_event (Dlg_head *h, int d_key)
|
||||
{
|
||||
int handled;
|
||||
|
||||
if (!h->current)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
/* TAB used to cycle */
|
||||
if (!(h->flags & DLG_WANT_TAB)
|
||||
&& (d_key == '\t' || d_key == KEY_BTAB)) {
|
||||
if (d_key == '\t')
|
||||
if (!(h->flags & DLG_WANT_TAB)) {
|
||||
if (d_key == '\t') {
|
||||
dlg_one_down (h);
|
||||
else
|
||||
return;
|
||||
} else if (d_key == KEY_BTAB) {
|
||||
dlg_one_up (h);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* first can dlg_callback handle the key */
|
||||
handled = (*h->callback) (h, DLG_KEY, d_key);
|
||||
@ -661,11 +663,8 @@ dlg_key_event (Dlg_head *h, int d_key)
|
||||
|
||||
if (!handled)
|
||||
dialog_handle_key (h, d_key);
|
||||
(*h->callback) (h, DLG_POST_KEY, d_key);
|
||||
|
||||
return handled;
|
||||
}
|
||||
return 1;
|
||||
(*h->callback) (h, DLG_POST_KEY, d_key);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
Loading…
Reference in New Issue
Block a user