Subversion Repositories Kolibri OS

Rev

Rev 2419 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2413 leency 1
struct UrlsHistory {
2
	byte UrlHistory[6000];
3
	void AddUrl();
4
	void GoBack();
5
	dword CurrentUrl();
6
};
7
 
8
UrlsHistory BrowserHistory;
9
 
10
void UrlsHistory::GoBack()
11
{
2417 leency 12
	j = find_symbol(#UrlHistory, '|') -1; //текущая страница
13
	if (j<=0) return;
2413 leency 14
	UrlHistory[j] = 0x00;
2417 leency 15
	j = find_symbol(#UrlHistory, '|'); //предыдущая страница -> она нам и нужна
16
	copystr(#UrlHistory + j, #URL);
2433 leency 17
 
2416 leency 18
	copystr(#URL, #editURL);
2433 leency 19
	za_kadrom = count = 0;
2419 leency 20
	if (!strcmp(get_URL_part(5),"http:"))) HttpLoad();
2413 leency 21
	WB1.ShowPage(#URL);
22
}
23
 
24
void UrlsHistory::AddUrl()
25
{
2418 leency 26
	if (strcmp(BrowserHistory.CurrentUrl(), #URL)==0) return; //если новый адресс = текущему
27
 
2413 leency 28
	IF (strlen(#UrlHistory)>6000) copystr(#UrlHistory+5000,#UrlHistory);
29
	copystr("|", #UrlHistory + strlen(#UrlHistory));
30
	copystr(#URL, #UrlHistory + strlen(#UrlHistory));
31
}
32
 
33
dword UrlsHistory::CurrentUrl()
34
{
35
	EAX=#UrlHistory + find_symbol(#UrlHistory, '|');
36
}