From 52e6b02de2646b7417ff69a579e87ce6c152c953 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Thu, 16 Apr 2020 06:39:58 +0000 Subject: [PATCH] browser bugfixes git-svn-id: svn://kolibrios.org@7799 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/TWB/TWB.c | 2 +- programs/cmm/browser/WebView.c | 3 ++- programs/cmm/browser/tabs.h | 4 ++-- programs/cmm/browser/texts.h | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/programs/cmm/TWB/TWB.c b/programs/cmm/TWB/TWB.c index 0723778f4d..07178da326 100644 --- a/programs/cmm/TWB/TWB.c +++ b/programs/cmm/TWB/TWB.c @@ -341,7 +341,7 @@ void TWebBrowser::SetStyle() { // Autodetecting encoding if no encoding was set if (tag.opened) && (custom_encoding==-1) && (cur_encoding == CH_CP866) { if (strstr(bufpointer, "\208\190")) ChangeEncoding(CH_UTF8); - else if (chrnum(bufpointer, '\x246')>5) ChangeEncoding(CH_CP1251); + else if (chrnum(bufpointer, '\246')>5) ChangeEncoding(CH_CP1251); } return; } diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index 74a473bbda..0054547a53 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -701,6 +701,7 @@ void LoadInternalPage(dword _bufdata, _in_bufsize){ DrawActiveTab(); if (source_mode) { source_mode = false; + WB1.custom_encoding = CH_CP866; ShowSource(WB1.bufpointer, _in_bufsize); } else { WB1.DrawPage(); @@ -708,7 +709,7 @@ void LoadInternalPage(dword _bufdata, _in_bufsize){ } } -byte UrlExtIs(dword base, ext) +bool UrlExtIs(dword base, ext) { if (!strcmpi(base + strlen(base) - strlen(ext), ext)) return true; return false; diff --git a/programs/cmm/browser/tabs.h b/programs/cmm/browser/tabs.h index 946a07f7b0..55b0e8c7ac 100644 --- a/programs/cmm/browser/tabs.h +++ b/programs/cmm/browser/tabs.h @@ -134,7 +134,7 @@ void DrawTabsBar() { dword i; tab_w = GetTabWidth(); - for (i=0; i