Subversion Repositories Kolibri OS

Rev

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

Rev 5710 Rev 5719
Line 6... Line 6...
6
	?define EDIT_FILE_ASSOCIATIONS "¥¤ ªâ¨à®¢ âì  áá®æ¨ æ¨¨ ä ©«®¢"
6
	?define EDIT_FILE_ASSOCIATIONS "¥¤ ªâ¨à®¢ âì  áá®æ¨ æ¨¨ ä ©«®¢"
7
	?define TITLE_SETT " áâனª¨"
7
	?define TITLE_SETT " áâனª¨"
8
	?define SHOW_DEVICE_CLASS "‚뢮¤¨âì ­ §¢ ­¨ï ª« áá  ãáâனáâ¢"
8
	?define SHOW_DEVICE_CLASS "‚뢮¤¨âì ­ §¢ ­¨ï ª« áá  ãáâனáâ¢"
9
	?define SHOW_REAL_NAMES "®ª §ë¢ âì ¨¬¥­  ä ©«®¢ ­¥ ¬¥­ïï ॣ¨áâà"
9
	?define SHOW_REAL_NAMES "®ª §ë¢ âì ¨¬¥­  ä ©«®¢ ­¥ ¬¥­ïï ॣ¨áâà"
10
	?define USE_BIG_FONTS "®«ì让 èà¨äâ (⮫쪮  ­£«¨©áª¨¥ ᨬ¢®«ë!)"
10
	?define USE_BIG_FONTS "®«ì让 èà¨äâ (⮫쪮  ­£«¨©áª¨¥ ᨬ¢®«ë!)"
-
 
11
	?define USE_TWO_PANELS "„¢¥ ¯ ­¥«¨"
11
	?define LIST_LINE_HEIGHT "‚ëá®â  áâப¨ ¢ ᯨ᪥"
12
	?define LIST_LINE_HEIGHT "‚ëá®â  áâப¨ ¢ ᯨ᪥"
12
	?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襭¨¨ ª®¯¨à®¢ ­¨ï"
13
	?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襭¨¨ ª®¯¨à®¢ ­¨ï"
13
	?define CANCEL_T "Žâ¬¥­ "
14
	?define CANCEL_T "Žâ¬¥­ "
14
	?define APPLY_T "à¨¬¥­¨âì"
15
	?define APPLY_T "à¨¬¥­¨âì"
15
	?define T_DOUBLE_CLICK "‚à¥¬ï ¤¢®©­®£® ª«¨ª  (¢ á®âëå)"
16
	?define T_DOUBLE_CLICK "‚à¥¬ï ¤¢®©­®£® ª«¨ª  (¢ á®âëå)"
Line 17... Line 18...
17
	?define EDIT_FILE_ASSOCIATIONS "Edit file associations"
18
	?define EDIT_FILE_ASSOCIATIONS "Edit file associations"
18
	?define TITLE_SETT "Settings"
19
	?define TITLE_SETT "Settings"
19
	?define SHOW_DEVICE_CLASS "Show device class name"
20
	?define SHOW_DEVICE_CLASS "Show device class name"
20
	?define SHOW_REAL_NAMES "Show real file names without changing case"
21
	?define SHOW_REAL_NAMES "Show real file names without changing case"
21
	?define USE_BIG_FONTS "Use big fonts (English characters only!)"
22
	?define USE_BIG_FONTS "Use big fonts (English characters only!)"
-
 
23
	?define USE_TWO_PANELS "Two panels"
22
	?define LIST_LINE_HEIGHT "List line height"
24
	?define LIST_LINE_HEIGHT "List line height"
23
	?define NOTIFY_COPY_END "Notify when copying finished"
25
	?define NOTIFY_COPY_END "Notify when copying finished"
24
	?define CANCEL_T "Cancel"
26
	?define CANCEL_T "Cancel"
25
	?define APPLY_T "Apply"
27
	?define APPLY_T "Apply"
26
	?define T_DOUBLE_CLICK "Double click time (in hundredths)"
28
	?define T_DOUBLE_CLICK "Double click time (in hundredths)"
