Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-30 15:18:08 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-30 15:18:08 +0300
commit8036342ea8c20ede363d5d3fe5459cc2af58a0f6 (patch)
tree1579a7a80e7d63fa655ebb4c0058b413d30b9c7e /source/blender/editors/object
parent445bbdf75d94dbe4db25e9a81f6fed47c59acb5a (diff)
2.5: UI & Menus
* Cleaned up UI_interface.h a bit, and added some comments to organize things a bit and indicate what should be used when. * uiMenu* functions can now be used to create menus for headers too, this is done with a uiDefMenuBut, which takes a pointer to a uiMenuCreateFunc, that will then call uiMenu* functions. * Renamed uiMenuBegin/End to uiPupMenuBegin/End, as these are specific to making popup menus. Will convert the other conformation popup menu functions to use this too so we can remove some code. * Extended uiMenu functions, now there is is also: BooleanO, FloatO, BooleanR, EnumR, LevelEnumR, Separator. * Converted image window headers to use uiMenu functions, simplifies menu code further here. Did not remove the uiDefMenu functions as they are used in sequencer/view3d in some places now (will fix). * Also tried to simplify and fix bounds computation a bit better for popup menus. It tried to find out in advance what the size of the menu was but this is difficult with keymap strings in there, now uiPopupBoundsBlock can figure this out afterwards and ensure the popup is within the window bounds. Will convert some other functions to use this too.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_edit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index f53fbc3f835..6bf8cde7942 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -474,7 +474,7 @@ void OBJECT_OT_curve_add(wmOperatorType *ot)
static int object_add_primitive_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- uiMenuItem *head= uiMenuBegin("Add Object");
+ uiMenuItem *head= uiPupMenuBegin("Add Object");
uiMenuLevelEnumO(head, "OBJECT_OT_mesh_add", "type");
uiMenuLevelEnumO(head, "OBJECT_OT_curve_add", "type");
@@ -486,7 +486,7 @@ static int object_add_primitive_invoke(bContext *C, wmOperator *op, wmEvent *eve
uiMenuItemEnumO(head, "OBJECT_OT_object_add", "type", OB_ARMATURE);
uiMenuItemEnumO(head, "OBJECT_OT_object_add", "type", OB_LATTICE);
- uiMenuEnd(C, head);
+ uiPupMenuEnd(C, head);
/* this operator is only for a menu, not used further */
return OPERATOR_CANCELLED;
@@ -2425,7 +2425,7 @@ static int make_parent_exec(bContext *C, wmOperator *op)
static int make_parent_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
Object *ob= CTX_data_active_object(C);
- uiMenuItem *head= uiMenuBegin("Make Parent To");
+ uiMenuItem *head= uiPupMenuBegin("Make Parent To");
uiMenuContext(head, WM_OP_EXEC_DEFAULT);
uiMenuItemEnumO(head, "OBJECT_OT_make_parent", "type", PAR_OBJECT);
@@ -2444,7 +2444,7 @@ static int make_parent_invoke(bContext *C, wmOperator *op, wmEvent *event)
uiMenuItemEnumO(head, "OBJECT_OT_make_parent", "type", PAR_LATTICE);
}
- uiMenuEnd(C, head);
+ uiPupMenuEnd(C, head);
return OPERATOR_RUNNING_MODAL;
}