Subversion Repositories Kolibri OS

Rev

Rev 7054 | Rev 7227 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7054 Rev 7202
Line 27... Line 27...
27
	?define EDIT_FILE_ASSOCIATIONS "Edit file associations"
27
	?define EDIT_FILE_ASSOCIATIONS "Edit file associations"
28
	?define START_PATH "Start path:"
28
	?define START_PATH "Start path:"
29
#endif
29
#endif
30
 
30
 
Line 31... Line -...
31
char config_section[] = "Config";
-
 
32
int WinX, WinY, WinW, WinH;
31
int WinX, WinY, WinW, WinH;
Line 33... Line 32...
33
 
32
 
34
dword set_mouse_dd;
33
dword set_mouse_dd;
35
char path_start[4096]="\0";
34
char path_start[4096]="\0";
Line 59... Line 58...
59
				{
58
				{
60
					strcpy(#path_start,#path);
59
					strcpy(#path_start,#path);
61
					path_start_ed.size = strlen(#path_start);
60
					path_start_ed.size = strlen(#path_start);
62
					path_start_ed.pos = strlen(#path_start);
61
					path_start_ed.pos = strlen(#path_start);
63
					ini_set_str stdcall (eolite_ini_path, #config_section, "DefaultPath", #path,strlen(#path));
62
					ini.SetString("DefaultPath", #path, strlen(#path));
64
					edit_box_draw stdcall (#path_start_ed);
63
					edit_box_draw stdcall (#path_start_ed);
65
					break;
64
					break;
66
				}
65
				}
67
				else if (id==7)
66
				else if (id==7)
68
				{
67
				{
69
					ini_set_str stdcall (eolite_ini_path, #config_section, "DefaultPath", #path_start,strlen(#path_start));
68
					ini.SetString("DefaultPath", #path_start,strlen(#path_start));
70
					break;
69
					break;
71
				}
70
				}
72
				else if (id==20) show_dev_name ^= 1;
71
				else if (id==20) show_dev_name ^= 1;
73
				else if (id==21) { action_buf=109; real_files_names_case ^= 1; }
72
				else if (id==21) { action_buf=109; real_files_names_case ^= 1; }
74
				else if (id==22) info_after_copy ^= 1;
73
				else if (id==22) info_after_copy ^= 1;
75
				else if (id==24) two_panels ^= true;
74
				else if (id==24) two_panels ^= true;
Line 128... Line 127...
128
 
127
 
Line 129... Line 128...
129
 
128
 
130
void LoadIniSettings()
129
void LoadIniSettings()
-
 
130
{
-
 
131
	ini.path = GetIni(#eolite_ini_path, "EOLITE.INI");
-
 
132
	ini.section = "Config";
131
{
133
 
132
	files.SetFont(6, 9, 10000000b);
134
	files.SetFont(6, 9, 10000000b);
133
	ini_get_int stdcall   (eolite_ini_path, #config_section, "ShowDeviceName",    1); show_dev_name = EAX;
135
	real_files_names_case = ini.GetInt("RealFileNamesCase", 1); 
134
	ini_get_int stdcall   (eolite_ini_path, #config_section, "ShowStatusBar",    1); show_status_bar = EAX;
136
	show_dev_name   = ini.GetInt("ShowDeviceName", 1); 
135
	ini_get_int stdcall   (eolite_ini_path, #config_section, "RealFileNamesCase", 1); real_files_names_case = EAX;
137
	show_status_bar = ini.GetInt("ShowStatusBar", 1); 
136
	ini_get_int stdcall   (eolite_ini_path, #config_section, "InfoAfterCopy",     0); info_after_copy = EAX;
138
	info_after_copy = ini.GetInt("InfoAfterCopy", 0); 
137
	ini_get_int stdcall   (eolite_ini_path, #config_section, "FontSize",         13); kfont.size.pt = EAX;
139
	kfont.size.pt   = ini.GetInt("FontSize", 13); 
138
	ini_get_int stdcall   (eolite_ini_path, #config_section, "TwoPanels",         0); two_panels = EAX;
140
	two_panels      = ini.GetInt("TwoPanels", 0); 
139
	ini_get_int stdcall   (eolite_ini_path, #config_section, "LineHeight",       19); files.item_h = EAX;
141
	files.item_h    = ini.GetInt("LineHeight", 19);
140
	ini_get_int stdcall   (eolite_ini_path, #config_section, "WinX", 200); WinX = EAX;
142
	WinX = ini.GetInt("WinX", 200); 
141
	ini_get_int stdcall   (eolite_ini_path, #config_section, "WinY", 50); WinY = EAX;
143
	WinY = ini.GetInt("WinY", 50); 
142
	ini_get_int stdcall   (eolite_ini_path, #config_section, "WinW", 550); WinW = EAX;
144
	WinW = ini.GetInt("WinW", 550); 
143
	ini_get_int stdcall   (eolite_ini_path, #config_section, "WinH", 506); WinH = EAX;
145
	WinH = ini.GetInt("WinH", 506); 
144
	ini_get_str stdcall   (eolite_ini_path, #config_section, "DefaultPath", #path,4096,"/rd/1");
146
	ini.GetString("DefaultPath", #path, 4096, "/rd/1");
145
	ini_get_str stdcall   (eolite_ini_path, #config_section, "DefaultPath", #path_start,4096,"/rd/1");
147
	ini.GetString("DefaultPath", #path_start, 4096, "/rd/1");
146
	path_start_ed.size = strlen(#path_start);
148
	path_start_ed.size = strlen(#path_start);
Line 147... Line 149...
147
	path_start_ed.pos = strlen(#path_start);
149
	path_start_ed.pos = strlen(#path_start);
148
 
150
 
Line 154... Line 156...
154
 
156
 
Line 155... Line 157...
155
 
157
 
156
void SaveIniSettings()
158
void SaveIniSettings()
157
{
159
{
158
	ini_set_int stdcall (eolite_ini_path, #config_section, "ShowDeviceName", show_dev_name);
160
	ini.SetInt("ShowDeviceName", show_dev_name);
159
	ini_set_int stdcall (eolite_ini_path, #config_section, "ShowStatusBar", show_status_bar);
161
	ini.SetInt("ShowStatusBar", show_status_bar);
160
	ini_set_int stdcall (eolite_ini_path, #config_section, "RealFileNamesCase", real_files_names_case);
162
	ini.SetInt("RealFileNamesCase", real_files_names_case);
161
	ini_set_int stdcall (eolite_ini_path, #config_section, "InfoAfterCopy", info_after_copy);
163
	ini.SetInt("InfoAfterCopy", info_after_copy);
162
	ini_set_int stdcall (eolite_ini_path, #config_section, "FontSize", kfont.size.pt);
164
	ini.SetInt("FontSize", kfont.size.pt);
163
	ini_set_int stdcall (eolite_ini_path, #config_section, "TwoPanels", two_panels);
165
	ini.SetInt("TwoPanels", two_panels);
164
	ini_set_int stdcall (eolite_ini_path, #config_section, "LineHeight", files.item_h);
166
	ini.SetInt("LineHeight", files.item_h);
165
	ini_set_int stdcall (eolite_ini_path, #config_section, "WinX", Form.left);
167
	ini.SetInt("WinX", Form.left);
166
	ini_set_int stdcall (eolite_ini_path, #config_section, "WinY", Form.top);
168
	ini.SetInt("WinY", Form.top);
167
	ini_set_int stdcall (eolite_ini_path, #config_section, "WinW", Form.width);
169
	ini.SetInt("WinW", Form.width);
168
	ini_set_int stdcall (eolite_ini_path, #config_section, "WinH", Form.height);
170
	ini.SetInt("WinH", Form.height);
Line 169... Line 171...
169
}
171
}