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/windowmanager/intern/wm_files.c')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 5933d8ed4d6..a0be707f840 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -452,8 +452,9 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
/* called on startup, (context entirely filled with NULLs) */
/* or called for 'New File' */
/* op can be NULL */
-int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory, ListBase *wmbase)
+int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory)
{
+ ListBase wmbase;
char tstr[FILE_MAXDIR+FILE_MAXFILE];
int success= 0;
@@ -474,7 +475,7 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory
G.fileflags &= ~G_FILE_NO_UI;
/* put aside screens to match with persistant windows later */
- wm_window_match_init(C, wmbase);
+ wm_window_match_init(C, &wmbase);
if (!from_memory && BLI_exists(tstr)) {
success = (BKE_read_file(C, tstr, NULL) != BKE_READ_FILE_FAIL);
@@ -486,7 +487,7 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory
}
if(success==0) {
success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL);
- if (wmbase->first == NULL) wm_clear_default_size(C);
+ if (wmbase.first == NULL) wm_clear_default_size(C);
#ifdef WITH_PYTHON_SECURITY /* not default */
/* use alternative setting for security nuts
@@ -494,15 +495,7 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory
U.flag |= USER_SCRIPT_AUTOEXEC_DISABLE;
#endif
}
- return TRUE;
-}
-
-/* split from the old WM_read_homefile, as the locale setting should
- * be called after loading user preference, while the
- * WM_read_homefile_proc may need i18n support. So we split them, and
- * insert locale setting steps */
-int WM_read_homefile_proc(bContext *C, ListBase *wmbase)
-{
+
/* prevent buggy files that had G_FILE_RELATIVE_REMAP written out by mistake. Screws up autosaves otherwise
* can remove this eventually, only in a 2.53 and older, now its not written */
G.fileflags &= ~G_FILE_RELATIVE_REMAP;
@@ -511,7 +504,7 @@ int WM_read_homefile_proc(bContext *C, ListBase *wmbase)
wm_init_userdef(C);
/* match the read WM with current WM */
- wm_window_match_do(C, wmbase);
+ wm_window_match_do(C, &wmbase);
WM_check(C); /* opens window(s), checks keymaps */
G.main->name[0]= '\0';
@@ -556,9 +549,8 @@ int WM_read_homefile_proc(bContext *C, ListBase *wmbase)
int WM_read_homefile_exec(bContext *C, wmOperator *op)
{
- ListBase wmbase;
int from_memory= strcmp(op->type->idname, "WM_OT_read_factory_settings") == 0;
- return WM_read_homefile(C, op->reports, from_memory, &wmbase) && WM_read_homefile_proc(C, &wmbase) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
+ return WM_read_homefile(C, op->reports, from_memory) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
void WM_read_history(void)