From d183e9b43ba5f44561f776b471ec7030e35d8cad Mon Sep 17 00:00:00 2001 From: julianeisel Date: Wed, 28 Jan 2015 23:35:46 +0100 Subject: File Browser: Remove unused fileselect event value This was initially added for a later support of making the automatic File Browser fullscreen optional. As this idea was rejected for now (D1037) it doesn't really make sense to leave these things in. --- source/blender/windowmanager/intern/wm_event_system.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'source/blender/windowmanager/intern/wm_event_system.c') diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 4e5f0d3798d..62f46cc78a3 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1662,7 +1662,6 @@ static int wm_handler_fileselect_do(bContext *C, ListBase *handlers, wmEventHand int action = WM_HANDLER_CONTINUE; switch (val) { - case EVT_FILESELECT_OPEN: case EVT_FILESELECT_FULL_OPEN: { ScrArea *sa; @@ -1676,13 +1675,11 @@ static int wm_handler_fileselect_do(bContext *C, ListBase *handlers, wmEventHand else { sa = handler->op_area; } - - if (val == EVT_FILESELECT_OPEN || sa->full) { + + /* we already had a fullscreen here -> mark new space as a stacked fullscreen */ + if (sa->full) { ED_area_newspace(C, sa, SPACE_FILE); /* 'sa' is modified in-place */ - /* we already had a fullscreen here -> mark new space as a stacked fullscreen */ - if (sa->full) { - sa->flag |= AREA_FLAG_STACKED_FULLSCREEN; - } + sa->flag |= AREA_FLAG_STACKED_FULLSCREEN; } else { sa = ED_screen_full_newspace(C, sa, SPACE_FILE); /* sets context */ @@ -2459,7 +2456,6 @@ void WM_event_add_fileselect(bContext *C, wmOperator *op) wmEventHandler *handler, *handlernext; wmWindowManager *wm = CTX_wm_manager(C); wmWindow *win = CTX_wm_window(C); - int full = 1; // XXX preset? /* only allow 1 file selector open per window */ for (handler = win->modalhandlers.first; handler; handler = handlernext) { @@ -2503,7 +2499,7 @@ void WM_event_add_fileselect(bContext *C, wmOperator *op) op->type->check(C, op); /* ignore return value */ } - WM_event_fileselect_event(wm, op, full ? EVT_FILESELECT_FULL_OPEN : EVT_FILESELECT_OPEN); + WM_event_fileselect_event(wm, op, EVT_FILESELECT_FULL_OPEN); } #if 0 -- cgit v1.2.3