diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-14 15:16:55 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-14 15:16:55 +0300 |
commit | a4b6ee672d298a077d6adeac022c6d025d6e082a (patch) | |
tree | ef38678c1f2dd499131eb45b362952ff61c2ffc6 /source/blender/editors/space_image/image_header.c | |
parent | 21e01ccac356a9d8e9dee01c48db54e70ededec7 (diff) |
2.5
- Added file space (too) :) Andrea was first, this is more
complete.
- Suggestion from Joshua: move all standard header buttons to
1 function, makes it all easier, less code, and less area/space
stuff needs to be exposed.
Diffstat (limited to 'source/blender/editors/space_image/image_header.c')
-rw-r--r-- | source/blender/editors/space_image/image_header.c | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/source/blender/editors/space_image/image_header.c b/source/blender/editors/space_image/image_header.c index 9022dedabeb..44b068cebc1 100644 --- a/source/blender/editors/space_image/image_header.c +++ b/source/blender/editors/space_image/image_header.c @@ -90,16 +90,10 @@ static uiBlock *dummy_viewmenu(bContext *C, uiMenuBlockHandle *handle, void *arg return block; } -#define B_NEWSPACE 100 - static void do_image_buttons(bContext *C, void *arg, int event) { switch(event) { - case B_NEWSPACE: - ED_newspace(C->area, C->area->butspacetype); - WM_event_add_notifier(C, WM_NOTE_SCREEN_CHANGED, 0, NULL); - break; - } + } } @@ -112,36 +106,7 @@ void image_header_buttons(const bContext *C, ARegion *ar) block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); uiBlockSetHandleFunc(block, do_image_buttons, NULL); - if(ED_screen_area_active(C)) uiBlockSetCol(block, TH_HEADER); - else uiBlockSetCol(block, TH_HEADERDESEL); - - xco = 8; - - uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, - windowtype_pup(), xco, yco, XIC+10, YIC, - &(C->area->butspacetype), 1.0, SPACEICONMAX, 0, 0, - "Displays Current Window Type. " - "Click for menu of available types."); - - xco += XIC + 14; - - uiBlockSetEmboss(block, UI_EMBOSSN); - if (sa->flag & HEADER_NO_PULLDOWN) { - uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0, - ICON_DISCLOSURE_TRI_RIGHT, - xco,yco,XIC,YIC-2, - &(sa->flag), 0, 0, 0, 0, - "Show pulldown menus"); - } - else { - uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0, - ICON_DISCLOSURE_TRI_DOWN, - xco,yco,XIC,YIC-2, - &(sa->flag), 0, 0, 0, 0, - "Hide pulldown menus"); - } - uiBlockSetEmboss(block, UI_EMBOSS); - xco+=XIC; + xco= ED_area_header_standardbuttons(C, block, yco); if((sa->flag & HEADER_NO_PULLDOWN)==0) { int xmax; |