Subversion Repositories Kolibri OS

Rev

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

Rev 7422 Rev 7425
Line 77... Line 77...
77
 
77
 
Line 78... Line 78...
78
int action_buf;
78
int action_buf;
79
 
79
 
-
 
80
dword TOOLBAR_H = 40;
80
dword TOOLBAR_H = 40;
81
dword STATUSBAR_H = 15;
81
dword STATUSBAR_H = 15;
82
 
82
dword col_bg;
83
dword col_bg = 0xE3E2E2;
Line 83... Line 84...
83
dword panel_color;
84
dword panel_color  = 0xE3E2E2;
84
dword border_color;
85
dword border_color = 0x8C8C8C;
Line 85... Line 86...
85
 
86
 
Line 122... Line 123...
122
	load_dll(libio, #libio_init,1);
123
	load_dll(libio, #libio_init,1);
123
	load_dll(libimg, #libimg_init,1);
124
	load_dll(libimg, #libimg_init,1);
124
	load_dll(libHTTP, #http_lib_init,1);
125
	load_dll(libHTTP, #http_lib_init,1);
125
	load_dll(iconv_lib, #iconv_open,0);
126
	load_dll(iconv_lib, #iconv_open,0);
126
	Libimg_LoadImage(#skin, abspath("wv_skin.png"));
127
	Libimg_LoadImage(#skin, abspath("wv_skin.png"));
127
	SetSkinColors();
128
	wv_progress_bar.progress_color = 0x72B7EB;
128
	CreateDir("/tmp0/1/downloads");
129
	CreateDir("/tmp0/1/downloads");
129
	if (param) strcpy(#URL, #param); else strcpy(#URL, URL_SERVICE_HOME);
130
	if (param) strcpy(#URL, #param); else strcpy(#URL, URL_SERVICE_HOME);
130
	WB1.list.SetFont(8, 14, 10011000b);
131
	WB1.list.SetFont(8, 14, 10011000b);
131
	WB1.list.no_selection = true;
132
	WB1.list.no_selection = true;
132
	SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER + EVM_STACK);
133
	SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER + EVM_STACK);
Line 253... Line 254...
253
	DefineButton(address_box.left-52, address_box.top-2, 24, skin.h-2, BACK_BUTTON+BT_HIDE, 0);
254
	DefineButton(address_box.left-52, address_box.top-2, 24, skin.h-2, BACK_BUTTON+BT_HIDE, 0);
254
	DefineButton(address_box.left-27, address_box.top-2, 24, skin.h-2, FORWARD_BUTTON+BT_HIDE, 0);
255
	DefineButton(address_box.left-27, address_box.top-2, 24, skin.h-2, FORWARD_BUTTON+BT_HIDE, 0);
255
	img_draw stdcall(skin.image, address_box.left-53, address_box.top-3, 51, skin.h, 3, 0);
256
	img_draw stdcall(skin.image, address_box.left-53, address_box.top-3, 51, skin.h, 3, 0);
256
	DefineButton(address_box.left+address_box.width+1, address_box.top-3, 16, skin.h-1, REFRESH_BUTTON+BT_HIDE+BT_NOFRAME, 0);
257
	DefineButton(address_box.left+address_box.width+1, address_box.top-3, 16, skin.h-1, REFRESH_BUTTON+BT_HIDE+BT_NOFRAME, 0);
257
	DefineButton(Form.cwidth-27, address_box.top-3, 23, skin.h-1, SANDWICH_BUTTON+BT_HIDE, 0);
258
	DefineButton(Form.cwidth-27, address_box.top-3, 23, skin.h-1, SANDWICH_BUTTON+BT_HIDE, 0);
258
	img_draw stdcall(skin.image, Form.cwidth-24, address_box.top-3, 17, skin.h, 87, 0);
259
	img_draw stdcall(skin.image, Form.cwidth-24, address_box.top-3, 17, skin.h, 105, 0);
259
	DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, col_bg);
260
	DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, col_bg);
260
	DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, border_color);
261
	DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, border_color);
261
	if (!header) 
262
	if (!header) 
262
		OpenPage(); 
263
		OpenPage(); 
263
	else { 
264
	else { 
Line 477... Line 478...
477
{
478
{
478
	if (!strcmpi(#URL + strlen(#URL) - strlen(ext), ext)) return true;
479
	if (!strcmpi(#URL + strlen(#URL) - strlen(ext), ext)) return true;
479
	return false;
480
	return false;
480
}
481
}
Line 481... Line -...
481
 
-
 
482
int SetSkinColors()
-
 
483
{
-
 
484
	dword image_data;
-
 
485
	image_data = DSDWORD[skin.image+24];
-
 
486
	col_bg = DSDWORD[image_data];
-
 
487
	panel_color  = DSDWORD[skin.w*4*4 + image_data];
-
 
488
	border_color = DSDWORD[skin.w*4*7 + image_data];
-
 
489
	wv_progress_bar.progress_color = DSDWORD[skin.w*4*10 + image_data];
-
 
490
	$and col_bg, 0x00ffffff
-
 
491
	$and panel_color, 0x00ffffff
-
 
492
	$and border_color, 0x00ffffff
-
 
493
	$and wv_progress_bar.progress_color, 0x00ffffff
-
 
494
}
-
 
495
 
482
 
496
void DrawProgress()
483
void DrawProgress()
497
{
484
{
498
	dword persent;
485
	dword persent;
499
	if (http.transfer == 0) return;
486
	if (http.transfer == 0) return;