From c8d984dbb78d8a86968dd7e542cfc93875071ceb Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Tue, 28 Feb 2012 22:10:01 +0000 Subject: [PATCH] HTMLv. GoBack button fix. git-svn-id: svn://kolibrios.org@2417 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/htmlv/browser/History.txt | 4 ++++ programs/network/htmlv/browser/include/history.h | 15 ++++----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/programs/network/htmlv/browser/History.txt b/programs/network/htmlv/browser/History.txt index b5481248af..5d54cdf9d3 100644 --- a/programs/network/htmlv/browser/History.txt +++ b/programs/network/htmlv/browser/History.txt @@ -1,3 +1,7 @@ +xx.xx.12 -- v0.7x -- 11.x +- исправлена работа кнопки "Назад". + + 27.02.12 -- v0.75 -- 11.? Кб - при закрытии HTMLv, downloader тоже завершается; - невозможно запустить больше одного downloader'a; diff --git a/programs/network/htmlv/browser/include/history.h b/programs/network/htmlv/browser/include/history.h index 51b05e1b27..79a0f78380 100644 --- a/programs/network/htmlv/browser/include/history.h +++ b/programs/network/htmlv/browser/include/history.h @@ -9,18 +9,11 @@ UrlsHistory BrowserHistory; void UrlsHistory::GoBack() { - WriteDebug(#UrlHistory); - //find_symbol(#UrlHistory, '|') - - j = strlen(#UrlHistory); - WHILE(UrlHistory[j] <>'|') && (j > 0) j--; - IF (j > 0) UrlHistory[j] = 0x00; - WHILE(UrlHistory[j] <>'|') && (j > 0) { - copystr(#UrlHistory[j], #URL); - j--; - } + j = find_symbol(#UrlHistory, '|') -1; //текущая страница + if (j<=0) return; UrlHistory[j] = 0x00; - + j = find_symbol(#UrlHistory, '|'); //предыдущая страница -> она нам и нужна + copystr(#UrlHistory + j, #URL); copystr(#URL, #editURL); WB1.ShowPage(#URL); }