Rev 6806 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6806 | Rev 7051 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | char ini_path[4096]; |
- | |
2 | char config_section[] = "Config"; |
1 | _ini ini = { "/sys/settings/txtread.ini", "Config" }; |
3 | int encoding; |
- | |
Line 4... | Line 2... | ||
4 | 2 | ||
5 | void LoadIniSettings() |
3 | void LoadIniSettings() |
6 | { |
4 | { |
7 | strcpy(#ini_path, "/sys/settings/txtread.ini"); |
- | |
8 | ini_get_int stdcall (#ini_path, #config_section, "FontSize", 14); kfont.size.pt = EAX; |
5 | kfont.size.pt = ini.GetInt("FontSize", 14); |
9 | ini_get_int stdcall (#ini_path, #config_section, "Encoding", CH_CP866); encoding = EAX; |
6 | encoding = ini.GetInt("Encoding", CH_CP866); |
10 | ini_get_int stdcall (#ini_path, #config_section, "WinX", 150); Form.left = EAX; |
7 | Form.left = ini.GetInt("WinX", 150); |
11 | ini_get_int stdcall (#ini_path, #config_section, "WinY", 50); Form.top = EAX; |
8 | Form.top = ini.GetInt("WinY", 50); |
12 | ini_get_int stdcall (#ini_path, #config_section, "WinW", 640); Form.width = EAX; |
9 | Form.width = ini.GetInt("WinW", 640); |
13 | ini_get_int stdcall (#ini_path, #config_section, "WinH", 560); Form.height = EAX; |
10 | Form.height = ini.GetInt("WinH", 560); |
Line 14... | Line 11... | ||
14 | } |
11 | } |
15 | 12 | ||
16 | void SaveIniSettings() |
13 | void SaveIniSettings() |
17 | { |
14 | { |
18 | ini_set_int stdcall (#ini_path, #config_section, "FontSize", kfont.size.pt); |
15 | ini.SetInt("FontSize", kfont.size.pt); |
19 | ini_set_int stdcall (#ini_path, #config_section, "Encoding", encoding); |
16 | ini.SetInt("Encoding", encoding); |
20 | ini_set_int stdcall (#ini_path, #config_section, "WinX", Form.left); |
17 | ini.SetInt("WinX", Form.left); |
21 | ini_set_int stdcall (#ini_path, #config_section, "WinY", Form.top); |
18 | ini.SetInt("WinY", Form.top); |
22 | ini_set_int stdcall (#ini_path, #config_section, "WinW", Form.width); |
19 | ini.SetInt("WinW", Form.width); |
23 | ini_set_int stdcall (#ini_path, #config_section, "WinH", Form.height); |
20 | ini.SetInt("WinH", Form.height); |