WebView: support *.url link files

git-svn-id: svn://kolibrios.org@7800 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2020-04-16 14:04:21 +00:00
parent 52e6b02de2
commit 5c005d6f35
10 changed files with 21 additions and 216 deletions

View File

@ -1,6 +1,6 @@
6: gif, bmp, png, tga, jpg, ico, cur, tif, tiff, jpeg, ppm, pgm, pbm, pnm, pcx, wbmp, xcf
7: wav, mp3, mid, m3u, lap, asf
8: avi, mp4, mkv, mov, mpg, mpeg
9: txt, log
9: txt, log, docx
10: zip, 7z, rar, arj, bz2, bzip2, gz, gzip, iso, lha, lzh, lzma, tar, tgz, xz
11: html, htm, mht, xhtml
11: html, htm, mht, xhtml, url

View File

@ -1 +1 @@
/sys/TinyPad: asm, inc, txt, mac, log, dat /sys/media/kiv: gif, bmp, png, tga, jpg, ico, cur, tif, tiff, jpeg, ppm, pgm, pbm, pnm, pcx, wbmp, xcf /sys/Network/Webview: htm, html, mht, xhtml /sys/fb2read: fb2 /sys/develop/cObj: obj /sys/skincfg: skn /sys/rtfRead: rtf /sys/develop/t_edit: cpp, h, c, c--, pas, set, ext, ini /sys/media/mgb: mgb /sys/media/pixie: mp3 /sys/media/AC97SND: wav, xm /sys/media/MIDAMP: mid /sys/media/listplay: m3u, lap, asf /sys/shell: sh /sys/3d/view3ds: 3ds, asc /sys/graph: cvs, grf /sys/unz: zip, 7z /sys/table: csv /kolibrios/media/updf: pdf /kolibrios/media/fplay: avi, mpg, mov, flv, wmv, vob, mkv, mp4, mpeg, divx, 3gp, webm /kolibrios/emul/zsnes: smc /kolibrios/emul/psx4all: mcr /kolibrios/emul/fceu/fceu: nes /kolibrios/emul/e80/e80: sna /kolibrios/emul/gameboy: gb, gbc /kolibrios/emul/pokemini: min /sys/develop/heed:
/sys/TinyPad: asm, inc, txt, mac, log, dat /sys/media/kiv: gif, bmp, png, tga, jpg, ico, cur, tif, tiff, jpeg, ppm, pgm, pbm, pnm, pcx, wbmp, xcf /sys/Network/Webview: htm, html, mht, xhtml, docx, url /sys/fb2read: fb2 /sys/develop/cObj: obj /sys/skincfg: skn /sys/rtfRead: rtf /sys/develop/t_edit: cpp, h, c, c--, pas, set, ext, ini /sys/media/mgb: mgb /sys/media/pixie: mp3 /sys/media/AC97SND: wav, xm /sys/media/MIDAMP: mid /sys/media/listplay: m3u, lap, asf /sys/shell: sh /sys/3d/view3ds: 3ds, asc /sys/graph: cvs, grf /sys/unz: zip, 7z /sys/table: csv /kolibrios/media/updf: pdf /kolibrios/media/fplay: avi, mpg, mov, flv, wmv, vob, mkv, mp4, mpeg, divx, 3gp, webm /kolibrios/emul/zsnes: smc /kolibrios/emul/psx4all: mcr /kolibrios/emul/fceu/fceu: nes /kolibrios/emul/e80/e80: sna /kolibrios/emul/gameboy: gb, gbc /kolibrios/emul/pokemini: min /sys/develop/heed:

View File

@ -139,6 +139,7 @@ htm=13
html=13
mht=13
eml=13
url=13
lif=14
grf=14
3ds=15
@ -188,6 +189,8 @@ xlsx=28
vox=30
htm=31
html=31
url=31
mht=31
sys=38
avi=40
mpg=40

View File

@ -37,6 +37,7 @@ htm=/sys/network/WebView
html=/sys/network/WebView
mht=/sys/network/WebView
docx=/sys/network/WebView
url=/sys/network/WebView
fb2=/sys/fb2read
kla=/sys/games/klavisha
pdf=/kolibrios/media/updf

View File

@ -212,6 +212,7 @@ htm /sys/network/WebView
html /sys/network/WebView
mht /sys/network/WebView
docx /sys/network/WebView
url /sys/network/WebView
fb2 /sys/fb2read
kla /sys/games/klavisha
bin /sys/develop/heed

View File

@ -97,6 +97,7 @@ htm=$WebView
html=$WebView
mht=$WebView
docx=$WebView
url=$WebView
avi=$FPlay
mkv=$FPlay

View File

@ -35,6 +35,8 @@ cvs=/sys/graph
obj=/sys/develop/cObj
htm=/sys/network/WebView
html=/sys/network/WebView
docx=/sys/network/WebView
url=/sys/network/WebView
fb2=/sys/fb2read
mht=/sys/network/WebView
kla=/sys/games/klavisha

View File

