Subversion Repositories Kolibri OS

Rev

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

Rev 8762 Rev 8764
Line 1... Line 1...
1
#ifdef LANG_RUS
1
#ifdef LANG_RUS
2
	?define TITLE_SETT " áâனª¨"
2
	?define TITLE_SETT " áâனª¨"
3
	?define SHOW_DEVICE_CLASS "‚뢮¤¨âì ­ §¢ ­¨ï ª« áá  ãáâனáâ¢"
3
	?define SHOW_DEVICE_CLASS "‚뢮¤¨âì ­ §¢ ­¨ï ª« áá  ãáâனáâ¢"
4
	?define SHOW_STATUS_BAR "®ª §ë¢ âì áâ âãá ¡ à"
4
	?define SHOW_STATUS_BAR "®ª §ë¢ âì áâ âãá ¡ à"
5
	?define NOTIFY_COPY_END "“¢¥¤®¬«ïâì ® § ¢¥à襭¨¨ ª®¯¨à®¢ ­¨ï"
-
 
6
	?define SHOW_BREADCRUMBS "ˆá¯®«ì§®¢ âì 'å«¥¡­ë¥ ªà®èª¨'"
5
	?define SHOW_BREADCRUMBS "ˆá¯®«ì§®¢ âì 'å«¥¡­ë¥ ªà®èª¨'"
7
	?define BIG_ICONS "ˆá¯®«ì§®¢ âì ¡®«ì訥 ¨ª®­ª¨"
6
	?define BIG_ICONS "ˆá¯®«ì§®¢ âì ¡®«ì訥 ¨ª®­ª¨"
8
	?define USE_TWO_PANELS "„¢¥ ¯ ­¥«¨"
7
	?define USE_TWO_PANELS "„¢¥ ¯ ­¥«¨"
9
	?define COLORED_LINES "®¤á¢¥ç¨¢ âì ç¥â­ë¥ «¨­¨¨ ¢ ᯨ᪥"
8
	?define COLORED_LINES "®¤á¢¥ç¨¢ âì ç¥â­ë¥ «¨­¨¨ ¢ ᯨ᪥"
10
	?define FONT_SIZE_LABEL " §¬¥à èà¨äâ "
9
	?define FONT_SIZE_LABEL " §¬¥à èà¨äâ "
Line 16... Line 15...
16
#else
15
#else
17
	?define TITLE_SETT "Settings"
16
	?define TITLE_SETT "Settings"
18
	?define SHOW_DEVICE_CLASS "Show device class name"
17
	?define SHOW_DEVICE_CLASS "Show device class name"
19
	?define SHOW_STATUS_BAR "Show status bar"
18
	?define SHOW_STATUS_BAR "Show status bar"
20
	?define NOTIFY_COPY_END "Notify when copying finished"
19
	?define SHOW_BREADCRUMBS "Show breadcrumbs"
21
	?define SHOW_BREADCRUMBS "Show breadcrumbs"
-
 
22
	?define BIG_ICONS "Big icons in list"
20
	?define BIG_ICONS "Big icons in list"
23
	?define USE_TWO_PANELS "Two panels"
21
	?define USE_TWO_PANELS "Two panels"
24
	?define COLORED_LINES "Highlight even lines in list"
22
	?define COLORED_LINES "Highlight even lines in list"
25
	?define FONT_SIZE_LABEL "Font size"
23
	?define FONT_SIZE_LABEL "Font size"
26
	?define LIST_LINE_HEIGHT "List line height"
24
	?define LIST_LINE_HEIGHT "List line height"
Line 37... Line 35...
37
more_less_box font_size   = { NULL, 9, 22, FONT_SIZE_LABEL };
35
more_less_box font_size   = { NULL, 9, 22, FONT_SIZE_LABEL };
38
more_less_box line_height = { NULL, 16, 64, LIST_LINE_HEIGHT };
36
more_less_box line_height = { NULL, 16, 64, LIST_LINE_HEIGHT };
39
checkbox show_dev_name    = { SHOW_DEVICE_CLASS };
37
checkbox show_dev_name    = { SHOW_DEVICE_CLASS };
40
checkbox show_status_bar  = { SHOW_STATUS_BAR };
38
checkbox show_status_bar  = { SHOW_STATUS_BAR };
41
checkbox info_after_copy  = { NOTIFY_COPY_END };
-
 
42
checkbox show_breadcrumb  = { SHOW_BREADCRUMBS };
39
checkbox show_breadcrumb  = { SHOW_BREADCRUMBS };
43
checkbox big_icons        = { BIG_ICONS };
40
checkbox big_icons        = { BIG_ICONS };
44
checkbox two_panels       = { USE_TWO_PANELS };
41
checkbox two_panels       = { USE_TWO_PANELS };
45
checkbox colored_lines    = { COLORED_LINES };
42
checkbox colored_lines    = { COLORED_LINES };
Line 46... Line 43...
46
 
