Subversion Repositories Kolibri OS

Rev

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

Rev 6746 Rev 7037
Line 20... Line 20...
20
 
20
 
21
dword scr = FROM "scr.raw_8bit";
21
dword scr = FROM "scr.raw_8bit";
22
dword scr_pal[] = {0xFFFFFF,0xBBDDFF,0x4166B5,0xE0E4E6,0xAFBEDD,0xC4D4E8,0x52ACDD,0x000000,
22
dword scr_pal[] = {0xFFFFFF,0xBBDDFF,0x4166B5,0xE0E4E6,0xAFBEDD,0xC4D4E8,0x52ACDD,0x000000,
Line -... Line 23...
-
 
23
0xE9DAB2,0xC99811,0xFDF9D4,0xF8B93C,0xFDEEBE,0xFBEBA6,0xDFAF4F,0xF3D57C};
-
 
24
 
23
0xE9DAB2,0xC99811,0xFDF9D4,0xF8B93C,0xFDEEBE,0xFBEBA6,0xDFAF4F,0xF3D57C};
25
#define BTN_MANUAL_SEARCH 10
Line 24... Line 26...
24
 
26
 
Line 25... Line 27...
25
#define APP_PLUS_INI_PATH "/kolibrios/settings/app_plus.ini"
27
#define APP_PLUS_INI_PATH "/kolibrios/settings/app_plus.ini"
26
 
28
 
27
#define APP_PLUS_INI_NOT_EXISTS "'APP+\n/kolibrios/settings/app_plus.ini is not exists.\nProgram terminated.' -tE"
29
#define APP_PLUS_INI_NOT_EXISTS "'APP+\n/kolibrios/settings/app_plus.ini does not exists.\nProgram terminated.' -tE"
28
 
30
 
Line 47... Line 49...
47
			notify(APP_PLUS_INI_NOT_EXISTS);
49
			notify(APP_PLUS_INI_NOT_EXISTS);
48
		ExitProcess();
50
		ExitProcess();
49
	}
51
	}
50
}
52
}
Line 51... Line 53...
51
 
53
 
52
void RunAutosearch()
54
void WaitAutosearch()
53
{
-
 
54
	if (!CheckProcessExists("SEARCHAP")) io.run("/sys/SEARCHAP",0);
55
{
55
	while (CheckProcessExists("SEARCHAP")) pause(2);
56
	while (CheckProcessExists("SEARCHAP")) pause(2);
Line 56... Line 57...
56
}
57
}
57
 
58
 
58
void main()
59
void main()
Line 59... Line 60...
59
{
60
{
60
	word id;
61
	word id;
61
 
62
 
Line 62... Line 63...
62
	CheckKosMounted();
63
	CheckKosMounted();
63
	RunAutosearch();
64
	WaitAutosearch();
64
	CheckKosMounted();
65
	CheckKosMounted();
-
 
66
 
Line 65... Line 67...
65
 
67
	o_dialog.type = 2;
66
	o_dialog.type = 2;
68
	load_dll(Proc_lib, #OpenDialog_init,0);
67
	load_dll(Proc_lib, #OpenDialog_init,0);
69
	OpenDialog_init stdcall (#o_dialog);
68
	OpenDialog_init stdcall (#o_dialog);
70
	active_button_id = BTN_MANUAL_SEARCH;
69
 
71
 
70
	loop() switch(WaitEvent())
72
	loop() switch(WaitEvent())
71
	{	
73
	{	
72
		case evButton:
74
		case evButton:
73
			id=GetButtonID();               
-
 
74
			if (id==1) ExitProcess();
75
			id=GetButtonID();               
75
			if (id==10)
76
			if (id==1) ExitProcess();
76
			{
-
 
77
				OpenDialog_start stdcall (#o_dialog);
77
			if (id==BTN_MANUAL_SEARCH) EventManualSearch();
Line 78... Line 78...
78
				if (o_dialog.status) SetAdditionalSystemDirectory("kolibrios", #openfile_path+1);
78
			break;
79
				pause(3);
79
		case evKey:
80
				CheckKosMounted();
80
			GetKeys();
Line 100... Line 100...
100
	WriteTextLines(x,y.inc(50),0x90,system.color.work_text,DESCRIPTION_TEXT,20);
100
	WriteTextLines(x,y.inc(50),0x90,system.color.work_text,DESCRIPTION_TEXT,20);
Line 101... Line 101...
101
	
101
	
102
	PutPaletteImage(#scr,144,171,Form.cwidth-180,y.n,8,#scr_pal);
102
	PutPaletteImage(#scr,144,171,Form.cwidth-180,y.n,8,#scr_pal);
Line 103... Line 103...
103
	DrawRectangle(Form.cwidth-180-1,y.n-1, 144+1,171+1, system.color.work_graph);
103
	DrawRectangle(Form.cwidth-180-1,y.n-1, 144+1,171+1, system.color.work_graph);
-
 
104
	
-
 
105
	DrawStandartCaptButton(x, Form.cheight-66, BTN_MANUAL_SEARCH, MANUALLY_BUTTON_TEXT);
-
 
106
}
-
 
107
 
-
 
108
void EventManualSearch()
-
 
109
{
-
 
110
	OpenDialog_start stdcall (#o_dialog);
-
 
111
	if (o_dialog.status) SetAdditionalSystemDirectory("kolibrios", #openfile_path+1);
104
	
112
	pause(3);
Line 105... Line 113...
105
	DrawCaptButton(x,Form.cheight-66,300,30,10,system.color.work_button,system.color.work_button_text,MANUALLY_BUTTON_TEXT);
113
	CheckKosMounted();