diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-31 06:36:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-31 06:36:46 +0300 |
commit | 18d135d05c53885eb7460e1c95cc8ebbdb771102 (patch) | |
tree | 9a4bbe8b2d67ccc572c2e6058f3627c0a249aa78 /source/blender/windowmanager/intern | |
parent | 94ea566b5a185bd99c57eeaad974253896e0041c (diff) |
Cleanup: rename WM_keymap_find -> WM_keymap_ensure
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_keymap.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index 762cef4a635..ccf06155f25 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -771,7 +771,7 @@ wmKeyMap *WM_keymap_list_find(ListBase *lb, const char *idname, int spaceid, int return NULL; } -wmKeyMap *WM_keymap_find(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid) +wmKeyMap *WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid) { wmKeyMap *km = WM_keymap_list_find(&keyconf->keymaps, idname, spaceid, regionid); @@ -798,7 +798,7 @@ wmKeyMap *WM_keymap_find_all(const bContext *C, const char *idname, int spaceid, wmKeyMap *WM_modalkeymap_add(wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items) { - wmKeyMap *km = WM_keymap_find(keyconf, idname, 0, 0); + wmKeyMap *km = WM_keymap_ensure(keyconf, idname, 0, 0); km->flag |= KEYMAP_MODAL; km->modal_items = items; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 454d7dc57f0..1b73f40bb8d 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -3320,7 +3320,7 @@ static void gesture_zoom_border_modal_keymap(wmKeyConfig *keyconf) /* default keymap for windows and screens, only call once per WM */ void wm_window_keymap(wmKeyConfig *keyconf) { - wmKeyMap *keymap = WM_keymap_find(keyconf, "Window", 0, 0); + wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Window", 0, 0); wmKeyMapItem *kmi; /* note, this doesn't replace existing keymap items */ diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index f6ebdae8414..97df94af38d 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -719,13 +719,13 @@ void wm_window_ghostwindows_ensure(wmWindowManager *wm) win->eventstate = MEM_callocN(sizeof(wmEvent), "window event state"); /* add keymap handlers (1 handler for all keys in map!) */ - keymap = WM_keymap_find(wm->defaultconf, "Window", 0, 0); + keymap = WM_keymap_ensure(wm->defaultconf, "Window", 0, 0); WM_event_add_keymap_handler(&win->handlers, keymap); - keymap = WM_keymap_find(wm->defaultconf, "Screen", 0, 0); + keymap = WM_keymap_ensure(wm->defaultconf, "Screen", 0, 0); WM_event_add_keymap_handler(&win->handlers, keymap); - keymap = WM_keymap_find(wm->defaultconf, "Screen Editing", 0, 0); + keymap = WM_keymap_ensure(wm->defaultconf, "Screen Editing", 0, 0); WM_event_add_keymap_handler(&win->modalhandlers, keymap); /* add drop boxes */ |