Subversion Repositories Kolibri OS

Rev

Rev 2419 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  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. {
  12.         j = find_symbol(#UrlHistory, '|') -1; //òåêóùàÿ ñòðàíèöà
  13.         if (j<=0) return;
  14.         UrlHistory[j] = 0x00;
  15.         j = find_symbol(#UrlHistory, '|'); //ïðåäûäóùàÿ ñòðàíèöà -> îíà íàì è íóæíà
  16.         copystr(#UrlHistory + j, #URL);
  17.        
  18.         copystr(#URL, #editURL);
  19.         za_kadrom = count = 0;
  20.         if (!strcmp(get_URL_part(5),"http:"))) HttpLoad();
  21.         WB1.ShowPage(#URL);
  22. }
  23.  
  24. void UrlsHistory::AddUrl()
  25. {
  26.         if (strcmp(BrowserHistory.CurrentUrl(), #URL)==0) return; //åñëè íîâûé àäðåññ = òåêóùåìó
  27.        
  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. }
  37.