diff options
author | Ton Roosendaal <ton@blender.org> | 2009-02-10 20:53:10 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-02-10 20:53:10 +0300 |
commit | 149613622434f90f0deebe02dce04d44c95e2dda (patch) | |
tree | 55076923d79b5165ab71315ca2a40235454ad5e7 /source/blender/editors/space_file/file_ops.c | |
parent | ca1b1e07d7684486f373ec81ddaf4e989c9ddc2f (diff) |
2.5
File Window:
- Added PKEY parent directory
- Made "P" button work
- Removed confused theme colors for text, it caused
selected text to print greyish.
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 8b8fcbe57fa..2a95a1e15a1 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -514,5 +514,32 @@ void ED_FILE_OT_load(struct wmOperatorType *ot) ot->poll= ED_operator_file_active; /* <- important, handler is on window level */ } +int file_parent_exec(bContext *C, wmOperator *unused) +{ + SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C); + + if(sfile->params) { + BLI_parent_dir(sfile->params->dir); + filelist_setdir(sfile->files, sfile->params->dir); + filelist_free(sfile->files); + sfile->params->active_file = -1; + } + ED_area_tag_redraw(CTX_wm_area(C)); + + return OPERATOR_FINISHED; + +} + +void ED_FILE_OT_parent(struct wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Parent File"; + ot->idname= "ED_FILE_OT_parent"; + + /* api callbacks */ + ot->exec= file_parent_exec; + ot->poll= ED_operator_file_active; /* <- important, handler is on window level */ +} + |