Subversion Repositories Kolibri OS

Rev

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

Rev 5575 Rev 5576
Line 10... Line 10...
10
	?define USE_BIG_FONTS "ˆá¯®«ì§®¢ âì 㢥«¨ç¥­­ë¥ èà¨äâë"
10
	?define USE_BIG_FONTS "ˆá¯®«ì§®¢ âì 㢥«¨ç¥­­ë¥ èà¨äâë"
11
	?define LIST_LINE_HEIGHT "‚ëá®â  áâப¨ ¢ ᯨ᪥"
11
	?define LIST_LINE_HEIGHT "‚ëá®â  áâப¨ ¢ ᯨ᪥"
12
	?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襭¨¨ ª®¯¨à®¢ ­¨ï"
12
	?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襭¨¨ ª®¯¨à®¢ ­¨ï"
13
	?define CANCEL_T "Žâ¬¥­ "
13
	?define CANCEL_T "Žâ¬¥­ "
14
	?define APPLY_T "à¨¬¥­¨âì"
14
	?define APPLY_T "à¨¬¥­¨âì"
-
 
15
	?define T_DOUBLE_CLICK "‚à¥¬ï ¤¢®©­®£® ª«¨ª  (¢ á®âëå)"
15
#else
16
#else
16
	?define EDIT_FILE_ASSOCIATIONS "Edit file associations"
17
	?define EDIT_FILE_ASSOCIATIONS "Edit file associations"
17
	?define TITLE_SETT "Settings"
18
	?define TITLE_SETT "Settings"
18
	?define SHOW_DEVICE_CLASS "Show device class name"
19
	?define SHOW_DEVICE_CLASS "Show device class name"
19
	?define SHOW_REAL_NAMES "Show real file names without changing case"
20
	?define SHOW_REAL_NAMES "Show real file names without changing case"
20
	?define USE_BIG_FONTS "Use big fonts"
21
	?define USE_BIG_FONTS "Use big fonts"
21
	?define LIST_LINE_HEIGHT "List line height"
22
	?define LIST_LINE_HEIGHT "List line height"
22
	?define NOTIFY_COPY_END "Notify when copying finished"
23
	?define NOTIFY_COPY_END "Notify when copying finished"
23
	?define CANCEL_T "Cancel"
24
	?define CANCEL_T "Cancel"
24
	?define APPLY_T "Apply"
25
	?define APPLY_T "Apply"
-
 
26
	?define T_DOUBLE_CLICK "Time double click (in hundredths)"
25
#endif
27
#endif
Line 26... Line 28...
26
 
28
 
