diff options
author | Andrea Weikert <elubie@gmx.net> | 2009-09-02 21:13:47 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2009-09-02 21:13:47 +0400 |
commit | 21af438ef8c7cbc19ec0050195c3898ef4d95c29 (patch) | |
tree | 34bf2adc2f69746d541df4292ca9e4dfa0c77c1b | |
parent | 0415e3be054bd6ad742da786e01ec3edc81f9e78 (diff) |
Blender 2.5
* recent files now just write content of G.recent_files, was adding untitled.blend!
* removed unused and now superfluous code reading the .Bfs file (is done in fsmenu now)
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 54 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 18 |
2 files changed, 5 insertions, 67 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index b98717c8629..3921da4f062 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -388,7 +388,7 @@ void WM_read_autosavefile(bContext *C) void read_Blog(void) { - char name[FILE_MAX], filename[FILE_MAX]; + char name[FILE_MAX]; LinkNode *l, *lines; struct RecentFile *recent; char *line; @@ -420,58 +420,6 @@ void read_Blog(void) BLI_free_file_lines(lines); -#ifdef WIN32 - /* Add the drive names to the listing */ - { - __int64 tmp; - char folder[MAX_PATH]; - char tmps[4]; - int i; - - tmp= GetLogicalDrives(); - - for (i=2; i < 26; i++) { - if ((tmp>>i) & 1) { - tmps[0]='a'+i; - tmps[1]=':'; - tmps[2]='\\'; - tmps[3]=0; - -// XX fsmenu_insert_entry(tmps, 0, 0); - } - } - - /* Adding Desktop and My Documents */ -// XXX fsmenu_append_separator(); - - SHGetSpecialFolderPath(0, folder, CSIDL_PERSONAL, 0); -// XXX fsmenu_insert_entry(folder, 0, 0); - SHGetSpecialFolderPath(0, folder, CSIDL_DESKTOPDIRECTORY, 0); -// XXX fsmenu_insert_entry(folder, 0, 0); - -// XXX fsmenu_append_separator(); - } -#endif - - BLI_make_file_string(G.sce, name, BLI_gethome(), ".Bfs"); - lines= BLI_read_file_as_lines(name); - - for (l= lines; l; l= l->next) { - char *line= l->link; - - if (!BLI_streq(line, "")) { -// XXX fsmenu_insert_entry(line, 0, 1); - } - } - -// XXX fsmenu_append_separator(); - - /* add last saved file */ - BLI_split_dirfile(G.sce, name, filename); /* G.sce shouldn't be relative */ - -// XXX fsmenu_insert_entry(name, 0, 0); - - BLI_free_file_lines(lines); } static void writeBlog(void) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 5a385418e5d..b51fcfddc47 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -814,22 +814,12 @@ static EnumPropertyItem *open_recentfile_itemf(bContext *C, PointerRNA *ptr, int struct RecentFile *recent; int totitem= 0, i, ofs= 0; - if(G.sce[0]) { - tmp.value= 1; - tmp.identifier= G.sce; - tmp.name= G.sce; - RNA_enum_item_add(&item, &totitem, &tmp); - ofs = 1; - } - /* dynamically construct enum */ for(recent = G.recent_files.first, i=0; (i<U.recent_files) && (recent); recent = recent->next, i++) { - if(strcmp(recent->filename, G.sce)) { - tmp.value= i+ofs+1; - tmp.identifier= recent->filename; - tmp.name= recent->filename; - RNA_enum_item_add(&item, &totitem, &tmp); - } + tmp.value= i+ofs+1; + tmp.identifier= recent->filename; + tmp.name= recent->filename; + RNA_enum_item_add(&item, &totitem, &tmp); } RNA_enum_item_end(&item, &totitem); |