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:
Diffstat (limited to 'source/blender/editors/space_file/space_file.c')
-rw-r--r--source/blender/editors/space_file/space_file.c44
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 c647ec78270..62e7c7923e8 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -115,9 +115,9 @@ static SpaceLink *file_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scen
/* not spacelink itself */
static void file_free(SpaceLink *sl)
-{
+{
SpaceFile *sfile = (SpaceFile *) sl;
-
+
BLI_assert(sfile->previews_timer == NULL);
if (sfile->files) {
@@ -185,7 +185,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 */
@@ -203,7 +203,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, Sce
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);
@@ -410,9 +410,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;
@@ -422,7 +422,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) {
@@ -438,18 +438,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);
@@ -603,8 +603,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);
@@ -655,9 +655,9 @@ static void file_tools_region_listener(
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);
}
@@ -748,10 +748,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;
@@ -772,7 +772,7 @@ void ED_spacetype_file(void)
art->message_subscribe = file_main_region_message_subscribe;
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;
@@ -782,7 +782,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;
@@ -843,7 +843,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);