diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-11-09 23:20:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-11-11 01:06:54 +0300 |
commit | 5c6e3337801b493926210e96237be2b495fc5d1b (patch) | |
tree | 5ca4bd778c2d552a7eaf0645c3c1bc6be86d9e5d /source/blender/editors/space_image/image_ops.c | |
parent | 2b107beffd9b408ac1464288d07ee96214c09a30 (diff) |
UI Refactor T41640
Make the UI API more consistent and reduce confusion with some naming.
mainly:
- API function calls
- enum values
some internal static functions have been left for now
Diffstat (limited to 'source/blender/editors/space_image/image_ops.c')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index b51897d1c5d..1b86b608a7c 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -947,7 +947,7 @@ static void image_open_init(bContext *C, wmOperator *op) op->customdata = iod = MEM_callocN(sizeof(ImageOpenData), __func__); iod->iuser = CTX_data_pointer_get_type(C, "image_user", &RNA_ImageUser).data; - uiIDContextProperty(C, &iod->pprop.ptr, &iod->pprop.prop); + UI_context_active_but_prop_get_templateID(C, &iod->pprop.ptr, &iod->pprop.prop); } static void image_open_cancel(bContext *UNUSED(C), wmOperator *op) @@ -1158,7 +1158,7 @@ static int image_open_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED( PropertyRNA *prop; /* hook into UI */ - uiIDContextProperty(C, &ptr, &prop); + UI_context_active_but_prop_get_templateID(C, &ptr, &prop); if (prop) { PointerRNA oldptr; @@ -1958,7 +1958,7 @@ static int image_new_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* hook into UI */ - uiIDContextProperty(C, &ptr, &prop); + UI_context_active_but_prop_get_templateID(C, &ptr, &prop); if (prop) { /* when creating new ID blocks, use is already 1, but RNA @@ -2024,7 +2024,7 @@ static int image_new_exec(bContext *C, wmOperator *op) } /* XXX, Ton is not a fan of OK buttons but using this function to avoid undo/redo bug while in mesh-editmode, - campbell */ -/* XXX Note: the WM_operator_props_dialog_popup() doesn't work for uiIDContextProperty(), image is not being that way */ +/* XXX Note: the WM_operator_props_dialog_popup() doesn't work for UI_context_active_but_prop_get_templateID(), image is not being that way */ static int image_new_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { /* Better for user feedback. */ @@ -2248,11 +2248,11 @@ static int image_pack_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED( ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL); if (!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) { - pup = uiPupMenuBegin(C, IFACE_("OK"), ICON_QUESTION); - layout = uiPupMenuLayout(pup); + pup = UI_popup_menu_begin(C, IFACE_("OK"), ICON_QUESTION); + layout = UI_popup_menu_layout(pup); uiItemBooleanO(layout, IFACE_("Can't pack edited image from disk, pack as internal PNG?"), ICON_NONE, op->idname, "as_png", 1); - uiPupMenuEnd(C, pup); + UI_popup_menu_end(C, pup); BKE_image_release_ibuf(ima, ibuf, NULL); |