Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/filesel.c
| Show First 20 Lines • Show All 1,342 Lines • ▼ Show 20 Lines | void file_params_renamefile_activate(SpaceFile *sfile, FileSelectParams *params) | ||||
| } | } | ||||
| /* File listing is now async, only reset renaming if matching entry is not found | /* File listing is now async, only reset renaming if matching entry is not found | ||||
| * when file listing is not done. */ | * when file listing is not done. */ | ||||
| else if (filelist_is_ready(sfile->files)) { | else if (filelist_is_ready(sfile->files)) { | ||||
| file_params_renamefile_clear(params); | file_params_renamefile_clear(params); | ||||
| } | } | ||||
| } | } | ||||
| /** | |||||
| * Return the File Browser area in which \a file_operator is active. | |||||
| */ | |||||
campbellbarton: Since this patch was created, doc-strings are now added to the headers. | |||||
| ScrArea *ED_fileselect_handler_area_find(const wmWindow *win, const wmOperator *file_operator) | ScrArea *ED_fileselect_handler_area_find(const wmWindow *win, const wmOperator *file_operator) | ||||
| { | { | ||||
| bScreen *screen = WM_window_get_active_screen(win); | bScreen *screen = WM_window_get_active_screen(win); | ||||
| ED_screen_areas_iter (win, screen, area) { | ED_screen_areas_iter (win, screen, area) { | ||||
| if (area->spacetype == SPACE_FILE) { | if (area->spacetype == SPACE_FILE) { | ||||
| SpaceFile *sfile = area->spacedata.first; | SpaceFile *sfile = area->spacedata.first; | ||||
| if (sfile->op == file_operator) { | if (sfile->op == file_operator) { | ||||
| return area; | return area; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| /** | |||||
| * Check if there is any area in \a win that acts as a modal File Browser and return it. | |||||
| */ | |||||
| ScrArea *ED_fileselect_handler_area_find_any(const wmWindow *win) | |||||
campbellbartonUnsubmitted Done Inline ActionsCould be called ED_fileselect_handler_area_find_any_with_op (since this needs an operator). campbellbarton: Could be called `ED_fileselect_handler_area_find_any_with_op` (since this needs an operator). | |||||
| { | |||||
| bScreen *screen = WM_window_get_active_screen(win); | |||||
| ED_screen_areas_iter (win, screen, area) { | |||||
| if (area->spacetype != SPACE_FILE) { | |||||
| continue; | |||||
| } | |||||
| const SpaceFile *sfile = area->spacedata.first; | |||||
| if (sfile->op) { | |||||
| return area; | |||||
| } | |||||
| } | |||||
| return NULL; | |||||
| } | |||||
Since this patch was created, doc-strings are now added to the headers.