Rename default callbacks of widget and dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-09-28 11:05:23 +04:00
parent 0ccbe2c547
commit 0078874613
38 changed files with 60 additions and 60 deletions

View File

@ -173,7 +173,7 @@ button_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -209,7 +209,7 @@ buttonbar_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, voi
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -99,7 +99,7 @@ check_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -600,7 +600,7 @@ draw_box (const Dlg_head * h, int y, int x, int ys, int xs, gboolean single)
/** Clean the dialog area, draw the frame and the title */
void
common_dialog_repaint (Dlg_head * h)
dlg_default_repaint (Dlg_head * h)
{
Widget *wh = WIDGET (h);
@ -734,7 +734,7 @@ dlg_set_size (Dlg_head * h, int lines, int cols)
/** Default dialog callback */
cb_ret_t
default_dlg_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
dlg_default_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{
(void) sender;
(void) parm;
@ -745,7 +745,7 @@ default_dlg_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, vo
case DLG_DRAW:
if (h->color != NULL)
{
common_dialog_repaint (h);
dlg_default_repaint (h);
return MSG_HANDLED;
}
return MSG_NOT_HANDLED;
@ -790,7 +790,7 @@ create_dlg (gboolean modal, int y1, int x1, int lines, int cols,
if (colors != NULL)
memmove (new_d->color, colors, sizeof (dlg_colors_t));
new_d->help_ctx = help_ctx;
new_d->callback = (callback != NULL) ? callback : default_dlg_callback;
new_d->callback = (callback != NULL) ? callback : dlg_default_callback;
new_d->flags = flags;
new_d->data = NULL;

View File

@ -186,10 +186,10 @@ void dlg_redraw (Dlg_head * h);
void dlg_broadcast_msg (Dlg_head * h, widget_msg_t message);
/* Default callback for dialogs */
cb_ret_t default_dlg_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data);
cb_ret_t dlg_default_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data);
/* Default paint routine for dialogs */
void common_dialog_repaint (Dlg_head * h);
void dlg_default_repaint (Dlg_head * h);
void dlg_replace_widget (Widget * old, Widget * new);
int dlg_overlap (Widget * a, Widget * b);

View File

@ -118,7 +118,7 @@ gauge_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
return MSG_HANDLED;
}
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
/* --------------------------------------------------------------------------------------------- */

View File

@ -87,7 +87,7 @@ groupbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -125,7 +125,7 @@ history_dlg_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, vo
return history_dlg_reposition (h);
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -101,7 +101,7 @@ hline_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -1119,7 +1119,7 @@ input_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -1217,7 +1217,7 @@ query_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *da
break;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -121,7 +121,7 @@ label_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -432,7 +432,7 @@ listbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -597,7 +597,7 @@ menubar_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -138,7 +138,7 @@ radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -158,7 +158,7 @@ init_widget (Widget * w, int y, int x, int lines, int cols,
/* Default callback for widgets */
cb_ret_t
default_widget_callback (Widget * sender, widget_msg_t msg, int parm, void *data)
widget_default_callback (Widget * sender, widget_msg_t msg, int parm, void *data)
{
(void) sender;
(void) parm;

View File

@ -127,7 +127,7 @@ void hotkey_draw (struct Widget *w, const hotkey_t hotkey, gboolean focused);
void init_widget (Widget * w, int y, int x, int lines, int cols,
widget_cb_fn callback, mouse_h mouse_handler);
/* Default callback for widgets */
cb_ret_t default_widget_callback (Widget * sender, widget_msg_t msg, int parm, void *data);
cb_ret_t widget_default_callback (Widget * sender, widget_msg_t msg, int parm, void *data);
void widget_default_set_options_callback (Widget *w, widget_options_t options, gboolean enable);
void widget_set_options (Widget *w, widget_options_t options, gboolean enable);
void widget_set_size (Widget * widget, int y, int x, int lines, int cols);

View File

@ -63,7 +63,7 @@ static int sel_pos = 0;
/** default query callback, used to reposition query */
static cb_ret_t
default_query_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
query_default_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{
switch (msg)
{
@ -107,7 +107,7 @@ default_query_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm,
/* fallthrough */
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}
@ -126,7 +126,7 @@ do_create_message (int flags, const char *title, const char *text)
d = last_query_dlg;
/* do resize before initing and running */
default_query_callback (d, NULL, DLG_RESIZE, 0, NULL);
query_default_callback (d, NULL, DLG_RESIZE, 0, NULL);
init_dlg (d);
g_free (p);
@ -304,7 +304,7 @@ query_dialog (const char *header, const char *text, int flags, int count, ...)
/* prepare dialog */
query_dlg =
create_dlg (TRUE, 0, 0, lines, cols, query_colors, default_query_callback, NULL,
create_dlg (TRUE, 0, 0, lines, cols, query_colors, query_default_callback, NULL,
"[QueryBox]", header, dlg_flags);
if (count > 0)
@ -334,7 +334,7 @@ query_dialog (const char *header, const char *text, int flags, int count, ...)
va_end (ap);
/* do resize before running and selecting any widget */
default_query_callback (query_dlg, NULL, DLG_RESIZE, 0, NULL);
query_default_callback (query_dlg, NULL, DLG_RESIZE, 0, NULL);
if (defbutton != NULL)
dlg_select_widget (defbutton);

View File

@ -3345,7 +3345,7 @@ dview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}
@ -3402,7 +3402,7 @@ dview_dialog_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, v
return MSG_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -135,7 +135,7 @@ edit_save_mode_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm,
return MSG_NOT_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -77,7 +77,7 @@ editcmd_dialog_raw_key_query_cb (Dlg_head *h, Widget * sender, dlg_msg_t msg, in
dlg_stop (h);
return MSG_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -878,7 +878,7 @@ edit_dialog_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, vo
return MSG_HANDLED;
case DLG_DRAW:
/* don't use common_dialog_repaint() -- we don't need a frame */
/* don't use dlg_default_repaint() -- we don't need a frame */
tty_setcolor (EDITOR_BACKGROUND);
dlg_erase (h);
return MSG_HANDLED;
@ -956,7 +956,7 @@ edit_dialog_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, vo
return MSG_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}
@ -1027,7 +1027,7 @@ edit_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *da
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -303,7 +303,7 @@ chl_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data
}
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}
@ -422,7 +422,7 @@ do_enter_key (Dlg_head * h, int f_pos)
static void
chown_refresh (void)
{
common_dialog_repaint (ch_dlg);
dlg_default_repaint (ch_dlg);
tty_setcolor (COLOR_NORMAL);
@ -610,7 +610,7 @@ advanced_chown_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm,
return MSG_NOT_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -221,7 +221,7 @@ panel_listing_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm,
return MSG_NOT_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}
@ -291,7 +291,7 @@ tree_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *dat
return send_message (WIDGET (find_tree (h)), NULL, WIDGET_COMMAND, parm, NULL);
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}
@ -318,7 +318,7 @@ confvfs_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *
return MSG_NOT_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}
#endif /* ENABLE_VFS && ENABLE_VFS_FTP */

