diff options
author | Andrea Weikert <elubie@gmx.net> | 2009-03-08 16:14:12 +0300 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2009-03-08 16:14:12 +0300 |
commit | 403b3763a8048f88f8f589167c1f70b876999795 (patch) | |
tree | a243f78f3ff9f23cd7d8bec9e7c4567509e2a90b /source/blender/editors/space_file/space_file.c | |
parent | c20b4d661863b62089f0819d1079920bc5f2a62d (diff) |
2.5 filebrowser
still WIP commit, so Matt can do UI design
- cleaned up filebrowser drawing and selection
- selection bugfix
Diffstat (limited to 'source/blender/editors/space_file/space_file.c')
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 70d7ad9cde5..da7b61b5ee7 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -62,6 +62,7 @@ #include "UI_resources.h" #include "UI_view2d.h" + #include "ED_markers.h" #include "ED_fileselect.h" @@ -90,6 +91,7 @@ static SpaceLink *file_new(const bContext *C) BLI_addtail(&sfile->regionbase, ar); ar->regiontype= RGN_TYPE_CHANNELS; ar->alignment= RGN_ALIGN_LEFT; + ar->flag |= RGN_FLAG_HIDDEN; /* ui list region */ ar= MEM_callocN(sizeof(ARegion), "ui area for file"); @@ -128,6 +130,11 @@ static void file_free(SpaceLink *sl) MEM_freeN(sfile->params); sfile->params= NULL; } + + if (sfile->layout) { + MEM_freeN(sfile->layout); + sfile->layout = NULL; + } } @@ -153,6 +160,9 @@ static SpaceLink *file_duplicate(SpaceLink *sl) filelist_setdir(sfilen->files, sfilen->params->dir); filelist_settype(sfilen->files, sfilen->params->type); } + if (sfileo->layout) { + sfilen->layout= MEM_dupallocN(sfileo->layout); + } return (SpaceLink *)sfilen; } @@ -209,7 +219,7 @@ static void file_main_area_draw(const bContext *C, ARegion *ar) glClear(GL_COLOR_BUFFER_BIT); /* Allow dynamically sliders to be set, saves notifiers etc. */ - if (sfile->params && (sfile->params->display == FILE_IMGDISPLAY) ) + if (sfile->params && ( (sfile->params->display == FILE_IMGDISPLAY) || (sfile->params->display == FILE_LONGDISPLAY)) ) v2d->scroll = V2D_SCROLL_RIGHT; else v2d->scroll = V2D_SCROLL_BOTTOM; @@ -256,6 +266,7 @@ void file_operatortypes(void) WM_operatortype_append(FILE_OT_exec); WM_operatortype_append(FILE_OT_cancel); WM_operatortype_append(FILE_OT_parent); + WM_operatortype_append(FILE_OT_bookmark_toggle); } /* NOTE: do not add .blend file reading on this level */ @@ -392,7 +403,7 @@ void ED_spacetype_file(void) /* regions: ui */ art= MEM_callocN(sizeof(ARegionType), "spacetype file region"); art->regionid = RGN_TYPE_UI; - art->minsizey= 100; + art->minsizey= 80; art->keymapflag= ED_KEYMAP_UI; art->init= file_ui_area_init; art->draw= file_ui_area_draw; |