Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_dragdrop.c
| Show All 17 Lines | |||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup wm | * \ingroup wm | ||||
| * | * | ||||
| * Our own drag-and-drop, drag state and drop boxes. | * Our own drag-and-drop, drag state and drop boxes. | ||||
| */ | */ | ||||
| #include <CLG_log.h> | |||||
| #include <string.h> | #include <string.h> | ||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "DNA_windowmanager_types.h" | #include "DNA_windowmanager_types.h" | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| ▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | wmDropBox *WM_dropbox_add(ListBase *lb, | ||||
| drop->poll = poll; | drop->poll = poll; | ||||
| drop->copy = copy; | drop->copy = copy; | ||||
| drop->ot = WM_operatortype_find(idname, 0); | drop->ot = WM_operatortype_find(idname, 0); | ||||
| drop->opcontext = WM_OP_INVOKE_DEFAULT; | drop->opcontext = WM_OP_INVOKE_DEFAULT; | ||||
| if (drop->ot == NULL) { | if (drop->ot == NULL) { | ||||
| MEM_freeN(drop); | MEM_freeN(drop); | ||||
| printf("Error: dropbox with unknown operator: %s\n", idname); | CLOG_ERROR(WM_LOG_OPERATORS, "Dropbox with unknown operator: %s", idname); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| WM_operator_properties_alloc(&(drop->ptr), &(drop->properties), idname); | WM_operator_properties_alloc(&(drop->ptr), &(drop->properties), idname); | ||||
| BLI_addtail(lb, drop); | BLI_addtail(lb, drop); | ||||
| return drop; | return drop; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 381 Lines • Show Last 20 Lines | |||||