forked from mia/Aegisub
Load configuration before initializing commands, hotkeys and icons, as hotkeys uses ?user which may be changed by configuration loading
Originally committed to SVN as r6245.
This commit is contained in:
parent
d2d28401bd
commit
ba1a1dc737
1 changed files with 12 additions and 13 deletions
|
@ -152,19 +152,6 @@ bool AegisubApp::OnInit() {
|
||||||
emit_stdout->Enable();
|
emit_stdout->Enable();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string path(agi::Path::Config());
|
|
||||||
config::path = new agi::Path(path.append("path.json"), GET_DEFAULT_CONFIG(default_path));
|
|
||||||
|
|
||||||
|
|
||||||
// Init commands.
|
|
||||||
cmd::init_builtin_commands();
|
|
||||||
|
|
||||||
// Init hotkeys
|
|
||||||
hotkey::init();
|
|
||||||
|
|
||||||
// Init icons.
|
|
||||||
icon::icon_init();
|
|
||||||
|
|
||||||
// Set config file
|
// Set config file
|
||||||
StartupLog("Load configuration");
|
StartupLog("Load configuration");
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
|
@ -197,6 +184,18 @@ bool AegisubApp::OnInit() {
|
||||||
wxMessageBox("Configuration file is invalid. Error reported:\n" + lagi_wxString(err.GetMessage()), "Error");
|
wxMessageBox("Configuration file is invalid. Error reported:\n" + lagi_wxString(err.GetMessage()), "Error");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string path(agi::Path::Config());
|
||||||
|
config::path = new agi::Path(path.append("path.json"), GET_DEFAULT_CONFIG(default_path));
|
||||||
|
|
||||||
|
// Init commands.
|
||||||
|
cmd::init_builtin_commands();
|
||||||
|
|
||||||
|
// Init hotkeys
|
||||||
|
hotkey::init();
|
||||||
|
|
||||||
|
// Init icons.
|
||||||
|
icon::icon_init();
|
||||||
|
|
||||||
StartupLog("Load MRU");
|
StartupLog("Load MRU");
|
||||||
config::mru = new agi::MRUManager(STD_STR(StandardPaths::DecodePath("?user/mru.json")), GET_DEFAULT_CONFIG(default_mru));
|
config::mru = new agi::MRUManager(STD_STR(StandardPaths::DecodePath("?user/mru.json")), GET_DEFAULT_CONFIG(default_mru));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue