mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* dialog.c: Eliminate callback macro.
This commit is contained in:
parent
bf4c26959c
commit
73241613c2
@ -1,5 +1,7 @@
|
||||
2003-11-26 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* dialog.c: Eliminate callback macro.
|
||||
|
||||
* dialog.c (dlg_replace_widget): Use dlg_select_widget().
|
||||
(select_a_widget): Rename to select_other_widget(), factorize
|
||||
most code from dlg_one_up() and dlg_one_down().
|
||||
|
@ -468,8 +468,6 @@ int dlg_select_widget (Dlg_head *h, void *w)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define callback(h) (h->current->callback)
|
||||
|
||||
void update_cursor (Dlg_head *h)
|
||||
{
|
||||
if (!h->current)
|
||||
@ -583,7 +581,7 @@ dlg_try_hotkey (Dlg_head *h, int d_key)
|
||||
|
||||
handled = 0;
|
||||
if (h->current->options & W_WANT_HOTKEY)
|
||||
handled = callback (h) (h->current, WIDGET_HOTKEY, d_key);
|
||||
handled = h->current->callback (h->current, WIDGET_HOTKEY, d_key);
|
||||
|
||||
/* If not used, send hotkey to other widgets */
|
||||
if (handled)
|
||||
@ -647,7 +645,7 @@ dlg_key_event (Dlg_head *h, int d_key)
|
||||
|
||||
/* not used - then try widget_callback */
|
||||
if (!handled)
|
||||
handled = callback (h) (h->current, WIDGET_KEY, d_key);
|
||||
handled = h->current->callback (h->current, WIDGET_KEY, d_key);
|
||||
|
||||
/* not used- try to use the unhandled case */
|
||||
if (!handled)
|
||||
|
Loading…
Reference in New Issue
Block a user