From 619480c68b75a4120848a4b8ca46f670d5385cb0 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 10 Apr 2016 10:14:18 +0300 Subject: [PATCH] Ticket #3632: refactoring of widget flags. Initial commit: rename functions: * widget_default_set_options_callback -> widget_default_set_options * input_set_options_callback -> input_set_options Signed-off-by: Andrew Borodin --- lib/widget/input.c | 6 +++--- lib/widget/widget-common.c | 4 ++-- lib/widget/widget-common.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/widget/input.c b/lib/widget/input.c index 13b87721b..6f587efa3 100644 --- a/lib/widget/input.c +++ b/lib/widget/input.c @@ -977,11 +977,11 @@ input_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) * @param enable TRUE if specified options should be added, FALSE if options should be removed */ static void -input_set_options_callback (Widget * w, widget_options_t options, gboolean enable) +input_set_options (Widget * w, widget_options_t options, gboolean enable) { WInput *in = INPUT (w); - widget_default_set_options_callback (w, options, enable); + widget_default_set_options (w, options, enable); if (in->label != NULL) widget_set_options (WIDGET (in->label), options, enable); } @@ -1011,7 +1011,7 @@ input_new (int y, int x, const int *colors, int width, const char *def_text, w = WIDGET (in); widget_init (w, y, x, 1, width, input_callback, input_mouse_callback); w->options |= W_IS_INPUT; - w->set_options = input_set_options_callback; + w->set_options = input_set_options; in->color = colors; in->first = TRUE; diff --git a/lib/widget/widget-common.c b/lib/widget/widget-common.c index 112fb2023..41793de3f 100644 --- a/lib/widget/widget-common.c +++ b/lib/widget/widget-common.c @@ -147,7 +147,7 @@ widget_init (Widget * w, int y, int x, int lines, int cols, w->pos_flags = WPOS_KEEP_DEFAULT; w->callback = callback; w->mouse_callback = mouse_callback; - w->set_options = widget_default_set_options_callback; + w->set_options = widget_default_set_options; w->owner = NULL; w->mouse.forced_capture = FALSE; w->mouse.capture = FALSE; @@ -195,7 +195,7 @@ widget_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm * @param enable TRUE if specified options should be added, FALSE if options should be removed */ void -widget_default_set_options_callback (Widget * w, widget_options_t options, gboolean enable) +widget_default_set_options (Widget * w, widget_options_t options, gboolean enable) { if (enable) w->options |= options; diff --git a/lib/widget/widget-common.h b/lib/widget/widget-common.h index 9cb9d1371..f7700a827 100644 --- a/lib/widget/widget-common.h +++ b/lib/widget/widget-common.h @@ -153,7 +153,7 @@ void widget_init (Widget * w, int y, int x, int lines, int cols, /* Default callback for widgets */ cb_ret_t widget_default_callback (Widget * w, 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_default_set_options (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); /* select color for widget in dependance of state */