Subversion Repositories Kolibri OS

Rev

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

Rev 6001 Rev 6021
Line 216... Line 216...
216
						if (redirected>0)
216
						if (redirected>0)
217
						{
217
						{
218
							http_free stdcall (http_transfer);
218
							http_free stdcall (http_transfer);
219
							http_transfer=0;
219
							http_transfer=0;
220
							GetAbsoluteURL(#URL);
220
							GetAbsoluteURL(#URL);
221
							History.back();
221
							history.back();
222
							strcpy(#editURL, #URL);
222
							strcpy(#editURL, #URL);
223
							DrawEditBox();
223
							DrawEditBox();
224
							OpenPage();
224
							OpenPage();
225
						}
225
						}
226
						else
226
						else
227
						{
227
						{
228
							History.add(#URL);
228
							history.add(#URL);
229
							ESI = http_transfer;
229
							ESI = http_transfer;
230
							bufpointer = ESI.http_msg.content_ptr;
230
							bufpointer = ESI.http_msg.content_ptr;
231
							bufsize = ESI.http_msg.content_received;
231
							bufsize = ESI.http_msg.content_received;
232
							http_free stdcall (http_transfer);
232
							http_free stdcall (http_transfer);
233
							http_transfer=0;
233
							http_transfer=0;
Line 293... Line 293...
293
	if (WB1.list.ProcessKey(id__)) WB1.DrawPage();
293
	if (WB1.list.ProcessKey(id__)) WB1.DrawPage();
294
	else switch (id__)
294
	else switch (id__)
295
	{
295
	{
296
		case SCAN_CODE_BS:
296
		case SCAN_CODE_BS:
297
		case BACK_BUTTON:
297
		case BACK_BUTTON:
298
			if (History.back()) {
298
			if (history.back()) {
299
				strcpy(#URL, History.current());
299
				strcpy(#URL, history.current());
300
				OpenPage();
300
				OpenPage();
301
			}
301
			}
302
			return;
302
			return;
303
		case FORWARD_BUTTON:
303
		case FORWARD_BUTTON:
304
			if (History.forward()) {
304
			if (history.forward()) {
305
				strcpy(#URL, History.current());
305
				strcpy(#URL, history.current());
306
				OpenPage();
306
				OpenPage();
307
			}
307
			}
308
			return;
308
			return;
309
		case GOTOURL_BUTTON:
309
		case GOTOURL_BUTTON:
310
		case SCAN_CODE_ENTER:
310
		case SCAN_CODE_ENTER:
Line 398... Line 398...
398
void OpenPage()
398
void OpenPage()
399
{
399
{
400
	StopLoading();
400
	StopLoading();
401
	souce_mode = false;
401
	souce_mode = false;
402
	strcpy(#editURL, #URL);
402
	strcpy(#editURL, #URL);
403
	History.add(#URL);
403
	history.add(#URL);
404
	if (!strncmp(#URL,"WebView:",8))
404
	if (!strncmp(#URL,"WebView:",8))
405
	{
405
	{
406
		SetPageDefaults();
406
		SetPageDefaults();
407
		if (!strcmp(#URL, URL_SERVICE_HOME)) WB1.LoadInternalPage(#homepage, sizeof(homepage));
407
		if (!strcmp(#URL, URL_SERVICE_HOME)) WB1.LoadInternalPage(#homepage, sizeof(homepage));
408
		else if (!strcmp(#URL, URL_SERVICE_HISTORY)) ShowHistory();
408
		else if (!strcmp(#URL, URL_SERVICE_HISTORY)) ShowHistory();
Line 496... Line 496...
496
void ClickLink()
496
void ClickLink()
497
{
497
{
498
	if (http_transfer > 0) 
498
	if (http_transfer > 0) 
499
	{
499
	{
500
		StopLoading();
500
		StopLoading();
501
		History.back();
501
		history.back();
502
	}
502
	}
Line 503... Line 503...
503
 
503
 
504
	strcpy(#URL, PageLinks.GetURL(PageLinks.active));	
504
	strcpy(#URL, PageLinks.GetURL(PageLinks.active));	
505
	//#1
505
	//#1
506
	if (URL[0] == '#')
506
	if (URL[0] == '#')
507
	{
507
	{
508
		strcpy(#anchor, #URL+strrchr(#URL, '#'));		
508
		strcpy(#anchor, #URL+strrchr(#URL, '#'));		
509
		strcpy(#URL, History.current());
509
		strcpy(#URL, history.current());
510
		WB1.list.first=WB1.list.count-WB1.list.visible;
510
		WB1.list.first=WB1.list.count-WB1.list.visible;
511
		ShowPage();
511
		ShowPage();
512
		return;
512
		return;
513
	}
513
	}
Line 528... Line 528...
528
		{
528
		{
529
			strcpy(#downloader_edit, #URL);
529
			strcpy(#downloader_edit, #URL);
530
			CreateThread(#Downloader,#downloader_stak+4092);
530
			CreateThread(#Downloader,#downloader_stak+4092);
531
		}
531
		}
532
		else RunProgram("@open", #URL);
532
		else RunProgram("@open", #URL);
533
		strcpy(#editURL, History.current());
533
		strcpy(#editURL, history.current());
534
		strcpy(#URL, History.current());
534
		strcpy(#URL, history.current());
535
		return;
535
		return;
536
	}
536
	}
537
	if (!strncmp(#URL,"mailto:", 7))
537
	if (!strncmp(#URL,"mailto:", 7))
538
	{
538
	{
539
		notify(#URL);
539
		notify(#URL);
540
		strcpy(#editURL, History.current());
540
		strcpy(#editURL, history.current());
541
		strcpy(#URL, History.current());
541
		strcpy(#URL, history.current());
542
		return;
542
		return;
543
	}
543
	}
544
	OpenPage();
544
	OpenPage();
545
	return;
545
	return;
546
}
546
}