Subversion Repositories Kolibri OS

Rev

Rev 6986 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6986 Rev 7032
Line 77... Line 77...
77
	dword start_x, line_length, stolbec_len;
77
	dword start_x, line_length, stolbec_len;
78
	
78
	
Line 79... Line 79...
79
	if (!header)
79
	if (!header)
80
	{
80
	{
81
		ChangeCharset("UTF-8", "CP866", #line);
-
 
82
		sprintf(#header, "%s - %s", #line, #version);
81
		strcpy(#header, #line);
83
		line = 0;
82
		line = 0;
84
		return;
83
		return;
85
	}
84
	}
86
	if (t_html) && (!t_body) return;
85
	if (t_html) && (!t_body) return;
Line 264... Line 263...
264
	if (istag("script")) || (istag("style")) || (istag("binary")) || (istag("select")) { ignor_text = opened; return; }
263
	if (istag("script")) || (istag("style")) || (istag("binary")) || (istag("select")) { ignor_text = opened; return; }
265
	if (istag("form")) if (!opened) ignor_text = false;
264
	if (istag("form")) if (!opened) ignor_text = false;
266
	if(istag("title")) {
265
	if(istag("title")) {
267
		if (opened) header=NULL;
266
		if (opened) header=NULL;
268
		else DrawTitle(#header);
267
		return;
269
		return;
-
 
270
	}
268
	}
271
	if (ignor_text) return;
269
	if (ignor_text) return;
272
	
270
	
Line 273... Line 271...
273
	IF(istag("q"))
271
	IF(istag("q"))
Line 290... Line 288...
290
				bg_color = GetColor(#val);
288
				bg_color = GetColor(#val);
291
				DrawBuf.Fill(bg_color);
289
				DrawBuf.Fill(bg_color);
292
			}
290
			}
293
		} while(GetNextParam());
291
		} while(GetNextParam());
294
		if (opened) && (cur_encoding==CH_NULL) debugln("Document has no information about encoding, UTF will be used");
292
		if (opened) && (cur_encoding==CH_NULL) {
-
 
293
			cur_encoding = CH_UTF8; 
-
 
294
			debugln("Document has no information about encoding, UTF will be used");
295
		return;
295
		}
-
 
296
		if (opened) {
-
 
297
			ChangeCharset(charsets[cur_encoding], "CP866", #header);
-
 
298
			sprintf(#header, "%s - %s", #header, #version);
-
 
299
			DrawTitle(#header);
-
 
300
		}
-
 
301
		return;
296
	}
302
	}
297
	if (istag("a")) {
303
	if (istag("a")) {
298
		if (opened)
304
		if (opened)
299
		{
305
		{
300
			if (link) IF(text_color_index > 0) text_color_index--; //åñëè ïðåäûäóùèé òåã à íå áûë çàêðûò
306
			if (link) IF(text_color_index > 0) text_color_index--; //åñëè ïðåäûäóùèé òåã à íå áûë çàêðûò
Line 421... Line 427...
421
}
427
}
422
 
428
 
Line 423... Line 429...
423
void TWebBrowser::BufEncode(dword set_new_encoding)
429
void TWebBrowser::BufEncode(dword set_new_encoding)
424
{
430
{
-
 
431
	if (cur_encoding == set_new_encoding) return;
425
	if (o_bufpointer==0)
432
	if (o_bufpointer==0)
426
	{
433
	{
427
		o_bufpointer = malloc(bufsize);
434
		o_bufpointer = malloc(bufsize);
428
		strcpy(o_bufpointer, bufpointer);
435
		strcpy(o_bufpointer, bufpointer);
429
	}
436
	}
430
	else
437
	else
431
	{
438
	{
432
		strcpy(bufpointer, o_bufpointer);
439
		strcpy(bufpointer, o_bufpointer);
433
	}
440
	}
-
 
441
	debugval("cur_encoding    ", cur_encoding);
434
	if (cur_encoding!=set_new_encoding) {
442
	debugval("set_new_encoding", set_new_encoding);
435
		cur_encoding = set_new_encoding;
443
	cur_encoding = set_new_encoding;
436
		debugln(charsets[cur_encoding]);
-
 
437
		bufpointer = ChangeCharset(charsets[cur_encoding], "CP866", bufpointer);
444
	bufpointer = ChangeCharset(charsets[cur_encoding], "CP866", bufpointer);
438
	}
445
}
439
}
-
 
440
//============================================================================================
446
//============================================================================================
441
void TWebBrowser::DrawScroller()
447
void TWebBrowser::DrawScroller()
442
{
448
{
443
	scroll_wv.max_area = list.count;
449
	scroll_wv.max_area = list.count;
444
	scroll_wv.cur_area = list.visible;
450
	scroll_wv.cur_area = list.visible;