diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-03-18 06:30:24 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-03-18 06:30:24 +0300 |
commit | 41aac13d9eb1c39f34b2b8471f349471ee2f0f5b (patch) | |
tree | e2eb17b843a30a24d58f178fbf16147292c2789d /source/blender/src/usiblender.c | |
parent | 6b4f197983c013707e23a69628f26dcb0b2b9c5a (diff) |
== Recently-Opened Files List (Patch #5708) ==
In the past, this was limited to only having 10 items. Now you can set the
number of recently opened files that are remembered (ranging from 0 to 30
items).
Setting for this can be found under 'Auto-Save' in the Info window.
Diffstat (limited to 'source/blender/src/usiblender.c')
-rw-r--r-- | source/blender/src/usiblender.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c index 140e97d4028..b81cba7d1d0 100644 --- a/source/blender/src/usiblender.c +++ b/source/blender/src/usiblender.c @@ -353,6 +353,10 @@ static void init_userdef_file(void) } } } + if (G.main->versionfile <= 243) { + /* set default number of recently-used files (if not set) */ + if (U.recent_files == 0) U.recent_files = 10; + } /* GL Texture Garbage Collection (variable abused above!) */ if (U.textimeout == 0) { @@ -567,7 +571,7 @@ static void readBlog(void) G.recent_files.first = G.recent_files.last = NULL; /* read list of recent opend files from .Blog to memory */ - for (l= lines, num= 0; l && (num<10); l= l->next, num++) { + for (l= lines, num= 0; l && (num<U.recent_files); l= l->next, num++) { line = l->link; if (!BLI_streq(line, "")) { if (num==0) @@ -666,7 +670,7 @@ static void writeBlog(void) recent = recent->next; i=1; /* write rest of recent opened files to .Blog */ - while((i<10) && (recent)){ + while((i<U.recent_files) && (recent)){ /* this prevents to have duplicities in list */ if (strcmp(recent->filename, G.sce)!=0) { fprintf(fp, "%s\n", recent->filename); |