43
 
47
 
44
 
48
void settings_dialog()
45
void settings_dialog()
49
{   
46
{   
50
	proc_info Settings;
47
	proc_info Settings;
51
	int id;
48
	int id;
52
	active_settings=1;
49
	active_settings = true;
53
	font_size.value = kfont.size.pt;
50
	font_size.value = kfont.size.pt;
54
	line_height.value = files.item_h;
51
	line_height.value = files.item_h;
55
	SetEventMask(0x27);
52
	SetEventMask(0x27);
Line 64... Line 61...
64
				id=GetButtonID();
61
				id=GetButtonID();
65
				if (1==id) { ExitSettings(); break; }
62
				if (1==id) { ExitSettings(); break; }
66
				else if (id==5)
63
				else if (id==5)
67
				{
64
				{
68
					RunProgram("/sys/tinypad", "/sys/settings/assoc.ini");
65
					RunProgram("/sys/@open", "/sys/settings/assoc.ini");
69
					break;
66
					break;
70
				}
67
				}
71
				else if (id==6)
68
				else if (id==6)
72
				{
69
				{
73
					strcpy(#path_start,#path);
70
					strcpy(#path_start,#path);
74
					path_start_ed.size = path_start_ed.pos = strlen(#path_start);
71
					path_start_ed.size = path_start_ed.pos = strlen(#path_start);
Line 81... Line 78...
81
					SetDefaultPath(#path_start);
78
					SetDefaultPath(#path_start);
82
					break;
79
					break;
83
				}
80
				}
84
				show_dev_name.click(id);
81
				show_dev_name.click(id);
85
				info_after_copy.click(id);
82
				two_panels.click(id);
86
				two_panels.click(id);
-
 
87
				show_breadcrumb.click(id);
83
				show_breadcrumb.click(id);
88
				show_status_bar.click(id);
84
				show_status_bar.click(id);
89
				colored_lines.click(id);
85
				colored_lines.click(id);
90
				if (font_size.click(id)) { 
86
				if (font_size.click(id)) { 
91
					kfont.size.pt = font_size.value; 
87
					kfont.size.pt = font_size.value; 
Line 106... Line 102...
106
				break;
102
				break;
107
				
103
				
Line 108... Line 104...
108
			case evReDraw:
104
			case evReDraw:
109
				DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 400, 
105
				DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 400, 
110
					435+skin_height,0x34,sc.work,TITLE_SETT,0);
106
					365+skin_height,0x34,sc.work,TITLE_SETT,0);
111
				GetProcessInfo(#Settings, SelfInfo);
107
				GetProcessInfo(#Settings, SelfInfo);
112
				DrawSettingsCheckBoxes();
108
				DrawSettingsCheckBoxes();
113
		}
109
		}
114
	}
110
	}
115
}
111
}
Line 116... Line 112...
116
 
112
 
117
void ExitSettings()
113
void ExitSettings()
118
{
114
{
119
	active_settings = 0;
115
	active_settings = false;
120
	settings_window = 0;
116
	settings_window = 0;
121
	cmd_free = 4;
117
	cmd_free = 4;
122
	ExitProcess();
118
	ExitProcess();
Line 128... Line 124...
128
	int x=11, frx=26, but_x;
124
	int x=11, frx=26, but_x;
129
	y.n = 0;
125
	y.n = 0;
130
	show_dev_name.draw(x, y.inc(14));
126
	show_dev_name.draw(x, y.inc(14));
131
	show_status_bar.draw(x, y.inc(25));
127
	show_status_bar.draw(x, y.inc(25));
132
	info_after_copy.draw(x, y.inc(25));
128
	show_breadcrumb.draw(x, y.inc(25));
133
	show_breadcrumb.draw(x, y.inc(25));
-
 
134
	big_icons.draw(x, y.inc(25));
129
	big_icons.draw(x, y.inc(25));
135
	two_panels.draw(x, y.inc(25));
130
	//two_panels.draw(x, y.inc(25));
136
	colored_lines.draw(x, y.inc(25));
131
	colored_lines.draw(x, y.inc(25));
137
	font_size.draw(x, y.inc(31));
132
	font_size.draw(x, y.inc(31));
138
	line_height.draw(x, y.inc(31));
133
	line_height.draw(x, y.inc(31));
139
	
134
	
Line 140... Line 135...
140
	DrawFrame(x, y.inc(37), 340, 95, START_PATH);
135
	DrawFrame(x, y.inc(37), 340, 95, START_PATH);
Line 150... Line 145...
150
 
145
 
151
void LoadIniSettings()
146
void LoadIniSettings()
152
{
147
{
153
	ini.path = GetIni(#eolite_ini_path, "app.ini");
148
	ini.path = GetIni(#eolite_ini_path, "app.ini");
-
 
149
	if (efm) ini.section = "EFM"; else ini.section = "Eolite";
Line 154... Line 150...
154
	ini.section = "Eolite";
150
	two_panels.checked = efm;
155
 
151
 
156
	files.SetFont(6, 9, 10000000b);
152
	files.SetFont(6, 9, 10000000b);
157
	show_dev_name.checked   = ini.GetInt("ShowDeviceName", true); 
-
 
158
	show_status_bar.checked = ini.GetInt("ShowStatusBar", true); 
153
	show_dev_name.checked   = ini.GetInt("ShowDeviceName", true); 
159
	info_after_copy.checked = ini.GetInt("InfoAfterCopy", false); 
154
	show_status_bar.checked = ini.GetInt("ShowStatusBar", true); 
160
	big_icons.checked       = ini.GetInt("BigIcons", false); BigIconsSwitch();
155
	big_icons.checked       = ini.GetInt("BigIcons", false); BigIconsSwitch();
161
	two_panels.checked      = ini.GetInt("TwoPanels", false); 
156
	//two_panels.checked      = ini.GetInt("TwoPanels", false); 
162
	colored_lines.checked   = ini.GetInt("ColoredLines", false); 
157
	colored_lines.checked   = ini.GetInt("ColoredLines", false); 
163
	kfont.size.pt   = ini.GetInt("FontSize", 13); 
158
	kfont.size.pt   = ini.GetInt("FontSize", 13); 
164
	files.item_h    = ini.GetInt("LineHeight", 19);
159
	files.item_h    = ini.GetInt("LineHeight", 19);
165
	Form.left   = ini.GetInt("WinX", 200); 
160
	Form.left   = ini.GetInt("WinX", 100); 
166
	Form.top    = ini.GetInt("WinY", 50); 
161
	Form.top    = ini.GetInt("WinY", 30); 
167
	Form.width  = ini.GetInt("WinW", 550); 
162
	Form.width  = ini.GetInt("WinW", efm*170+550); 
168
	Form.height = ini.GetInt("WinH", 503); 
163
	Form.height = ini.GetInt("WinH", efm*116+503); 
169
	ini.GetString("DefaultPath", #path, 4096, "/rd/1");
164
	ini.GetString("DefaultPath", #path, 4096, "/rd/1");
Line 170... Line 165...
170
	ini.GetString("DefaultPath", #path_start, 4096, "/rd/1");
165
	ini.GetString("DefaultPath", #path_start, 4096, "/rd/1");
Line 180... Line 175...
180
void SaveIniSettings()
175
void SaveIniSettings()
181
{
176
{
182
	ini.SetInt("ShowDeviceName", show_dev_name.checked);
177
	ini.SetInt("ShowDeviceName", show_dev_name.checked);
183
	ini.SetInt("ShowStatusBar", show_status_bar.checked);
178
	ini.SetInt("ShowStatusBar", show_status_bar.checked);
184
	ini.SetInt("InfoAfterCopy", info_after_copy.checked);
-
 
185
	ini.SetInt("BigIcons", big_icons.checked);
179
	ini.SetInt("BigIcons", big_icons.checked);
186
	ini.SetInt("TwoPanels", two_panels.checked);
180
	//ini.SetInt("TwoPanels", two_panels.checked);
187
	ini.SetInt("ColoredLines", colored_lines.checked);
181
	ini.SetInt("ColoredLines", colored_lines.checked);
188
	ini.SetInt("FontSize", kfont.size.pt);
182
	ini.SetInt("FontSize", kfont.size.pt);
189
	ini.SetInt("LineHeight", files.item_h);
183
	ini.SetInt("LineHeight", files.item_h);
-
 
184
	if (Form.status_window<=2) {
190
	ini.SetInt("WinX", Form.left);
185
		ini.SetInt("WinX", Form.left);
191
	ini.SetInt("WinY", Form.top);
186
		ini.SetInt("WinY", Form.top);
192
	ini.SetInt("WinW", Form.width);
187
		ini.SetInt("WinW", Form.width);
193
	ini.SetInt("WinH", Form.height);
188
		ini.SetInt("WinH", Form.height);		
194
}
189
	}
-
 
190
}
Line 195... Line 191...
195
 
191
 
196
 
192