diff --git a/src/ChangeLog b/src/ChangeLog index ee87aa8f9..b5451e6eb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2003-11-26 Pavel Roskin + * 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(). diff --git a/src/dialog.c b/src/dialog.c index 6e6e7a3d6..03c977a43 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -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)