Line 32... Line 34...
32
void settings_dialog()
34
void settings_dialog()
33
{   
35
{   
34
	byte id;
36
	byte id;
35
	proc_info settings_form;
37
	proc_info settings_form;
Line 36... Line 38...
36
	
38
	
Line 37... Line 39...
37
	dword save_show_dev_name,save_real_files_names_case, save_info_after_copy, save_use_big_fonts, save_files_h, save_DBLTime;
39
	dword save_show_dev_name,save_real_files_names_case, save_info_after_copy, save_use_big_fonts, save_two_panels, save_files_h, save_DBLTime;
38
	
40
	
Line 39... Line 41...
39
	if (active_settings){
41
	if (active_settings){
40
		EXIT_SETTING: 
42
		EXIT_SETTING: 
41
		
43
		
42
		show_dev_name         = save_show_dev_name;
44
		show_dev_name         = save_show_dev_name;
-
 
45
		real_files_names_case = save_real_files_names_case;
43
		real_files_names_case = save_real_files_names_case;
46
		info_after_copy       = save_info_after_copy;
44
		info_after_copy       = save_info_after_copy;
47
		use_big_fonts         = save_use_big_fonts;
Line 45... Line 48...
45
		use_big_fonts         = save_use_big_fonts;
48
		two_panels            = save_two_panels;
Line 54... Line 57...
54
	
57
	
55
	save_show_dev_name         = show_dev_name;
58
	save_show_dev_name         = show_dev_name;
56
	save_real_files_names_case = real_files_names_case;
59
	save_real_files_names_case = real_files_names_case;
57
	save_info_after_copy       = info_after_copy;
60
	save_info_after_copy       = info_after_copy;
-
 
61
	save_use_big_fonts         = use_big_fonts;
58
	save_use_big_fonts         = use_big_fonts;
62
	two_panels                 = two_panels;
59
	save_files_h               = files.line_h;
63
	save_files_h               = files.line_h;
Line 60... Line 64...
60
	save_DBLTime               = MOUSE_TIME;
64
	save_DBLTime               = MOUSE_TIME;
61
	
65
	
Line 84... Line 88...
84
				}
88
				}
85
				else if (id==20) show_dev_name ^= 1;
89
				else if (id==20) show_dev_name ^= 1;
86
				else if (id==21) real_files_names_case ^= 1;
90
				else if (id==21) real_files_names_case ^= 1;
87
				else if (id==22) info_after_copy ^= 1;
91
				else if (id==22) info_after_copy ^= 1;
88
				else if (id==23) { use_big_fonts ^= 1; BigFontsChange(); }
92
				else if (id==23) { use_big_fonts ^= 1; BigFontsChange(); }
-
 
93
				else if (id==24) two_panels ^= 1;
89
				else if (id==25) files.line_h++;
94
				else if (id==25) files.line_h++;
90
				else if (id==26) && (files.line_h>14) files.line_h--;
95
				else if (id==26) && (files.line_h>14) files.line_h--;
91
				else if (id==27) MOUSE_TIME++;
96
				else if (id==27) MOUSE_TIME++;
92
				else if (id==28) && (MOUSE_TIME>29) MOUSE_TIME--;
97
				else if (id==28) && (MOUSE_TIME>29) MOUSE_TIME--;
93
				EventRedrawWindow(Form.left,Form.top);
98
				EventRedrawWindow(Form.left,Form.top);
Line 103... Line 108...
103
					goto EXIT_SETTING;
108
					goto EXIT_SETTING;
104
				}
109
				}
105
				break;
110
				break;
Line 106... Line 111...
106
				
111
				
107
			case evReDraw:
112
			case evReDraw:
108
				DefineAndDrawWindow(Form.left + Form.width/2, Form.top + Form.height/2 - 75, 300, 234+GetSkinHeight(),0x34,system.color.work,TITLE_SETT);
113
				DefineAndDrawWindow(Form.left + Form.width/2-10, Form.top + Form.height/2 - 75, 300, 254+GetSkinHeight(),0x34,system.color.work,TITLE_SETT);
109
				GetProcessInfo(#settings_form, SelfInfo);
114
				GetProcessInfo(#settings_form, SelfInfo);
110
				DrawSettingsCheckBoxes();
115
				DrawSettingsCheckBoxes();
111
				DrawFlatButton(9, 166, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
116
				DrawFlatButton(9, 186, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
112
				DrawFlatButton(128, settings_form.cheight - 30, 70, 22, 10, 0xE4DFE1, APPLY_T);
117
				DrawFlatButton(128, settings_form.cheight - 30, 70, 22, 10, 0xE4DFE1, APPLY_T);
113
				DrawFlatButton(208, settings_form.cheight - 30, 70, 22, 11, 0xE4DFE1, CANCEL_T);
118
				DrawFlatButton(208, settings_form.cheight - 30, 70, 22, 11, 0xE4DFE1, CANCEL_T);
114
		}
119
		}
115
	}
120
	}
