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.
This commit is contained in:
@@ -371,7 +371,6 @@ static void end_animated_screen(SpaceTime *stime)
|
||||
#define B_TL_PREVIEWON 757
|
||||
#define B_TL_INSERTKEY 758
|
||||
#define B_TL_DELETEKEY 759
|
||||
#define B_NEWSPACE 760
|
||||
|
||||
#define B_FLIPINFOMENU 0
|
||||
#define B_NEWFRAME 0
|
||||
@@ -384,10 +383,6 @@ void do_time_buttons(bContext *C, void *arg, int event)
|
||||
SpaceTime *stime= C->area->spacedata.first;
|
||||
|
||||
switch(event) {
|
||||
case B_NEWSPACE:
|
||||
ED_newspace(C->area, C->area->butspacetype);
|
||||
WM_event_add_notifier(C, WM_NOTE_SCREEN_CHANGED, 0, NULL);
|
||||
break;
|
||||
case B_REDRAWALL:
|
||||
WM_event_add_notifier(C, WM_NOTE_WINDOW_REDRAW, 0, NULL);
|
||||
break;
|
||||
@@ -455,36 +450,7 @@ void time_header_buttons(const bContext *C, ARegion *ar)
|
||||
block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV);
|
||||
uiBlockSetHandleFunc(block, do_time_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, B_FLIPINFOMENU,
|
||||
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, B_FLIPINFOMENU,
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user