switch language in User Preference's System page. with some known switch failure...
[blender.git] / source / blender / windowmanager / intern / wm_init_exit.c
index dfa3a0f80f176ed7aba26673dcc3ead807c8439b..26d1b4454bd43e838915067a17cb37bad434ce90 100644 (file)
@@ -122,6 +122,7 @@ int wm_start_with_console = 0;
 /* only called once, for startup */
 void WM_init(bContext *C, int argc, const char **argv)
 {
+       ListBase wmbase;
        if (!G.background) {
                wm_ghost_init(C);       /* note: it assigns C to ghost! */
                wm_init_cursor_data();
@@ -131,24 +132,24 @@ void WM_init(bContext *C, int argc, const char **argv)
        BLF_lang_init();
        // use default settings
        BLF_lang_encoding("");
-       BLF_lang_set("");
+       /* get the default database, plus a wm */
+       WM_read_homefile(C, NULL, G.factory_startup, &wmbase);
+       BLF_lang_set(NULL);
 
        RNA_types_init_gettext();
 
        wm_operatortype_init();
-       
+
        set_free_windowmanager_cb(wm_close_and_free);   /* library.c */
        set_blender_test_break_cb(wm_window_testbreak); /* blender.c */
        DAG_editors_update_cb(ED_render_id_flush_update); /* depsgraph.c */
-       
+
        ED_spacetypes_init();   /* editors/space_api/spacetype.c */
-       
-       ED_file_init();                 /* for fsmenu */
-       ED_init_node_butfuncs();        
 
-       /* get the default database, plus a wm */
-       WM_read_homefile(C, NULL, G.factory_startup);
+       ED_file_init();                 /* for fsmenu */
+       ED_init_node_butfuncs();
 
+       WM_read_homefile_proc(C, &wmbase);
        /* note: there is a bug where python needs initializing before loading the
         * startup.blend because it may contain PyDrivers. It also needs to be after
         * initializing space types and other internal data.