From a2554b0cacb6b0f05bbc86ff97a4119d4539f9a2 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 23 Mar 2014 17:33:24 +0000 Subject: [PATCH] WebView: fix #2 for clicking URLs while page loading git-svn-id: svn://kolibrios.org@4687 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/browser/WebView.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index 95bfa40996..cd16b5ea49 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -243,6 +243,7 @@ void main() http_free stdcall (http_transfer); http_transfer=0; PageLinks.GetAbsoluteURL(#URL); + BrowserHistory.current--; strcpy(#editURL, #URL); OpenPage(); } @@ -463,6 +464,12 @@ void Scan(int id) void ProcessLinks(int id) { + if (http_transfer > 0) + { + StopLoading(); + BrowserHistory.current--; + } + strcpy(#URL, PageLinks.GetURL(id-401)); //$1 - Condition Script if (URL[0] == '$') @@ -548,6 +555,7 @@ void OpenPage() { StopLoading(); strcpy(#editURL, #URL); + BrowserHistory.AddUrl(); if (strncmp(#URL,"WebView:",8)==0) return; if (strncmp(#URL,"http:",5)==0) { @@ -565,7 +573,6 @@ void OpenPage() } else { - BrowserHistory.AddUrl(); file_size stdcall (#URL); bufsize = EBX; if (bufsize)