mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
input_complete.c: (query_callback): use widget_lookup_key().
(input_key_is_in_map): remove. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
d12caa65d0
commit
178f88bdd9
@ -1165,23 +1165,6 @@ input_handle_char (WInput * in, int key)
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
/* This function is a test for a special input key used in complete.c */
|
||||
/* Returns 0 if it is not a special key, 1 if it is a non-complete key
|
||||
and 2 if it is a complete key */
|
||||
int
|
||||
input_key_is_in_map (WInput * in, int key)
|
||||
{
|
||||
long command;
|
||||
|
||||
command = widget_lookup_key (WIDGET (in), key);
|
||||
if (command == CK_IgnoreKey)
|
||||
return 0;
|
||||
|
||||
return (command == CK_Complete) ? 2 : 1;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
input_assign_text (WInput * in, const char *text)
|
||||
{
|
||||
|
@ -90,7 +90,6 @@ WInput *input_new (int y, int x, const int *colors,
|
||||
cb_ret_t input_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data);
|
||||
void input_set_default_colors (void);
|
||||
cb_ret_t input_handle_char (WInput * in, int key);
|
||||
int input_key_is_in_map (WInput * in, int key);
|
||||
void input_assign_text (WInput * in, const char *text);
|
||||
gboolean input_is_empty (const WInput * in);
|
||||
void input_insert (WInput * in, const char *text, gboolean insert_extra_space);
|
||||
|
@ -1079,7 +1079,7 @@ query_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
|
||||
if (parm < 32 || parm > 255)
|
||||
{
|
||||
bl = 0;
|
||||
if (input_key_is_in_map (input, parm) != 2)
|
||||
if (widget_lookup_key (WIDGET (input), parm) != CK_Complete)
|
||||
return MSG_NOT_HANDLED;
|
||||
|
||||
if (end == min_end)
|
||||
|
Loading…
Reference in New Issue
Block a user