Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_menu_type.c
| Show All 15 Lines | |||||
| /** \file | /** \file | ||||
| * \ingroup wm | * \ingroup wm | ||||
| * | * | ||||
| * Menu Registry. | * Menu Registry. | ||||
| */ | */ | ||||
| #include "BLI_sys_types.h" | #include "BLI_sys_types.h" | ||||
| #include <CLG_log.h> | |||||
| #include "DNA_windowmanager_types.h" | #include "DNA_windowmanager_types.h" | ||||
| #include "DNA_workspace_types.h" | #include "DNA_workspace_types.h" | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLI_ghash.h" | #include "BLI_ghash.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| Show All 14 Lines | MenuType *WM_menutype_find(const char *idname, bool quiet) | ||||
| if (idname[0]) { | if (idname[0]) { | ||||
| mt = BLI_ghash_lookup(menutypes_hash, idname); | mt = BLI_ghash_lookup(menutypes_hash, idname); | ||||
| if (mt) { | if (mt) { | ||||
| return mt; | return mt; | ||||
| } | } | ||||
| } | } | ||||
| if (!quiet) { | if (!quiet) { | ||||
| printf("search for unknown menutype %s\n", idname); | CLOG_INFO(WM_LOG_TOOLS, "search for unknown menutype %s", idname); | ||||
| } | } | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| void WM_menutype_iter(GHashIterator *ghi) | void WM_menutype_iter(GHashIterator *ghi) | ||||
| { | { | ||||
| BLI_ghashIterator_init(ghi, menutypes_hash); | BLI_ghashIterator_init(ghi, menutypes_hash); | ||||
| ▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines | |||||