Line 119... Line 124...
119
{
124
{
120
	CheckBox2(10, 11, 20, SHOW_DEVICE_CLASS,  show_dev_name);
125
	CheckBox2(10, 11, 20, SHOW_DEVICE_CLASS,  show_dev_name);
121
	CheckBox2(10, 33, 21, SHOW_REAL_NAMES,  real_files_names_case);
126
	CheckBox2(10, 33, 21, SHOW_REAL_NAMES,  real_files_names_case);
122
	CheckBox2(10, 55, 22, NOTIFY_COPY_END,  info_after_copy);
127
	CheckBox2(10, 55, 22, NOTIFY_COPY_END,  info_after_copy);
123
	CheckBox2(10, 77, 23, USE_BIG_FONTS,  use_big_fonts); 
128
	CheckBox2(10, 77, 23, USE_BIG_FONTS,  use_big_fonts); 
-
 
129
	CheckBox2(10, 99, 24, USE_TWO_PANELS,  two_panels); 
124
	MoreLessBox(10, 104, 18, 25, 26, #system.color, files.line_h, LIST_LINE_HEIGHT);
130
	MoreLessBox(10, 124, 18, 25, 26, #system.color, files.line_h, LIST_LINE_HEIGHT);
125
	MoreLessBox(10, 134, 18, 27, 28, #system.color, MOUSE_TIME, T_DOUBLE_CLICK);
131
	MoreLessBox(10, 154, 18, 27, 28, #system.color, MOUSE_TIME, T_DOUBLE_CLICK);
126
}
132
}
Line 127... Line 133...
127
 
133
 
128
 
134
 
129
void LoadIniSettings()
135
void LoadIniSettings()
130
{
136
{
131
	ini_get_color stdcall (eolite_ini_path, #confir_section, "SelectionColor",   0x94AECE); col_selec = EAX;
137
	ini_get_color stdcall (eolite_ini_path, #confir_section, "SelectionColor",   0x94AECE); col_selec = EAX;
132
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "ShowDeviceName",    1); show_dev_name = EAX;
138
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "ShowDeviceName",    1); show_dev_name = EAX;
133
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "RealFileNamesCase", 0); real_files_names_case = EAX;
139
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "RealFileNamesCase", 0); real_files_names_case = EAX;
-
 
140
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "InfoAfterCopy",     0); info_after_copy = EAX;
134
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "InfoAfterCopy",     0); info_after_copy = EAX;
141
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "UseBigFonts",       0); use_big_fonts = EAX;
135
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "UseBigFonts",       0); use_big_fonts = EAX;
142
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "TwoPanels",         0); two_panels = EAX;
136
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "LineHeight",       18); files.line_h = EAX;
143
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "LineHeight",       18); files.line_h = EAX;
137
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "TimeDoubleClick",  50); MOUSE_TIME = EAX;
144
	ini_get_int stdcall   (eolite_ini_path, #confir_section, "TimeDoubleClick",  50); MOUSE_TIME = EAX;
Line 143... Line 150...
143
{
150
{
144
	ini_set_int stdcall (eolite_ini_path, #confir_section, "ShowDeviceName", show_dev_name);
151
	ini_set_int stdcall (eolite_ini_path, #confir_section, "ShowDeviceName", show_dev_name);
145
	ini_set_int stdcall (eolite_ini_path, #confir_section, "RealFileNamesCase", real_files_names_case);
152
	ini_set_int stdcall (eolite_ini_path, #confir_section, "RealFileNamesCase", real_files_names_case);
146
	ini_set_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", info_after_copy);
153
	ini_set_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", info_after_copy);
147
	ini_set_int stdcall (eolite_ini_path, #confir_section, "UseBigFonts", use_big_fonts);
154
	ini_set_int stdcall (eolite_ini_path, #confir_section, "UseBigFonts", use_big_fonts);
-
 
155
	ini_set_int stdcall (eolite_ini_path, #confir_section, "TwoPanels", two_panels);
148
	ini_set_int stdcall (eolite_ini_path, #confir_section, "LineHeight", files.line_h);
156
	ini_set_int stdcall (eolite_ini_path, #confir_section, "LineHeight", files.line_h);
149
	ini_set_int stdcall (eolite_ini_path, #confir_section, "TimeDoubleClick", MOUSE_TIME);
157
	ini_set_int stdcall (eolite_ini_path, #confir_section, "TimeDoubleClick", MOUSE_TIME);
150
}
158
}