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:
authorTon Roosendaal <ton@blender.org>2009-06-29 15:29:52 +0400
committerTon Roosendaal <ton@blender.org>2009-06-29 15:29:52 +0400
commit7ca31bb171b2c94f8e9b928990363a42af8716fb (patch)
tree371eee682709fb52f3c6b2722a006d35b5b8576e /source/blender/editors/interface/interface.c
parentc50bbe5ae726edfb265bd54cb7ce0e547e3f4b31 (diff)
2.5
Search Menu: added feature that on opening, it shows the current ID block, and selects it. Same can be used for other searches, just pass on pointer to active item for the search callback. Also fixed arrow triangle draw for search.
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index a9866d8898e..fcea74cc22b 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2919,15 +2919,15 @@ uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxle
}
/* arg is user value, searchfunc and handlefunc both get it as arg */
-void uiButSetSearchFunc(uiBut *but, uiButSearchFunc sfunc, void *arg, uiButHandleFunc bfunc)
+/* if active set, button opens with this item visible and selected */
+void uiButSetSearchFunc(uiBut *but, uiButSearchFunc sfunc, void *arg, uiButHandleFunc bfunc, void *active)
{
but->search_func= sfunc;
but->search_arg= arg;
- uiButSetFunc(but, bfunc, arg, NULL);
+ uiButSetFunc(but, bfunc, arg, active);
}
-
/* Program Init/Exit */
void UI_init(void)