Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-02-10 20:53:10 +0300
committerTon Roosendaal <ton@blender.org>2009-02-10 20:53:10 +0300
commit149613622434f90f0deebe02dce04d44c95e2dda (patch)
tree55076923d79b5165ab71315ca2a40235454ad5e7 /source/blender/editors/space_file/file_ops.c
parentca1b1e07d7684486f373ec81ddaf4e989c9ddc2f (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.c27
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 */
+}
+