forked from KolibriOS/kolibrios
WebView: refresh the page of clear cache, bugfixes
git-svn-id: svn://kolibrios.org@7893 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
b88f3e2118
commit
88a13211ae
@ -35,6 +35,7 @@ struct TWebBrowser {
|
|||||||
dword o_bufpointer;
|
dword o_bufpointer;
|
||||||
int cur_encoding, custom_encoding;
|
int cur_encoding, custom_encoding;
|
||||||
bool link, t_html, t_body;
|
bool link, t_html, t_body;
|
||||||
|
dword link_bg;
|
||||||
dword bufpointer;
|
dword bufpointer;
|
||||||
dword bufsize;
|
dword bufsize;
|
||||||
|
|
||||||
@ -121,6 +122,7 @@ void TWebBrowser::SetPageDefaults()
|
|||||||
link_color_default = 0x0000FF;
|
link_color_default = 0x0000FF;
|
||||||
link_color_active = 0xFF0000;
|
link_color_active = 0xFF0000;
|
||||||
page_bg = 0xFFFFFF;
|
page_bg = 0xFFFFFF;
|
||||||
|
link_bg = 0xFFFFFF;
|
||||||
style.bg_color = page_bg;
|
style.bg_color = page_bg;
|
||||||
DrawBuf.Fill(0, page_bg);
|
DrawBuf.Fill(0, page_bg);
|
||||||
PageLinks.Clear();
|
PageLinks.Clear();
|
||||||
@ -333,6 +335,7 @@ void TWebBrowser::SetStyle() {
|
|||||||
t_body = tag.opened;
|
t_body = tag.opened;
|
||||||
if (value = tag.get_value_of("link=")) link_color_default = 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("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("text=")) text_colors[0]=GetColor(value);
|
||||||
if (value = tag.get_value_of("bgcolor=")) {
|
if (value = tag.get_value_of("bgcolor=")) {
|
||||||
style.bg_color = page_bg = GetColor(value);
|
style.bg_color = page_bg = GetColor(value);
|
||||||
@ -358,9 +361,11 @@ void TWebBrowser::SetStyle() {
|
|||||||
{
|
{
|
||||||
link = true;
|
link = true;
|
||||||
PageLinks.AddLink(value);
|
PageLinks.AddLink(value);
|
||||||
|
style.bg_color = link_bg;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
link = false;
|
link = false;
|
||||||
|
style.bg_color = page_bg;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -390,12 +390,7 @@ void ProcessEvent(dword id__)
|
|||||||
EventSubmitOmnibox();
|
EventSubmitOmnibox();
|
||||||
return;
|
return;
|
||||||
case REFRESH_BUTTON:
|
case REFRESH_BUTTON:
|
||||||
if (http.transfer) {
|
EventRefreshPage();
|
||||||
StopLoading();
|
|
||||||
draw_window();
|
|
||||||
} else {
|
|
||||||
OpenPage(history.current());
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
case CHANGE_ENCODING:
|
case CHANGE_ENCODING:
|
||||||
EventShowEncodingsList();
|
EventShowEncodingsList();
|
||||||
@ -429,6 +424,7 @@ void ProcessEvent(dword id__)
|
|||||||
case CLEAR_CACHE:
|
case CLEAR_CACHE:
|
||||||
pages_cache.clear();
|
pages_cache.clear();
|
||||||
notify(#clear_cache_ok);
|
notify(#clear_cache_ok);
|
||||||
|
EventRefreshPage();
|
||||||
return;
|
return;
|
||||||
case IN_NEW_TAB:
|
case IN_NEW_TAB:
|
||||||
open_new_tab = true;
|
open_new_tab = true;
|
||||||
@ -811,6 +807,16 @@ void EventViewSource()
|
|||||||
EventOpenNewTab(history.current());
|
EventOpenNewTab(history.current());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EventRefreshPage()
|
||||||
|
{
|
||||||
|
if (http.transfer) {
|
||||||
|
StopLoading();
|
||||||
|
draw_window();
|
||||||
|
} else {
|
||||||
|
OpenPage(history.current());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dword GetFileSize(dword _path)
|
dword GetFileSize(dword _path)
|
||||||
{
|
{
|
||||||
BDVK bdvk;
|
BDVK bdvk;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
char version[]="WebView 2.47b";
|
char version[]="WebView 2.48";
|
||||||
|
|
||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0";
|
char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0";
|
||||||
|
@ -16,7 +16,7 @@ $DD 2 dup 0
|
|||||||
char aIconv_open[] = "iconv_open";
|
char aIconv_open[] = "iconv_open";
|
||||||
char aIconv[] = "iconv";
|
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 };
|
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)
|
dword ChangeCharset(dword from_chs, to_chs, conv_buf)
|
||||||
|
@ -195,9 +195,9 @@ struct _Image
|
|||||||
|
|
||||||
//NOTICE: DO NOT FORGET TO INIT libio AND libimg!!!
|
//NOTICE: DO NOT FORGET TO INIT libio AND libimg!!!
|
||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
#define TEXT_FILE_SAVED_AS "'File saved as "
|
|
||||||
#else
|
|
||||||
#define TEXT_FILE_SAVED_AS "'” ©« á®åà ¥ ª ª "
|
#define TEXT_FILE_SAVED_AS "'” ©« á®åà ¥ ª ª "
|
||||||
|
#else
|
||||||
|
#define TEXT_FILE_SAVED_AS "'File saved as "
|
||||||
#endif
|
#endif
|
||||||
:void save_image(dword _image_pointer, _w, _h, _path)
|
:void save_image(dword _image_pointer, _w, _h, _path)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user