mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-08 20:41:59 +03:00
Ticket #3721: clean up radio widget's MSG_CURSOR.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
e9e69f5c32
commit
607eb74cbb
@ -84,7 +84,7 @@ radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
|
|||||||
{
|
{
|
||||||
case ' ':
|
case ' ':
|
||||||
r->sel = r->pos;
|
r->sel = r->pos;
|
||||||
widget_set_state (w, WST_FOCUSED, TRUE);
|
widget_set_state (w, WST_FOCUSED, TRUE); /* Also draws the widget. */
|
||||||
return MSG_HANDLED;
|
return MSG_HANDLED;
|
||||||
|
|
||||||
case KEY_UP:
|
case KEY_UP:
|
||||||
@ -92,6 +92,7 @@ radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
|
|||||||
if (r->pos > 0)
|
if (r->pos > 0)
|
||||||
{
|
{
|
||||||
r->pos--;
|
r->pos--;
|
||||||
|
widget_redraw (w);
|
||||||
return MSG_HANDLED;
|
return MSG_HANDLED;
|
||||||
}
|
}
|
||||||
return MSG_NOT_HANDLED;
|
return MSG_NOT_HANDLED;
|
||||||
@ -101,6 +102,7 @@ radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
|
|||||||
if (r->count - 1 > r->pos)
|
if (r->count - 1 > r->pos)
|
||||||
{
|
{
|
||||||
r->pos++;
|
r->pos++;
|
||||||
|
widget_redraw (w);
|
||||||
return MSG_HANDLED;
|
return MSG_HANDLED;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -108,7 +110,6 @@ radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
|
|||||||
}
|
}
|
||||||
|
|
||||||
case MSG_CURSOR:
|
case MSG_CURSOR:
|
||||||
widget_set_state (w, WST_FOCUSED, TRUE);
|
|
||||||
widget_move (r, r->pos, 1);
|
widget_move (r, r->pos, 1);
|
||||||
return MSG_HANDLED;
|
return MSG_HANDLED;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user