diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-04 10:31:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-04 10:31:30 +0300 |
commit | 44505b38df557a5711703613685a1dec9fc2c3d9 (patch) | |
tree | 3f05bebcc7bfadf56569f2dcca7f95fc56b1b0d0 /source/blender/editors/space_file/space_file.c | |
parent | 6654e109df952be3a3128fae2508a02c196ae593 (diff) |
Cleanup: strip trailing space in editors
Diffstat (limited to 'source/blender/editors/space_file/space_file.c')
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index e46f8ce0f5a..8b681bd93c3 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -114,9 +114,9 @@ static SpaceLink *file_new(const bContext *UNUSED(C)) /* not spacelink itself */ static void file_free(SpaceLink *sl) -{ +{ SpaceFile *sfile = (SpaceFile *) sl; - + BLI_assert(sfile->previews_timer == NULL); if (sfile->files) { @@ -184,7 +184,7 @@ static SpaceLink *file_duplicate(SpaceLink *sl) { SpaceFile *sfileo = (SpaceFile *)sl; SpaceFile *sfilen = MEM_dupallocN(sl); - + /* clear or remove stuff from old */ sfilen->op = NULL; /* file window doesn't own operators */ @@ -202,7 +202,7 @@ static SpaceLink *file_duplicate(SpaceLink *sl) if (sfileo->folders_next) sfilen->folders_next = folderlist_duplicate(sfileo->folders_next); - + if (sfileo->layout) { sfilen->layout = MEM_dupallocN(sfileo->layout); } @@ -326,9 +326,9 @@ static void file_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn) static void file_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; - + UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy); - + /* own keymaps */ keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); @@ -372,9 +372,9 @@ static void file_main_region_draw(const bContext *C, ARegion *ar) UI_GetThemeColor3fv(TH_BACK, col); glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); - + /* Allow dynamically sliders to be set, saves notifiers etc. */ - + if (params->display == FILE_IMGDISPLAY) { v2d->scroll = V2D_SCROLL_RIGHT; v2d->keepofs &= ~V2D_LOCKOFS_Y; @@ -384,7 +384,7 @@ static void file_main_region_draw(const bContext *C, ARegion *ar) v2d->scroll = V2D_SCROLL_BOTTOM; v2d->keepofs &= ~V2D_LOCKOFS_X; v2d->keepofs |= V2D_LOCKOFS_Y; - + /* XXX this happens on scaling down Screen (like from startup.blend) */ /* view2d has no type specific for filewindow case, which doesnt scroll vertically */ if (v2d->cur.ymax < 0) { @@ -400,18 +400,18 @@ static void file_main_region_draw(const bContext *C, ARegion *ar) /* set view */ UI_view2d_view_ortho(v2d); - + /* on first read, find active file */ if (params->highlight_file == -1) { wmEvent *event = CTX_wm_window(C)->eventstate; file_highlight_set(sfile, ar, event->x, event->y); } - + file_draw_list(C, ar); - + /* reset view matrix */ UI_view2d_view_restore(C); - + /* scrollers */ scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY); UI_view2d_scrollers_draw(C, v2d, scrollers); @@ -565,8 +565,8 @@ static void file_keymap(struct wmKeyConfig *keyconf) RNA_int_set(kmi->ptr, "increment", -10); kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADMINUS, KM_PRESS, KM_CTRL, 0); RNA_int_set(kmi->ptr, "increment", -100); - - + + /* keys for button region (top) */ keymap = WM_keymap_find(keyconf, "File Browser Buttons", SPACE_FILE, 0); kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, 0, 0); @@ -615,9 +615,9 @@ static void file_tools_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), static void file_header_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; - + ED_region_header_init(ar); - + keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -706,10 +706,10 @@ void ED_spacetype_file(void) { SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype file"); ARegionType *art; - + st->spaceid = SPACE_FILE; strncpy(st->name, "File", BKE_ST_MAXNAME); - + st->new = file_new; st->free = file_free; st->init = file_init; @@ -729,7 +729,7 @@ void ED_spacetype_file(void) art->listener = file_main_region_listener; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D; BLI_addhead(&st->regiontypes, art); - + /* regions: header */ art = MEM_callocN(sizeof(ARegionType), "spacetype file region"); art->regionid = RGN_TYPE_HEADER; @@ -739,7 +739,7 @@ void ED_spacetype_file(void) art->draw = file_header_region_draw; // art->listener = file_header_region_listener; BLI_addhead(&st->regiontypes, art); - + /* regions: ui */ art = MEM_callocN(sizeof(ARegionType), "spacetype file region"); art->regionid = RGN_TYPE_UI; @@ -800,7 +800,7 @@ void ED_file_exit(void) void ED_file_read_bookmarks(void) { const char * const cfgdir = BKE_appdir_folder_id(BLENDER_USER_CONFIG, NULL); - + fsmenu_free(); fsmenu_read_system(ED_fsmenu_get(), true); |