mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
(hotkey_draw): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
53314c58b5
commit
432af88b06
@ -206,18 +206,23 @@ hotkey_equal (const hotkey_t hotkey1, const hotkey_t hotkey2)
|
|||||||
void
|
void
|
||||||
hotkey_draw (Widget * w, const hotkey_t hotkey, gboolean focused)
|
hotkey_draw (Widget * w, const hotkey_t hotkey, gboolean focused)
|
||||||
{
|
{
|
||||||
widget_selectcolor (w, focused, FALSE);
|
if (hotkey.start[0] != '\0')
|
||||||
tty_print_string (hotkey.start);
|
{
|
||||||
|
widget_selectcolor (w, focused, FALSE);
|
||||||
|
tty_print_string (hotkey.start);
|
||||||
|
}
|
||||||
|
|
||||||
if (hotkey.hotkey != NULL)
|
if (hotkey.hotkey != NULL)
|
||||||
{
|
{
|
||||||
widget_selectcolor (w, focused, TRUE);
|
widget_selectcolor (w, focused, TRUE);
|
||||||
tty_print_string (hotkey.hotkey);
|
tty_print_string (hotkey.hotkey);
|
||||||
widget_selectcolor (w, focused, FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hotkey.end != NULL)
|
if (hotkey.end != NULL)
|
||||||
|
{
|
||||||
|
widget_selectcolor (w, focused, FALSE);
|
||||||
tty_print_string (hotkey.end);
|
tty_print_string (hotkey.end);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
Loading…
Reference in New Issue
Block a user