Line 31... Line 33...
31
{   
33
{   
32
	byte id;
34
	byte id;
33
	unsigned int key;
35
	unsigned int key;
34
	proc_info settings_form;
36
	proc_info settings_form;
Line 35... Line 37...
35
	
37
	
36
	if (active_settings) ExitProcess();
38
	if (active_settings){cmd_free = 4;ExitProcess();}
-
 
39
	active_settings=1;
Line -... Line 40...
-
 
40
	SetEventMask(0x27);
37
	active_settings=1;
41
	
38
 
42
	loop(){
-
 
43
	switch(WaitEvent())
-
 
44
	{
-
 
45
		case evMouse:
39
	loop() switch(WaitEvent())
46
			
40
	{
47
		break;
41
		case evButton: 
48
		case evButton: 
42
				id=GetButtonID();
49
				id=GetButtonID();
43
				if (id==10)
50
				if (id==10)
44
				{
51
				{
45
					SaveIniSettings();
52
					SaveIniSettings();
-
 
53
					active_settings=0;
46
					active_settings=0;
54
					action_buf = 300;
47
					action_buf = 300;
55
					cmd_free = 4;
48
					ExitProcess();
56
					ExitProcess();
49
				}					
57
				}					
50
				if (id==1) || (id==11) 
58
				if (id==1) || (id==11) 
-
 
59
				{
51
				{
60
					active_settings=0;
52
					active_settings=0;
61
					cmd_free = 4;
53
					ExitProcess();
62
					ExitProcess();
54
				}
63
				}
55
				if (id==5)
64
				if (id==5)
Line 61... Line 70...
61
				if (id==21) real_files_names_case ^= 1;
70
				if (id==21) real_files_names_case ^= 1;
62
				if (id==22) info_after_copy ^= 1;
71
				if (id==22) info_after_copy ^= 1;
63
				if (id==23) use_big_fonts ^= 1;
72
				if (id==23) use_big_fonts ^= 1;
64
				if (id==25) files.line_h++;
73
				if (id==25) files.line_h++;
65
				if (id==26) && (files.line_h>8) files.line_h--;
74
				if (id==26) && (files.line_h>8) files.line_h--;
-
 
75
				if (id==27) MOUSE_TIME++;
-
 
76
				if (id==28) && (MOUSE_TIME>30) MOUSE_TIME--;
66
				DrawSettingsCheckBoxes();
77
				DrawSettingsCheckBoxes();
67
				break;
78
				break;
Line 68... Line 79...
68
				
79
				
69
		case evKey:
80
		case evKey:
70
				key = GetKey();
81
				key = GetKey();
71
				if (key==27)
82
				if (key==27)
72
				{
83
				{
73
					active_settings = 0;
84
					active_settings = 0;
-
 
85
					action_buf = 300;
74
					action_buf = 300;
86
					cmd_free = 4;
75
					ExitProcess();
87
					ExitProcess();
76
				}
88
				}
Line 77... Line 89...
77
				break;
89
				break;
78
			
90
			
79
		case evReDraw:
91
		case evReDraw:
80
				DefineAndDrawWindow(Form.left + 100, 150, 300, 232+GetSkinHeight(),0x34,sc.work,TITLE_SETT);
92
				DefineAndDrawWindow(Form.left + Form.width/2, Form.top + Form.height/2 - 75, 300, 232+GetSkinHeight(),0x34,sc.work,TITLE_SETT);
81
				GetProcessInfo(#settings_form, SelfInfo);
93
				GetProcessInfo(#settings_form, SelfInfo);
82
				DrawSettingsCheckBoxes();
94
				DrawSettingsCheckBoxes();
83
				DrawFlatButton(9, 138, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
95
				DrawFlatButton(9, 168, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
-
 
96
				DrawFlatButton(128, settings_form.cheight - 30, 70, 22, 10, 0xE4DFE1, APPLY_T);
84
				DrawFlatButton(128, settings_form.cheight - 34, 70, 22, 10, 0xE4DFE1, APPLY_T);
97
				DrawFlatButton(208, settings_form.cheight - 30, 70, 22, 11, 0xE4DFE1, CANCEL_T);
85
				DrawFlatButton(208, settings_form.cheight - 34, 70, 22, 11, 0xE4DFE1, CANCEL_T);
98
	}
Line 86... Line 99...
86
	}
99
	}
87
}
100
}
88
 
101
 
89
void DrawSettingsCheckBoxes()
102
void DrawSettingsCheckBoxes()
90
{
103
{
91
	CheckBox2(10, 11, 20, SHOW_DEVICE_CLASS,  show_dev_name);
104
	CheckBox2(10, 11, 20, SHOW_DEVICE_CLASS,  show_dev_name);
92
	CheckBox2(10, 33, 21, SHOW_REAL_NAMES,  real_files_names_case);
105
	CheckBox2(10, 33, 21, SHOW_REAL_NAMES,  real_files_names_case);
-
 
106
	CheckBox2(10, 55, 22, NOTIFY_COPY_END,  info_after_copy);
93
	CheckBox2(10, 55, 22, NOTIFY_COPY_END,  info_after_copy);
107
	CheckBox2(10, 77, 23, USE_BIG_FONTS,  use_big_fonts); 
Line 94... Line 108...
94
	CheckBox2(10, 77, 23, USE_BIG_FONTS,  use_big_fonts); 
108
	MoreLessBox(10, 104, 18, 25, 26, #sc, files.line_h, LIST_LINE_HEIGHT);
95
	MoreLessBox(10, 104, 18, 25, 26, #sc, files.line_h, LIST_LINE_HEIGHT);
109
	MoreLessBox(10, 134, 18, 27, 28, #sc, MOUSE_TIME, T_DOUBLE_CLICK);
Line 125... Line 139...
125
	ini_set_int stdcall (eolite_ini_path, #confir_section, "ShowDeviceName", show_dev_name);
139
	ini_set_int stdcall (eolite_ini_path, #confir_section, "ShowDeviceName", show_dev_name);
126
	ini_set_int stdcall (eolite_ini_path, #confir_section, "RealFileNamesCase", real_files_names_case);
140
	ini_set_int stdcall (eolite_ini_path, #confir_section, "RealFileNamesCase", real_files_names_case);
127
	ini_set_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", info_after_copy);
141
	ini_set_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", info_after_copy);
128
	ini_set_int stdcall (eolite_ini_path, #confir_section, "UseBigFonts", use_big_fonts);
142
	ini_set_int stdcall (eolite_ini_path, #confir_section, "UseBigFonts", use_big_fonts);
129
	ini_set_int stdcall (eolite_ini_path, #confir_section, "LineHeight", files.line_h);
143
	ini_set_int stdcall (eolite_ini_path, #confir_section, "LineHeight", files.line_h);
-
 
144
	ini_set_int stdcall (eolite_ini_path, #confir_section, "TimeDoubleClick", MOUSE_TIME);
130
}
145
}
Line 131... Line 146...
131
 
146
 
132
 
147
 
133
 
148
 
134
void Write_Error(int error_number)
149
void Write_Error(int error_number)
135
{
150
{
136
	char error_message[500];
151
	char error_message[500];
137
	dword ii;
152
	dword ii;
138
	if (files.current>=0) Line_ReDraw(0xFF0000, files.current);
-
 
139
	pause(5);
-
 
140
	strcpy(#error_message, "\"Eolite\n");
-
 
141
	ii = get_error(error_number);
153
	if (files.current>=0) Line_ReDraw(0xFF0000, files.current);
-
 
154
	pause(5);
142
	strcat(#error_message, ii);
155
	sprintf(#error_message,"\"%s\n%s\" -%s","Eolite",get_error(error_number),"tE");
Line 143... Line 156...
143
	strcat(#error_message, "\" -tE");
156
	notify(#error_message);
144
	notify(#error_message);
157