Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / source / blender / editors / space_file / file_ops.c
index e1a6e34..9c73956 100644 (file)
@@ -190,9 +190,9 @@ static int file_border_select_exec(bContext *C, wmOperator *op)
        BLI_isect_rcti(&(ar->v2d.mask), &rect, &rect);
        
        if (FILE_SELECT_DIR == file_select(sfile, ar, &rect, val )) {
-               WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+               WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
        } else {
-               WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+               WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
        }
        return OPERATOR_FINISHED;
 }
@@ -239,12 +239,12 @@ static int file_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
        file_deselect_all(sfile);
 
        if (FILE_SELECT_DIR == file_select(sfile, ar, &rect, val ))
-               WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+               WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
        else
-               WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+               WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
 
        WM_event_add_mousemove(C); /* for directory changes */
-       WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+       WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
 
        return OPERATOR_FINISHED;
 }
@@ -322,7 +322,7 @@ static int bookmark_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
                BLI_cleanup_dir(G.sce, params->dir);
                file_change_dir(sfile);                         
 
-               WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+               WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
        }
        
        return OPERATOR_FINISHED;
@@ -566,11 +566,11 @@ int file_exec(bContext *C, wmOperator *unused)
        return OPERATOR_FINISHED;
 }
 
-void FILE_OT_execute(struct wmOperatorType *ot)
+void FILE_OT_exec(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Execute File Window";
-       ot->idname= "FILE_OT_execute";
+       ot->idname= "FILE_OT_exec";
        
        /* api callbacks */
        ot->exec= file_exec;
@@ -587,7 +587,7 @@ int file_parent_exec(bContext *C, wmOperator *unused)
                        BLI_parent_dir(sfile->params->dir);
                        BLI_cleanup_dir(G.sce, sfile->params->dir);
                        file_change_dir(sfile);
-                       WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+                       WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
                }
        }               
        
@@ -614,7 +614,7 @@ int file_refresh_exec(bContext *C, wmOperator *unused)
        
        file_change_dir(sfile);
 
-       WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+       WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
 
        return OPERATOR_FINISHED;
 
@@ -645,7 +645,7 @@ int file_previous_exec(bContext *C, wmOperator *unused)
 
                file_change_dir(sfile);
        }
-       WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+       WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
 
        return OPERATOR_FINISHED;
 }
@@ -676,7 +676,7 @@ int file_next_exec(bContext *C, wmOperator *unused)
 
                file_change_dir(sfile);
        }               
-       WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+       WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
 
        return OPERATOR_FINISHED;
 }
@@ -705,7 +705,7 @@ int file_directory_new_exec(bContext *C, wmOperator *unused)
                        BLI_strncpy(sfile->params->dir, filelist_dir(sfile->files), FILE_MAX);
                } 
        }               
-       WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+       WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
 
        return OPERATOR_FINISHED;
 }
@@ -754,7 +754,7 @@ int file_directory_exec(bContext *C, wmOperator *unused)
                BLI_cleanup_dir(G.sce, sfile->params->dir);
                BLI_add_slash(sfile->params->dir);
                file_change_dir(sfile);
-               WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+               WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
        }               
        
 
@@ -769,7 +769,7 @@ int file_filename_exec(bContext *C, wmOperator *unused)
                if (file_select_match(sfile, sfile->params->file))
                {
                        sfile->params->file[0] = '\0';
-                       WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+                       WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
                }
        }               
 
@@ -796,7 +796,7 @@ int file_hidedot_exec(bContext *C, wmOperator *unused)
                sfile->params->flag ^= FILE_HIDE_DOT;
                filelist_free(sfile->files);
                sfile->params->active_file = -1;
-               WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+               WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
        }
        
        return OPERATOR_FINISHED;
@@ -958,7 +958,7 @@ int file_delete_exec(bContext *C, wmOperator *op)
        file = filelist_file(sfile->files, sfile->params->active_file);
        BLI_make_file_string(G.sce, str, sfile->params->dir, file->relname);
        BLI_delete(str, 0, 0);  
-       WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+       WM_event_add_notifier(C, NC_FILE | ND_FILELIST, NULL);
        
        return OPERATOR_FINISHED;