Rev 5793 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5793 | Rev 7051 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | enum { |
2 | enum { |
3 | THEME_DARK, |
3 | THEME_DARK, |
4 | THEME_LIGHT |
4 | THEME_LIGHT |
5 | }; |
5 | }; |
Line 6... | Line 6... | ||
6 | 6 | ||
- | 7 | char pathini[4096]; |
|
Line 7... | Line 8... | ||
7 | char config_section[] = "Config"; |
8 | _ini ini = { "/sys/media/pixie/pixie.ini", "Config" }; |
8 | 9 | ||
- | 10 | void LoadIniConfig() |
|
- | 11 | { |
|
- | 12 | dword temp = abspath("pixie.ini"); |
|
9 | void LoadIniConfig() |
13 | strcpy(#pathini, temp); |
10 | { |
14 | ini.path = #pathini; |
11 | ini_get_int stdcall (#pixie_ini_path, #config_section, "current_theme", THEME_DARK); current_theme = EAX; |
15 | current_theme = ini.GetInt("current_theme", THEME_DARK); |
12 | ini_get_int stdcall (#pixie_ini_path, #config_section, "window_mode", WINDOW_MODE_NORMAL); window_mode = EAX; |
16 | window_mode = ini.GetInt("window_mode", WINDOW_MODE_NORMAL); |
13 | ini_get_int stdcall (#pixie_ini_path, #config_section, "win_x_normal", 100); win_x_normal = EAX; |
17 | win_x_normal = ini.GetInt("win_x_normal", 100); |
14 | ini_get_int stdcall (#pixie_ini_path, #config_section, "win_y_normal", 90); win_y_normal = EAX; |
18 | win_y_normal = ini.GetInt("win_y_normal", 90); |
15 | ini_get_int stdcall (#pixie_ini_path, #config_section, "win_x_small", -1); win_x_small = EAX; |
19 | win_x_small = ini.GetInt("win_x_small", -1); |
Line 16... | Line 20... | ||
16 | ini_get_int stdcall (#pixie_ini_path, #config_section, "win_y_small", -1); win_y_small = EAX; |
20 | win_y_small = ini.GetInt("win_y_small", -1); |
17 | ini_get_str stdcall (#pixie_ini_path, #config_section, "last_folder", #work_folder, sizeof(work_folder), 0); |
21 | ini.GetString("last_folder", #work_folder, sizeof(work_folder), 0); |
18 | 22 | ||
19 | if (current_theme == THEME_DARK) SetColorThemeDark(); else SetColorThemeLight(); |
23 | if (current_theme == THEME_DARK) SetColorThemeDark(); else SetColorThemeLight(); |
Line 31... | Line 35... | ||
31 | if (window_mode == WINDOW_MODE_SMALL) |
35 | if (window_mode == WINDOW_MODE_SMALL) |
32 | { |
36 | { |
33 | win_x_small = Form.left; |
37 | win_x_small = Form.left; |
34 | win_y_small = Form.top; |
38 | win_y_small = Form.top; |
35 | } |
39 | } |
36 | ini_set_int stdcall (#pixie_ini_path, #config_section, "current_theme", current_theme); |
40 | ini.SetInt("current_theme", current_theme); |
37 | ini_set_int stdcall (#pixie_ini_path, #config_section, "window_mode", window_mode); |
41 | ini.SetInt("window_mode", window_mode); |
38 | ini_set_int stdcall (#pixie_ini_path, #config_section, "win_x_normal", win_x_normal); |
42 | ini.SetInt("win_x_normal", win_x_normal); |
39 | ini_set_int stdcall (#pixie_ini_path, #config_section, "win_y_normal", win_y_normal); |
43 | ini.SetInt("win_y_normal", win_y_normal); |
40 | ini_set_int stdcall (#pixie_ini_path, #config_section, "win_x_small", win_x_small); |
44 | ini.SetInt("win_x_small", win_x_small); |
41 | ini_set_int stdcall (#pixie_ini_path, #config_section, "win_y_small", win_y_small); |
45 | ini.SetInt("win_y_small", win_y_small); |
42 | ini_set_str stdcall (#pixie_ini_path, #config_section, "last_folder", #work_folder, strlen(#work_folder)); |
46 | ini.SetString("last_folder", #work_folder, strlen(#work_folder)); |
43 | } |
47 | } |
Line 44... | Line 48... | ||
44 | 48 | ||
45 | struct struct_pixie_colors { |
49 | struct struct_pixie_colors { |
46 | dword color_top_panel_text, |
50 | dword color_top_panel_text, |