diff --git a/programs/cmm/TWB/TWB.c b/programs/cmm/TWB/TWB.c index 07af54b5f4..14d3d22f79 100644 --- a/programs/cmm/TWB/TWB.c +++ b/programs/cmm/TWB/TWB.c @@ -35,6 +35,7 @@ struct TWebBrowser { dword o_bufpointer; int cur_encoding, custom_encoding; bool link, t_html, t_body; + dword link_bg; dword bufpointer; dword bufsize; @@ -121,6 +122,7 @@ void TWebBrowser::SetPageDefaults() link_color_default = 0x0000FF; link_color_active = 0xFF0000; page_bg = 0xFFFFFF; + link_bg = 0xFFFFFF; style.bg_color = page_bg; DrawBuf.Fill(0, page_bg); PageLinks.Clear(); @@ -331,9 +333,10 @@ void TWebBrowser::SetStyle() { } if (tag.is("body")) { t_body = tag.opened; - if (value = tag.get_value_of("link=")) link_color_default = GetColor(value); - if (value = tag.get_value_of("alink=")) link_color_active = GetColor(value); - if (value = tag.get_value_of("text=")) text_colors[0]=GetColor(value); + if (value = tag.get_value_of("link=")) link_color_default = GetColor(value); + if (value = tag.get_value_of("alink=")) link_color_active = GetColor(value); + if (value = tag.get_value_of("bglink=")) link_bg=GetColor(value); + if (value = tag.get_value_of("text=")) text_colors[0]=GetColor(value); if (value = tag.get_value_of("bgcolor=")) { style.bg_color = page_bg = GetColor(value); DrawBuf.Fill(0, page_bg); @@ -358,9 +361,11 @@ void TWebBrowser::SetStyle() { { link = true; PageLinks.AddLink(value); + style.bg_color = link_bg; } } else { link = false; + style.bg_color = page_bg; } return; } diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index 3690d20280..1efd1b4ddc 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -390,12 +390,7 @@ void ProcessEvent(dword id__) EventSubmitOmnibox(); return; case REFRESH_BUTTON: - if (http.transfer) { - StopLoading(); - draw_window(); - } else { - OpenPage(history.current()); - } + EventRefreshPage(); return; case CHANGE_ENCODING: EventShowEncodingsList(); @@ -429,6 +424,7 @@ void ProcessEvent(dword id__) case CLEAR_CACHE: pages_cache.clear(); notify(#clear_cache_ok); + EventRefreshPage(); return; case IN_NEW_TAB: open_new_tab = true; @@ -811,6 +807,16 @@ void EventViewSource() EventOpenNewTab(history.current()); } +void EventRefreshPage() +{ + if (http.transfer) { + StopLoading(); + draw_window(); + } else { + OpenPage(history.current()); + } +} + dword GetFileSize(dword _path) { BDVK bdvk; diff --git a/programs/cmm/browser/texts.h b/programs/cmm/browser/texts.h index 60595a3b64..c5e65d74b2 100644 --- a/programs/cmm/browser/texts.h +++ b/programs/cmm/browser/texts.h @@ -1,4 +1,4 @@ -char version[]="WebView 2.47b"; +char version[]="WebView 2.48"; #ifdef LANG_RUS char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0"; diff --git a/programs/cmm/lib/obj/iconv.h b/programs/cmm/lib/obj/iconv.h index a5664340de..1073b296ae 100644 --- a/programs/cmm/lib/obj/iconv.h +++ b/programs/cmm/lib/obj/iconv.h @@ -16,7 +16,7 @@ $DD 2 dup 0 char aIconv_open[] = "iconv_open"; char aIconv[] = "iconv"; -char charsets[] = "UTF-8\0 KOI8-RU\0 CP1251\0 CP1252\0 ISO8859-5\0CP866 \0AUTO"; +char charsets[] = "UTF-8\0 KOI8-RU\0 CP1251\0 CP1252\0 ISO8859-5\0CP866\0 AUTO"; enum { CH_UTF8, CH_KOI8, CH_CP1251, CH_CP1252, CH_ISO8859_5, CH_CP866, CH_AUTO }; dword ChangeCharset(dword from_chs, to_chs, conv_buf) diff --git a/programs/cmm/lib/obj/libimg.h b/programs/cmm/lib/obj/libimg.h index c2113ab405..b1e3377fa0 100644 --- a/programs/cmm/lib/obj/libimg.h +++ b/programs/cmm/lib/obj/libimg.h @@ -195,9 +195,9 @@ struct _Image //NOTICE: DO NOT FORGET TO INIT libio AND libimg!!! #ifdef LANG_RUS -#define TEXT_FILE_SAVED_AS "'File saved as " -#else #define TEXT_FILE_SAVED_AS "'Файл сохранен как " +#else +#define TEXT_FILE_SAVED_AS "'File saved as " #endif :void save_image(dword _image_pointer, _w, _h, _path) {