diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-24 00:40:51 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-24 00:40:51 +0400 |
commit | 062b1b88adc16cd580fb89c59839d7989a62e83e (patch) | |
tree | 0a7139bd88de867897439efd0e19d548dd439a29 /source/blender/editors/space_buttons/buttons_ops.c | |
parent | 580b52785464c1399f669e1a06c9b0b5b27c0be9 (diff) |
2.5: Various
* Buttons header: made tab buttons bigger, remove view menu,
replaced by RMB menu in main region.
* Timeline header: tweak button placement and alignment, added
a play reverse icon.
* Window type chooser menu: removed audio and scripts windows,
change console and logic icons.
* Node space: disable the channel region until it is used.
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_ops.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 124ccf9d480..fee79c6d9c2 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -38,6 +38,8 @@ #include "DNA_node_types.h" #include "DNA_texture_types.h" #include "DNA_scene_types.h" +#include "DNA_screen_types.h" +#include "DNA_space_types.h" #include "DNA_world_types.h" #include "BKE_context.h" @@ -69,6 +71,8 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "UI_interface.h" + #include "buttons_intern.h" // own include @@ -901,3 +905,33 @@ void SCENE_OT_render_layer_remove(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } +/********************** toolbox operator *********************/ + +static int toolbox_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + bScreen *sc= CTX_wm_screen(C); + SpaceButs *sbuts= (SpaceButs*)CTX_wm_space_data(C); + PointerRNA ptr; + uiPopupMenu *pup; + uiLayout *layout; + + RNA_pointer_create(&sc->id, &RNA_SpaceButtonsWindow, sbuts, &ptr); + + pup= uiPupMenuBegin(C, "Align", 0); + layout= uiPupMenuLayout(pup); + uiItemsEnumR(layout, &ptr, "align"); + uiPupMenuEnd(C, pup); + + return OPERATOR_CANCELLED; +} + +void BUTTONS_OT_toolbox(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Toolbox"; + ot->idname= "BUTTONS_OT_toolbox"; + + /* api callbacks */ + ot->invoke= toolbox_invoke; +} + |