Subversion Repositories Kolibri OS

Rev

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

Rev 5428 Rev 5435
Line 1... Line 1...
1
//Leency 2008-2015
1
//Leency 2008-2015
Line 2... Line 2...
2
 
2
 
Line 3... Line 3...
3
#define EDITOR_PATH     "/sys/tinypad"
3
#define EDITOR_PATH     "/sys/tinypad"
-
 
4
 
4
 
5
#ifdef LANG_RUS
5
#ifdef LANG_RUS
6
	?define EDIT_FILE_ASSOCIATIONS "¥¤ ªâ¨à®¢ âì  áá®æ¨ æ¨¨ ä ©«®¢"
6
	?define TITLE_SETT " áâனª¨"
7
	?define TITLE_SETT " áâனª¨"
7
	?define SET_1 "‚뢮¤¨âì ­ §¢ ­¨ï ª« áá  ãáâனáâ¢"
8
	?define SET_1 "‚뢮¤¨âì ­ §¢ ­¨ï ª« áá  ãáâனáâ¢"
8
	?define SET_2 "®ª §ë¢ âì ¨¬¥­  ä ©«®¢ ­¥ ¬¥­ïï ॣ¨áâà"
9
	?define SET_2 "®ª §ë¢ âì ¨¬¥­  ä ©«®¢ ­¥ ¬¥­ïï ॣ¨áâà"
9
	?define SET_3 "‚ëá®â  áâப¨ ¢ ᯨ᪥"
10
	?define SET_3 "‚ëá®â  áâப¨ ¢ ᯨ᪥"
10
	?define CANCEL_T "Žâ¬¥­ "
11
	?define CANCEL_T "Žâ¬¥­ "
-
 
12
	?define APPLY_T "à¨¬¥­¨âì"
11
	?define APPLY_T "à¨¬¥­¨âì"
13
#else
12
#else
14
	?define EDIT_FILE_ASSOCIATIONS "Edit file associations"
13
	?define TITLE_SETT "Settings"
15
	?define TITLE_SETT "Settings"
14
	?define SET_1 "Show device class name"
16
	?define SET_1 "Show device class name"
15
	?define SET_2 "Show real file names without changing case"
17
	?define SET_2 "Show real file names without changing case"
16
	?define SET_3 "List line height"
18
	?define SET_3 "List line height"
17
	?define CANCEL_T "Cancel"
19
	?define CANCEL_T "Cancel"
Line 18... Line 20...
18
	?define APPLY_T "Apply"
20
	?define APPLY_T "Apply"
19
#endif
21
#endif
20
 
22
 
21
int	mouse_ddd;
23
int	mouse_ddd;
22
char lineh_s[30]="18\0";
24
char lineh_s[30]="18\0";
Line 23... Line 25...
23
edit_box LineHeight_ed = {50,10,70,0xffffff,0x94AECE,0x9098B0,0x9098B0,2,4,#lineh_s,#mouse_ddd, 1000000000000010b,2,2};
25
edit_box LineHeight_ed = {52,10,70,0xffffff,0x94AECE,0xffc90E,0xffffff,2,4,#lineh_s,#mouse_ddd, 1000000000000000b,2,2};
24
checkbox2 ShowDeviceName_chb = {10*65536+15, 10*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_1, 110b};
26
checkbox2 ShowDeviceName_chb = {10*65536+15, 10*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_1, 110b};
25
checkbox2 RealFileNamesCase_chb = {10*65536+15, 30*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_2, 100b};
27
checkbox2 RealFileNamesCase_chb = {10*65536+15, 30*65536+15, 5, 0xffffff, 0x9098B0, 0x80000000, SET_2, 100b};
26
 
28
 
-
 
29
void settings_dialog()
27
void settings_dialog()
30
{   
28
{   
31
	byte id;
29
	byte id;
32
	unsigned int key;
30
	unsigned int key;
33
	proc_info settings_form;
31
	dword eolite_ini_path = abspath("Eolite.ini");
34
	dword eolite_ini_path = abspath("Eolite.ini");
Line 50... Line 53...
50
				if (id==1) || (id==11) 
53
				if (id==1) || (id==11) 
51
				{
54
				{
52
					active_about=0;
55
					active_about=0;
53
					ExitProcess();
56
					ExitProcess();
54
				}
57
				}
-
 
58
				if (id==5)
-
 
59
				{
-
 
60
					RunProgram("tinypad", "/sys/settings/assoc.ini");
-
 
61
				}
55
				break;
62
				break;
Line 56... Line 63...
56
				
63
				
57
		case evKey:
64
		case evKey:
58
				key = GetKey();
65
				key = GetKey();
Line 72... Line 79...
72
				edit_box_mouse stdcall (#LineHeight_ed);
79
				edit_box_mouse stdcall (#LineHeight_ed);
73
				break;
80
				break;
Line 74... Line 81...
74
			
81
			
75
		case evReDraw:
82
		case evReDraw:
-
 
83
				DefineAndDrawWindow(Form.left + 100, 150, 300, 200+GetSkinHeight(),0x34,sc.work,TITLE_SETT);
Line 76... Line 84...
76
				DefineAndDrawWindow(Form.left + 100, 150, 300, 200+GetSkinHeight(),0x34,sc.work,TITLE_SETT);
84
				GetProcessInfo(#settings_form, SelfInfo);
77
				
85
				
Line 78... Line 86...
78
				if (show_dev_name) ShowDeviceName_chb.flags = 110b;
86
				if (show_dev_name) ShowDeviceName_chb.flags = 110b;
Line 85... Line 93...
85
				strcpy(#lineh_s, key);
93
				strcpy(#lineh_s, key);
Line 86... Line 94...
86
				
94
				
87
				check_box_draw stdcall (#ShowDeviceName_chb);
95
				check_box_draw stdcall (#ShowDeviceName_chb);
88
				check_box_draw stdcall (#RealFileNamesCase_chb);
96
				check_box_draw stdcall (#RealFileNamesCase_chb);
-
 
97
				edit_box_draw stdcall (#LineHeight_ed);
89
				edit_box_draw stdcall (#LineHeight_ed);
98
				DrawRectangle(LineHeight_ed.left-1, LineHeight_ed.top-1, LineHeight_ed.width+2, 16, sc.work_graph);
-
 
99
				WriteText(10, 57, 0x80, 0x000000, SET_3);
90
				WriteText(10, 55, 0x80, 0x000000, SET_3);
100
				DrawFlatButton(9, 100, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
91
				DrawFlatButton(128,160,70,22,10,0xE4DFE1, APPLY_T);
101
				DrawFlatButton(128, settings_form.cheight - 34, 70, 22, 10, 0xE4DFE1, APPLY_T);
92
				DrawFlatButton(208,160,70,22,11,0xE4DFE1, CANCEL_T);
102
				DrawFlatButton(208, settings_form.cheight - 34, 70, 22, 11, 0xE4DFE1, CANCEL_T);
93
	}
103
	}
Line 94... Line 104...
94
}
104
}