@ -515,7 +515,7 @@ bool ReplaceSpaceInUrl(dword url, size) {
bool GetLocalFileData(dword _path)
{
dword data, size;
dword data, size, url_from_file;
file_size stdcall (_path);
if (!EBX) {
return false;
@ -523,7 +523,13 @@ bool GetLocalFileData(dword _path)
size = EBX;
data = malloc(size);
ReadFile(0, size, data, _path);
LoadInternalPage(data, size);
url_from_file = strstri(data, "URL=");
if (UrlExtIs(_path, "url")) && (url_from_file != -1) {
strtrim(url_from_file);
OpenPage(url_from_file);
} else {
LoadInternalPage(data, size);
}
free(data);
return true;
}
@ -562,7 +568,7 @@ void OpenPage(dword _open_URL)
else if (!strcmp(#new_url, URL_SERVICE_HELP)) LoadInternalPage(#help, sizeof(help));
else if (!strcmp(#new_url, URL_SERVICE_HISTORY)) ShowHistory();
else LoadInternalPage(#page_not_found, sizeof(page_not_found));
} else if (!strncmp(#new_url,"http:",5)) || (!strncmp(#new_url,"https:",6)) {
//WEB PAGE
if (ReplaceSpaceInUrl(#new_url, URL_SIZE)) {

View File

@ -1,4 +1,4 @@
char version[]="WebView 2.46f";
char version[]="WebView 2.47";
#ifdef LANG_RUS
char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0";

View File

@ -1,209 +0,0 @@
start
<>icons_associations
asm 0004
inc 0004
mac 0004
txt 0003
rtf 0003
ini 0003
log 0003
dic 0003
doc 0003
exc 0003
wtx 0003
inf 0003
jpg 0006
jpe 0006
jpeg 0006
jif 0006
jfif 0006
jp2 0006
jpx 0006
jpk 0006
j2k 0006
jpc 0006
j2c 0006
bmp 0006
dib 0006
rle 0006
pbm 0006
wbm 0006
wbmp 0006
xbm 0006
xpm 0006
gif 0006
png 0006
ico 0006
cur 0006
ani 0006
tif 0006
tiff 0006
xif 0006
tga 0006
pcx 0006
pbm 0006
pgm 0006
pnm 0006
xcf 0006
dcx 0006
ppm 0006
psd 0006
psp 0006
raw 0006
raf 0006
x3f 0006
orf 0006
nef 0006
mrw 0006
dcr 0006
crw 0006
cr2 0006
ras 0006
pix 0006
pict 0006
pct 0006
pic 0006
pgm 0006
pef 0006
pcd 0006
iff 0006
lbm 0006
ilbm 0006
fpx 0006
djv 0006
djvu 0006
iw4 0006
wav 0007
mp3 0007
xm 0007
mid 0007
midi 0007
aif 0007
aifc 0007
aiff 0007
au 0007
snd 0007
wma 0007
wm 0007
avi 0011
mpg 0011
mov 0011
flv 0011
wmv 0011
vob 0011
mkv 0011
mp4 0011
mpeg 0011
3gp 0011
img 0005
ima 0005
imz 0005
bwz 0005
dsk 0005
vfd 0005
wil 0005
wlz 0005
exe 0008
com 0008
bat 0008
sh 0008
7z 0009
rar 0009
zip 0009
cab 0009
arj 0009
lha 0009
lzh 0009
tar 0009
taz 0009
tbz 0009
tbz2 0009
bz 0009
bz2 0009
ice 0009
gz 0009
tgz 0009
uue 0009
uu 0009
xxe 0009
z 0009
dat 0010
dbg 0010
mgb 0010
ttf 0012
ttc 0012
chr 0012
mt 0012
htm 0013
html 0013
lif 0014
3ds 0015
kex 0016
skn 0017
<>end
<>files_associations
asm /sys/tinypad
inc /sys/tinypad
mac /sys/tinypad
dbg /sys/tinypad
txt /sys/tinypad
ini /sys/tinypad
log /sys/tinypad
dat /sys/tinypad
inf /sys/tinypad
bat /sys/tinypad
sh /sys/tinypad
jpg /sys/media/kiv
jpeg /sys/media/kiv
jpe /sys/media/kiv
gif /sys/media/kiv
bmp /sys/media/kiv
png /sys/media/kiv
ico /sys/media/kiv
cur /sys/media/kiv
pcx /sys/media/kiv
xcf /sys/media/kiv
pbm /sys/media/kiv
pgm /sys/media/kiv
pnm /sys/media/kiv
tif /sys/media/kiv
tiff /sys/media/kiv
wbmp /sys/media/kiv
m3u /sys/media/ac97snd
wav /sys/media/ac97snd
mp3 /sys/media/ac97snd
xm /sys/media/ac97snd
mid /sys/media/midamp
rtf /sys/rtfread
3ds /sys/3d/view3ds
lif /sys/demos/life2
skn /sys/skincfg
avi /hd0/1/fplay.kex
mpg /hd0/1/fplay.kex
mov /hd0/1/fplay.kex
flv /hd0/1/fplay.kex
wmv /hd0/1/fplay.kex
vob /hd0/1/fplay.kex
mkv /hd0/1/fplay.kex
mp4 /hd0/1/fplay.kex
mpeg /hd0/1/fplay.kex
3gp /hd0/1/fplay.kex
lap /sys/media/listplay
asf /sys/media/listplay
cvs /sys/graph
obj /sys/develop/cObj
htm /sys/HTMLv
html /sys/HTMLv
mht /sys/HTMLv
fb2 /sys/HTMLv
kla /sys/games/klavisha
bin /sys/develop/heed
mgb /sys/develop/heed
<>end
<>files_association1
bmp /sys/media/animage
<>end
end