Page Menu
Home
Search
Configure Global Search
Log In
Files
F4816
recent_files_variable_01.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Joshua Leung (aligorith)
Nov 13 2013, 1:18 PM
Size
4 KB
Subscribers
None
recent_files_variable_01.patch
View Options
Index: source/blender/makesdna/DNA_userdef_types.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/makesdna/DNA_userdef_types.h,v
retrieving revision 1.64
diff -u -r1.64 DNA_userdef_types.h
--- source/blender/makesdna/DNA_userdef_types.h 3 Jan 2007 05:50:16 -0000 1.64
+++ source/blender/makesdna/DNA_userdef_types.h 14 Jan 2007 09:18:33 -0000
@@ -178,7 +178,7 @@
short rvibright; /* rotating view icon brightness */
char versemaster[160];
char verseuser[160];
- short pad;
+ short recent_files; /* maximum number of recently used files to remember */
} UserDef;
extern UserDef U; /* from usiblender.c !!!! */
Index: source/blender/src/header_info.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/header_info.c,v
retrieving revision 1.104
diff -u -r1.104 header_info.c
--- source/blender/src/header_info.c 12 Jan 2007 01:13:27 -0000 1.104
+++ source/blender/src/header_info.c 14 Jan 2007 09:32:56 -0000
@@ -942,7 +942,7 @@
menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
}
- for (recent = G.recent_files.first, i=0; i<10 && recent; recent = recent->next, i++) {
+ for (recent = G.recent_files.first, i=0; i<U.recent_files && recent; recent = recent->next, i++) {
if (strcmp(recent->filename, G.sce)!=0) {
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, recent->filename, 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1, i+1, "");
Index: source/blender/src/space.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/space.c,v
retrieving revision 1.444
diff -u -r1.444 space.c
--- source/blender/src/space.c 12 Jan 2007 16:16:59 -0000 1.444
+++ source/blender/src/space.c 14 Jan 2007 10:08:59 -0000
@@ -3440,6 +3440,11 @@
0, 0, 0, 0, 0,"Open the most recently saved temporary file");
}
+ uiDefButS(block, NUM, B_DRAWINFO, "Recent Files:",
+ (xpos+edgsp+(2*mpref)+(3*midsp)),y3,(mpref),buth,
+ &U.recent_files, 0, 90, 0, 0,
+ "Maximum number of recently opened files to remember");
+
} else if (U.userpref == 4) { /* system & opengl */
uiDefBut(block, LABEL,0,"Solid OpenGL lights:",
Index: source/blender/src/toets.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/toets.c,v
retrieving revision 1.95
diff -u -r1.95 toets.c
--- source/blender/src/toets.c 12 Jan 2007 05:26:17 -0000 1.95
+++ source/blender/src/toets.c 14 Jan 2007 10:06:12 -0000
@@ -376,7 +376,7 @@
ofs = 1;
} else ofs = 0;
- for (recent = G.recent_files.first, i=0; (i<10) && (recent); recent = recent->next, i++) {
+ for (recent = G.recent_files.first, i=0; (i<U.recent_files) && (recent); recent = recent->next, i++) {
if (strcmp(recent->filename, G.sce)) {
p+= sprintf(p, "|%s %%x%d", recent->filename, i+ofs+1);
}
Index: source/blender/src/usiblender.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/usiblender.c,v
retrieving revision 1.137
diff -u -r1.137 usiblender.c
--- source/blender/src/usiblender.c 12 Jan 2007 05:29:59 -0000 1.137
+++ source/blender/src/usiblender.c 14 Jan 2007 09:31:54 -0000
@@ -352,6 +352,9 @@
btheme->tipo.vertex_size= 3;
}
}
+
+ /* 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!) */
@@ -567,7 +570,7 @@
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) strcpy(G.sce, line);
@@ -663,7 +666,7 @@
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);
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
70/23/90ff1d60ddc2fcf0a37c44204aed
Event Timeline
Log In to Comment