Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-05-08 05:01:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-05-08 05:36:35 +0300
commiteefa82a0228916585522b7dcb2382d07da659125 (patch)
tree20eba4e13baac3c9f6cfe49788a5ca95303b65cf /source/blender/editors/interface/interface_template_search_operator.c
parentc6cda3c09cd09a283502d953f45631b9a4ca1d88 (diff)
Cleanup: callback naming for search button & update doc-strings
Callback naming didn't always make it clear which function updated the search contents and the function used to execute the action.
Diffstat (limited to 'source/blender/editors/interface/interface_template_search_operator.c')
-rw-r--r--source/blender/editors/interface/interface_template_search_operator.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_template_search_operator.c b/source/blender/editors/interface/interface_template_search_operator.c
index 975ee5fe43d..cdf87103587 100644
--- a/source/blender/editors/interface/interface_template_search_operator.c
+++ b/source/blender/editors/interface/interface_template_search_operator.c
@@ -50,7 +50,7 @@
/** \name Operator Search Template Implementation
* \{ */
-static void operator_call_cb(bContext *C, void *UNUSED(arg1), void *arg2)
+static void operator_search_exec_fn(bContext *C, void *UNUSED(arg1), void *arg2)
{
wmOperatorType *ot = arg2;
@@ -59,10 +59,10 @@ static void operator_call_cb(bContext *C, void *UNUSED(arg1), void *arg2)
}
}
-static void operator_search_cb(const bContext *C,
- void *UNUSED(arg),
- const char *str,
- uiSearchItems *items)
+static void operator_search_update_fn(const bContext *C,
+ void *UNUSED(arg),
+ const char *str,
+ uiSearchItems *items)
{
GHashIterator iter;
const size_t str_len = strlen(str);
@@ -125,8 +125,13 @@ static void operator_search_cb(const bContext *C,
void UI_but_func_operator_search(uiBut *but)
{
- UI_but_func_search_set(
- but, ui_searchbox_create_operator, operator_search_cb, NULL, false, operator_call_cb, NULL);
+ UI_but_func_search_set(but,
+ ui_searchbox_create_operator,
+ operator_search_update_fn,
+ NULL,
+ false,
+ operator_search_exec_fn,
+ NULL);
}
void uiTemplateOperatorSearch(uiLayout *layout)