forked from KolibriOS/kolibrios
WebView 1.73: user can download link contents
git-svn-id: svn://kolibrios.org@7208 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e974c281d5
commit
2644460def
@ -295,7 +295,8 @@ void TWebBrowser::SetStyle() {
|
|||||||
debugln("Document has no information about encoding, UTF will be used");
|
debugln("Document has no information about encoding, UTF will be used");
|
||||||
}
|
}
|
||||||
if (opened) {
|
if (opened) {
|
||||||
if (!strcmp(#header, #version)) {
|
if (strcmp(#header, #version) != 0) {
|
||||||
|
debugln("!!!!!!!!!!!!!!!!!!!!!!");
|
||||||
ChangeCharset(charsets[cur_encoding], "CP866", #header);
|
ChangeCharset(charsets[cur_encoding], "CP866", #header);
|
||||||
sprintf(#header, "%s - %s", #header, #version);
|
sprintf(#header, "%s - %s", #header, #version);
|
||||||
}
|
}
|
||||||
@ -355,7 +356,7 @@ void TWebBrowser::SetStyle() {
|
|||||||
if (istag("blockquote")) { style.blq = opened; return; }
|
if (istag("blockquote")) { style.blq = opened; return; }
|
||||||
if (istag("pre")) || (istag("code")) { style.pre = opened; return; }
|
if (istag("pre")) || (istag("code")) { style.pre = opened; return; }
|
||||||
if (istag("img")) { ImgCache.Images( left1, draw_y, WB1.list.w); return; }
|
if (istag("img")) { ImgCache.Images( left1, draw_y, WB1.list.w); return; }
|
||||||
if (istag("h1")) || (istag("h2")) || (istag("h3")) || (istag("h4")) || (istag("caption")) {
|
if (istag("h1")) || (istag("h2")) || (istag("h3")) || (istag("caption")) {
|
||||||
style.h = opened;
|
style.h = opened;
|
||||||
if (opened)
|
if (opened)
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
char homepage[] = FROM "html\\homepage.htm""\0";
|
char homepage[] = FROM "html\\homepage.htm""\0";
|
||||||
|
|
||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
char version[]="’¥ªáâ®¢ë© ¡à 㧥à 1.72";
|
char version[]="’¥ªáâ®¢ë© ¡à 㧥à 1.73";
|
||||||
?define IMAGES_CACHE_CLEARED "Šíè ª à⨮ª ®ç¨é¥"
|
?define IMAGES_CACHE_CLEARED "Šíè ª à⨮ª ®ç¨é¥"
|
||||||
?define T_LAST_SLIDE "<EFBFBD>â® ¯®á«¥¤¨© á« ©¤"
|
?define T_LAST_SLIDE "<EFBFBD>â® ¯®á«¥¤¨© á« ©¤"
|
||||||
char loading[] = "‡ £à㧪 áâà ¨æë...<br>";
|
char loading[] = "‡ £à㧪 áâà ¨æë...<br>";
|
||||||
@ -43,9 +43,10 @@ char rmb_menu[] =
|
|||||||
ˆáâ®à¨ï
|
ˆáâ®à¨ï
|
||||||
Œ¥¥¤¦¥à § £à㧮ª";
|
Œ¥¥¤¦¥à § £à㧮ª";
|
||||||
char link_menu[] =
|
char link_menu[] =
|
||||||
"Š®¯¨à®¢ âì áá뫪ã";
|
"Š®¯¨à®¢ âì áá뫪ã
|
||||||
|
‘ª ç âì ᮤ¥à¦¨¬®¥ áá뫪¨";
|
||||||
#else
|
#else
|
||||||
char version[]="Text-based Browser 1.72";
|
char version[]="Text-based Browser 1.73";
|
||||||
?define IMAGES_CACHE_CLEARED "Images cache cleared"
|
?define IMAGES_CACHE_CLEARED "Images cache cleared"
|
||||||
?define T_LAST_SLIDE "This slide is the last"
|
?define T_LAST_SLIDE "This slide is the last"
|
||||||
char loading[] = "Loading...<br>";
|
char loading[] = "Loading...<br>";
|
||||||
@ -57,7 +58,8 @@ Edit source
|
|||||||
History
|
History
|
||||||
Download Manager";
|
Download Manager";
|
||||||
char link_menu[] =
|
char link_menu[] =
|
||||||
"Copy link";
|
"Copy link
|
||||||
|
Download link contents";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -98,7 +100,8 @@ enum {
|
|||||||
VIEW_HISTORY,
|
VIEW_HISTORY,
|
||||||
//FREE_IMG_CACHE,
|
//FREE_IMG_CACHE,
|
||||||
DOWNLOAD_MANAGER,
|
DOWNLOAD_MANAGER,
|
||||||
COPY_LINK=1200
|
COPY_LINK=1200,
|
||||||
|
DOWNLOAD_LINK_CONTENTS,
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "..\TWB\TWB.c"
|
#include "..\TWB\TWB.c"
|
||||||
@ -378,6 +381,12 @@ void ProcessEvent(dword id__)
|
|||||||
Clipboard__CopyText(PageLinks.GetURL(PageLinks.active));
|
Clipboard__CopyText(PageLinks.GetURL(PageLinks.active));
|
||||||
notify("'URL copied to clipboard'O");
|
notify("'URL copied to clipboard'O");
|
||||||
return;
|
return;
|
||||||
|
case DOWNLOAD_LINK_CONTENTS:
|
||||||
|
if (!downloader_opened) {
|
||||||
|
strcpy(#downloader_edit, PageLinks.GetURL(PageLinks.active));
|
||||||
|
CreateThread(#Downloader,#downloader_stak+4092);
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -600,7 +609,7 @@ void EventShowPageMenu(dword _left, _top)
|
|||||||
|
|
||||||
void EventShowLinkMenu(dword _left, _top)
|
void EventShowLinkMenu(dword _left, _top)
|
||||||
{
|
{
|
||||||
menu.show(Form.left+_left-6,Form.top+_top+skin_height+3, 180, #link_menu, COPY_LINK);
|
menu.show(Form.left+_left-6,Form.top+_top+skin_height+3, 220, #link_menu, COPY_LINK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user