| 19 | } |
| 20 | |
| 21 | void Config::LoadConfig() { |
| 22 | // general |
| 23 | command_line_ = GetIniString(L"general", L"command_line", L""); |
| 24 | launch_on_startup_ = GetIniString(L"general", L"launch_on_startup", L""); |
| 25 | launch_on_exit_ = GetIniString(L"general", L"launch_on_exit", L""); |
| 26 | user_data_dir_ = LoadDirPath(L"data"); |
| 27 | disk_cache_dir_ = LoadDirPath(L"cache"); |
| 28 | boss_key_ = GetIniString(L"general", L"boss_key", L""); |
| 29 | translate_key_ = GetIniString(L"general", L"translate_key", L""); |
| 30 | show_password_ = ::GetPrivateProfileIntW(L"general", L"show_password", 1, |
| 31 | GetIniPath().c_str()) != 0; |
| 32 | win32k_ = ::GetPrivateProfileIntW(L"general", L"win32k", 0, |
| 33 | GetIniPath().c_str()) != 0; |
| 34 | ignore_policies_ = ::GetPrivateProfileIntW(L"general", L"ignore_policies", 0, |
| 35 | GetIniPath().c_str()) != 0; |
| 36 | suppress_false_upgrade_notification_ = |
| 37 | ::GetPrivateProfileIntW(L"general", |
| 38 | L"suppress_false_upgrade_notification", 0, |
| 39 | GetIniPath().c_str()) != 0; |
| 40 | |
| 41 | // tabs |
| 42 | keep_last_tab_ = ::GetPrivateProfileIntW(L"tabs", L"keep_last_tab", 1, |
| 43 | GetIniPath().c_str()) != 0; |
| 44 | double_click_close_ = ::GetPrivateProfileIntW(L"tabs", L"double_click_close", |
| 45 | 1, GetIniPath().c_str()) != 0; |
| 46 | right_click_close_ = ::GetPrivateProfileIntW(L"tabs", L"right_click_close", 0, |
| 47 | GetIniPath().c_str()) != 0; |
| 48 | wheel_tab_ = ::GetPrivateProfileIntW(L"tabs", L"wheel_tab", 1, |
| 49 | GetIniPath().c_str()) != 0; |
| 50 | wheel_tab_when_press_rbutton_ = |
| 51 | ::GetPrivateProfileIntW(L"tabs", L"wheel_tab_when_press_rbutton", 1, |
| 52 | GetIniPath().c_str()) != 0; |
| 53 | open_url_new_tab_ = LoadOpenUrlNewTabMode(); |
| 54 | bookmark_new_tab_ = LoadBookmarkNewTabMode(); |
| 55 | new_tab_disable_ = ::GetPrivateProfileIntW(L"tabs", L"new_tab_disable", 1, |
| 56 | GetIniPath().c_str()) != 0; |
| 57 | disable_tab_name_ = GetIniString(L"tabs", L"new_tab_disable_name", L""); |
| 58 | disable_tab_names_ = StringSplit(disable_tab_name_, L',', L"\""); |
| 59 | |
| 60 | // keymapping |
| 61 | LoadKeyMappings(); |
| 62 | } |
| 63 | |
| 64 | void Config::LoadKeyMappings() { |
| 65 | std::vector<wchar_t> buffer(4096); |
nothing calls this directly
no test coverage detected