Revision: 18373 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18373 Author: ton Date: 2009-01-06 19:52:18 +0100 (Tue, 06 Jan 2009)
Log Message: ----------- 2.5 Made ED_screen api calls: - ED_screen_full_newspace() - ED_screen_full_prevspace() Which now gets called by F1 operator, to move to full-screen-sized browser. For testing fun its default now. Might become user setting. Also have to check on opening a temp window for this (and for render). Modified Paths: -------------- branches/blender2.5/blender/source/blender/editors/include/ED_screen.h branches/blender2.5/blender/source/blender/editors/screen/screen_edit.c branches/blender2.5/blender/source/blender/editors/space_file/file_draw.c branches/blender2.5/blender/source/blender/windowmanager/intern/wm_operators.c Modified: branches/blender2.5/blender/source/blender/editors/include/ED_screen.h =================================================================== --- branches/blender2.5/blender/source/blender/editors/include/ED_screen.h 2009-01-06 18:14:37 UTC (rev 18372) +++ branches/blender2.5/blender/source/blender/editors/include/ED_screen.h 2009-01-06 18:52:18 UTC (rev 18373) @@ -80,7 +80,10 @@ void ED_screen_set_subwinactive(struct wmWindow *win, struct wmEvent *event); void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen); void ED_screen_animation_timer(struct bContext *C, int enable); +void ED_screen_full_newspace(struct bContext *C, ScrArea *sa, int type); +void ED_screen_full_prevspace(struct bContext *C); + void ED_operatortypes_screen(void); void ED_keymap_screen(struct wmWindowManager *wm); Modified: branches/blender2.5/blender/source/blender/editors/screen/screen_edit.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/screen/screen_edit.c 2009-01-06 18:14:37 UTC (rev 18372) +++ branches/blender2.5/blender/source/blender/editors/screen/screen_edit.c 2009-01-06 18:52:18 UTC (rev 18373) @@ -1302,6 +1302,24 @@ } +void ED_screen_full_newspace(bContext *C, ScrArea *sa, int type) +{ + if(sa->full==0) + ed_screen_fullarea(C); + + ED_area_newspace(C, CTX_wm_area(C), type); +} + +void ED_screen_full_prevspace(bContext *C) +{ + ScrArea *sa= CTX_wm_area(C); + + ED_area_prevspace(C); + + if(sa->full) + ed_screen_fullarea(C); +} + void ED_screen_animation_timer(bContext *C, int enable) { bScreen *screen= CTX_wm_screen(C); Modified: branches/blender2.5/blender/source/blender/editors/space_file/file_draw.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_file/file_draw.c 2009-01-06 18:14:37 UTC (rev 18372) +++ branches/blender2.5/blender/source/blender/editors/space_file/file_draw.c 2009-01-06 18:52:18 UTC (rev 18373) @@ -95,7 +95,7 @@ { char name[FILE_MAX]; - ED_area_prevspace(C); + ED_screen_full_prevspace(C); if(sfile->op) { wmOperator *op= sfile->op; @@ -119,7 +119,7 @@ WM_operator_free(sfile->op); sfile->op = NULL; } - ED_area_prevspace(C); + ED_screen_full_prevspace(C); break; } Modified: branches/blender2.5/blender/source/blender/windowmanager/intern/wm_operators.c =================================================================== --- branches/blender2.5/blender/source/blender/windowmanager/intern/wm_operators.c 2009-01-06 18:14:37 UTC (rev 18372) +++ branches/blender2.5/blender/source/blender/windowmanager/intern/wm_operators.c 2009-01-06 18:52:18 UTC (rev 18373) @@ -328,44 +328,10 @@ static int wm_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) { - wmWindow *newwin, *win; - bScreen *newsc, *sc; - ScrArea *sa, *oldsa; SpaceFile *sfile; - - rcti rect; - win= CTX_wm_window(C); - sc= CTX_wm_screen(C); - oldsa= CTX_wm_area(C); + ED_screen_full_newspace(C, CTX_wm_area(C), SPACE_FILE); -#if 0 /* XXX experimental code for opening filebrowser in new window */ - /* poll() checks area context, but we don't accept full-area windows */ - if(sc->full != SCREENNORMAL) - return OPERATOR_CANCELLED; - - /* adds window to WM */ - rect.xmin = 0; - rect.ymin = 0; - rect.xmax = win->sizex; - rect.ymax = win->sizey; - BLI_translate_rcti(&rect, win->posx, win->posy); - newwin= WM_window_open(C, &rect); - - /* allocs new screen and adds to newly created window, using window size */ - newsc= screen_add(newwin, CTX_data_scene(C), sc->id.name+2); - newwin->screen= newsc; - - /* create filebrowser */ - CTX_wm_window_set(C, newwin); - CTX_wm_screen_set(C, newsc); - sa= (ScrArea*)newsc->areabase.first; - CTX_wm_area_set(C, sa); - ED_area_newspace(C, sa, SPACE_FILE); -#else - ED_area_newspace(C, oldsa, SPACE_FILE); -#endif - /* settings for filebrowser */ sfile= (SpaceFile*)CTX_wm_space_data(C); sfile->op = op; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs