diff options
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_ops.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 47f97b8087f..fb2907983c8 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -60,35 +60,27 @@ #include "buttons_intern.h" /* own include */ -/********************** toolbox operator *********************/ +/********************** context_menu operator *********************/ -static int toolbox_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event)) +static int context_menu_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event)) { - bScreen *sc = CTX_wm_screen(C); - SpaceButs *sbuts = CTX_wm_space_buts(C); - PointerRNA ptr; - uiPopupMenu *pup; - uiLayout *layout; - - RNA_pointer_create(&sc->id, &RNA_SpaceProperties, sbuts, &ptr); - - pup = UI_popup_menu_begin(C, IFACE_("Align"), ICON_NONE); - layout = UI_popup_menu_layout(pup); - uiItemsEnumR(layout, &ptr, "align"); + uiPopupMenu *pup = UI_popup_menu_begin(C, IFACE_("Context Menu"), ICON_NONE); + uiLayout *layout = UI_popup_menu_layout(pup); + uiItemM(layout, "INFO_MT_area", NULL, ICON_NONE); UI_popup_menu_end(C, pup); return OPERATOR_INTERFACE; } -void BUTTONS_OT_toolbox(wmOperatorType *ot) +void BUTTONS_OT_context_menu(wmOperatorType *ot) { /* identifiers */ - ot->name = "Toolbox"; - ot->description = "Display button panel toolbox"; - ot->idname = "BUTTONS_OT_toolbox"; + ot->name = "Context Menu"; + ot->description = "Display properties editor context_menu"; + ot->idname = "BUTTONS_OT_context_menu"; /* api callbacks */ - ot->invoke = toolbox_invoke; + ot->invoke = context_menu_invoke; ot->poll = ED_operator_buttons_active; } |