View File

@ -199,7 +199,7 @@ chmod_refresh (Dlg_head * h)
int y = WIDGET (file_gb)->y + 1;
int x = WIDGET (file_gb)->x + 2;
common_dialog_repaint (h);
dlg_default_repaint (h);
tty_setcolor (COLOR_NORMAL);
@ -275,7 +275,7 @@ chmod_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *da
return MSG_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -148,7 +148,7 @@ chown_refresh (Dlg_head * h)
const int y = 3;
const int x = 7 + GW * 2;
common_dialog_repaint (h);
dlg_default_repaint (h);
tty_setcolor (COLOR_NORMAL);
@ -187,7 +187,7 @@ chown_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *da
return MSG_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -467,7 +467,7 @@ find_parm_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void
return MSG_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}
@ -1493,7 +1493,7 @@ find_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *dat
return MSG_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -574,7 +574,7 @@ hotlist_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *
return MSG_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -316,7 +316,7 @@ info_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *da
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -315,7 +315,7 @@ layout_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *d
case DLG_DRAW:
/* When repainting the whole dialog (e.g. with C-l) we have to
update everything */
common_dialog_repaint (h);
dlg_default_repaint (h);
old_layout.horizontal_split = -1;
old_layout.left_panel_size = -1;
@ -422,7 +422,7 @@ layout_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *d
return MSG_NOT_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -1595,7 +1595,7 @@ midnight_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void
return MSG_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -82,7 +82,7 @@ configure_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void
return MSG_NOT_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -3490,7 +3490,7 @@ panel_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -121,7 +121,7 @@ panelize_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void
return MSG_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -1260,7 +1260,7 @@ tree_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *da
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -955,7 +955,7 @@ help_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *dat
return MSG_HANDLED;
case DLG_DRAW:
common_dialog_repaint (h);
dlg_default_repaint (h);
help_show (h, currentpoint);
return MSG_HANDLED;
@ -976,7 +976,7 @@ help_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *dat
return MSG_NOT_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}
@ -1031,7 +1031,7 @@ md_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}

View File

@ -240,7 +240,7 @@ learn_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *da
return learn_check_key (parm) ? MSG_HANDLED : MSG_NOT_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}

View File

@ -626,7 +626,7 @@ mcview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *
return MSG_HANDLED;
default:
return default_widget_callback (sender, msg, parm, data);
return widget_default_callback (sender, msg, parm, data);
}
}
@ -668,7 +668,7 @@ mcview_dialog_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm,
return MSG_HANDLED;
default:
return default_dlg_callback (h, sender, msg, parm, data);
return dlg_default_callback (h, sender, msg, parm, data);
}
}