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-07 16:16:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-05-07 16:32:14 +0300
commit74c01afe228322137b8c1a813452d185028d4c8f (patch)
treed24d494dff9147259c0e4cac23b337ff1d2b94d0 /source/blender/editors/interface/interface_templates.c
parent7181342e628568e2a427b5baa2eeedd0dba1c528 (diff)
Cleanup: split button search callbacks into their own struct
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r--source/blender/editors/interface/interface_templates.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 088179520d7..6b8154816d5 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -203,7 +203,7 @@ static void template_add_button_search_menu(const bContext *C,
static uiBlock *template_common_search_menu(const bContext *C,
ARegion *region,
- uiButSearchFunc search_func,
+ uiButSearchUpdateFn search_update_fn,
void *search_arg,
uiButHandleFunc handle_func,
void *active_item,
@@ -279,7 +279,7 @@ static uiBlock *template_common_search_menu(const bContext *C,
}
UI_but_func_search_set(but,
ui_searchbox_create_generic,
- search_func,
+ search_update_fn,
search_arg,
NULL,
handle_func,
@@ -451,7 +451,8 @@ static uiBlock *id_search_menu(bContext *C, ARegion *region, void *arg_litem)
{
static TemplateID template_ui;
PointerRNA active_item_ptr;
- void (*id_search_cb_p)(const bContext *, void *, const char *, uiSearchItems *) = id_search_cb;
+ void (*id_search_update_fn)(
+ const bContext *, void *, const char *, uiSearchItems *) = id_search_cb;
/* arg_litem is malloced, can be freed by parent button */
template_ui = *((TemplateID *)arg_litem);
@@ -461,14 +462,14 @@ static uiBlock *id_search_menu(bContext *C, ARegion *region, void *arg_litem)
/* Currently only used for objects. */
if (template_ui.idcode == ID_OB) {
if (template_ui.filter == UI_TEMPLATE_ID_FILTER_AVAILABLE) {
- id_search_cb_p = id_search_cb_objects_from_scene;
+ id_search_update_fn = id_search_cb_objects_from_scene;
}
}
}
return template_common_search_menu(C,
region,
- id_search_cb_p,
+ id_search_update_fn,
&template_ui,
template_ID_set_property_cb,
active_item_ptr.data,
@@ -1552,7 +1553,7 @@ static uiBlock *template_search_menu(bContext *C, ARegion *region, void *arg_tem
return template_common_search_menu(C,
region,
- ui_rna_collection_search_cb,
+ ui_rna_collection_search_update_fn,
&template_search,
template_search_handle_cb,
active_ptr.data,