diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-11 13:28:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-11 13:28:07 +0400 |
commit | 2c2fa877be6a1e7f6f1abbb131d3706948368248 (patch) | |
tree | fed2eaf68bf43edf399de836aa8c44624d3c2517 /source/blender/editors | |
parent | 78f89c3bbf6c7faa3b364f75f7fd52d9f62762e6 (diff) | |
parent | 99caa9470e9dc420541dc49c29037f6bac55964e (diff) |
svn merge -r39286:39298 https://svn.blender.org/svnroot/bf-blender/trunk/blender, ensure some edits in trunk dont get merged back into pepper
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 11 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_toolbar.c | 11 |
3 files changed, 21 insertions, 11 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index c841e846c58..9aaba786050 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -40,6 +40,7 @@ #include "BLI_string.h" #include "BLI_utildefines.h" +#include "BLI_ghash.h" #include "BKE_animsys.h" #include "BKE_colortools.h" @@ -2326,10 +2327,11 @@ 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) { - wmOperatorType *ot = WM_operatortype_first(); - - for(; ot; ot= ot->next) { - + GHashIterator *iter= WM_operatortype_iter(); + + for( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { + wmOperatorType *ot= BLI_ghashIterator_getValue(iter); + if(BLI_strcasestr(ot->name, str)) { if(WM_operator_poll((bContext*)C, ot)) { char name[256]; @@ -2349,6 +2351,7 @@ static void operator_search_cb(const bContext *C, void *UNUSED(arg), const char } } } + BLI_ghashIterator_free(iter); } void uiTemplateOperatorSearch(uiLayout *layout) diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 67d0e68c1c4..0cb05fa2115 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -66,6 +66,8 @@ #include "BKE_scene.h" #include "BKE_sequencer.h" +#include "BLI_ghash.h" + #include "ED_armature.h" #include "ED_object.h" #include "ED_screen.h" @@ -584,9 +586,10 @@ static void operator_call_cb(struct bContext *UNUSED(C), void *arg_kmi, void *ar static void operator_search_cb(const struct bContext *UNUSED(C), void *UNUSED(arg_kmi), const char *str, uiSearchItems *items) { - wmOperatorType *ot = WM_operatortype_first(); - - for(; ot; ot= ot->next) { + GHashIterator *iter= WM_operatortype_iter(); + + for( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { + wmOperatorType *ot= BLI_ghashIterator_getValue(iter); if(BLI_strcasestr(ot->idname, str)) { char name[OP_MAX_TYPENAME]; @@ -598,6 +601,7 @@ static void operator_search_cb(const struct bContext *UNUSED(C), void *UNUSED(ar break; } } + BLI_ghashIterator_free(iter); } /* operator Search browse menu, open */ diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 2e96800bf3b..a2aed67821d 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -46,6 +46,7 @@ #include "BLI_editVert.h" #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLI_ghash.h" #include "BKE_context.h" #include "BKE_idprop.h" @@ -140,10 +141,11 @@ static void operator_call_cb(struct bContext *C, void *arg_listbase, void *arg2) static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), const char *str, uiSearchItems *items) { - wmOperatorType *ot = WM_operatortype_first(); - - for(; ot; ot= ot->next) { - + GHashIterator *iter= WM_operatortype_iter(); + + for( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { + wmOperatorType *ot= BLI_ghashIterator_getValue(iter); + if(BLI_strcasestr(ot->name, str)) { if(WM_operator_poll((bContext*)C, ot)) { @@ -152,6 +154,7 @@ static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), cons } } } + BLI_ghashIterator_free(iter); } |