forked from KolibriOS/kolibrios
KFM: use @open
git-svn-id: svn://kolibrios.org@7801 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5c005d6f35
commit
d802f7476f
@ -143,84 +143,4 @@ kex 0016
|
|||||||
skn 0017
|
skn 0017
|
||||||
<>end
|
<>end
|
||||||
|
|
||||||
<>files_associations
|
|
||||||
asm /sys/tinypad
|
|
||||||
inc /sys/tinypad
|
|
||||||
mac /sys/tinypad
|
|
||||||
dbg /sys/tinypad
|
|
||||||
txt /sys/tinypad
|
|
||||||
ini /sys/develop/t_edit
|
|
||||||
log /sys/tinypad
|
|
||||||
dat /sys/tinypad
|
|
||||||
inf /sys/tinypad
|
|
||||||
bat /sys/tinypad
|
|
||||||
sh /sys/shell
|
|
||||||
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/pixie
|
|
||||||
mp3 /sys/media/pixie
|
|
||||||
xm /sys/media/pixie
|
|
||||||
mid /sys/media/midamp
|
|
||||||
rtf /sys/rtfread
|
|
||||||
3ds /sys/3d/view3ds
|
|
||||||
asc /sys/3d/view3ds
|
|
||||||
skn /sys/skincfg
|
|
||||||
kf /sys/KF_VIEW
|
|
||||||
csv /sys/table
|
|
||||||
lif /kolibrios/demos/life2
|
|
||||||
pdf /kolibrios/media/updf
|
|
||||||
avi /kolibrios/media/fplay_run
|
|
||||||
mpg /kolibrios/media/fplay_run
|
|
||||||
mov /kolibrios/media/fplay_run
|
|
||||||
flv /kolibrios/media/fplay_run
|
|
||||||
wmv /kolibrios/media/fplay_run
|
|
||||||
vob /kolibrios/media/fplay_run
|
|
||||||
mkv /kolibrios/media/fplay_run
|
|
||||||
mp4 /kolibrios/media/fplay_run
|
|
||||||
mpeg /kolibrios/media/fplay_run
|
|
||||||
3gp /kolibrios/media/fplay_run
|
|
||||||
webm /kolibrios/media/fplay_run
|
|
||||||
smc /kolibrios/emul/zsnes
|
|
||||||
mcr /kolibrios/emul/psx4all
|
|
||||||
nes /kolibrios/emul/fceu/fceu
|
|
||||||
sna /kolibrios/emul/e80/e80
|
|
||||||
gb /kolibrios/emul/gameboy
|
|
||||||
gbc /kolibrios/emul/gameboy
|
|
||||||
min /kolibrios/emul/pokemini
|
|
||||||
nc /kolibrios/utils/cnc_editor/cnc_editor
|
|
||||||
|
|
||||||
lap /sys/media/listplay
|
|
||||||
asf /sys/media/listplay
|
|
||||||
cvs /sys/graph
|
|
||||||
obj /sys/develop/cObj
|
|
||||||
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
|
|
||||||
mgb /sys/mgb
|
|
||||||
<>end
|
|
||||||
|
|
||||||
<>files_association1
|
|
||||||
bmp /sys/media/animage
|
|
||||||
<>end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -513,26 +513,30 @@ bool ReplaceSpaceInUrl(dword url, size) {
|
|||||||
return was_changed;
|
return was_changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool HandleUrlFiles(dword _path, _data)
|
||||||
|
{
|
||||||
|
dword url_from_file;
|
||||||
|
if (!UrlExtIs(_path, "url")) return false;
|
||||||
|
url_from_file = strstri(_data, "URL=");
|
||||||
|
if (url_from_file == -1) return false;
|
||||||
|
replace_char(url_from_file, '\n', '\0', strlen(url_from_file));
|
||||||
|
OpenPage(url_from_file);
|
||||||
|
}
|
||||||
|
|
||||||
bool GetLocalFileData(dword _path)
|
bool GetLocalFileData(dword _path)
|
||||||
{
|
{
|
||||||
dword data, size, url_from_file;
|
dword data, size;
|
||||||
file_size stdcall (_path);
|
file_size stdcall (_path);
|
||||||
if (!EBX) {
|
if (!EBX) return false;
|
||||||
return false;
|
|
||||||
} else {
|
size = EBX;
|
||||||
size = EBX;
|
data = malloc(size);
|
||||||
data = malloc(size);
|
ReadFile(0, size, data, _path);
|
||||||
ReadFile(0, size, data, _path);
|
if (!HandleUrlFiles(_path, data)) {
|
||||||
url_from_file = strstri(data, "URL=");
|
LoadInternalPage(data, size);
|
||||||
if (UrlExtIs(_path, "url")) && (url_from_file != -1) {
|
|
||||||
strtrim(url_from_file);
|
|
||||||
OpenPage(url_from_file);
|
|
||||||
} else {
|
|
||||||
LoadInternalPage(data, size);
|
|
||||||
}
|
|
||||||
free(data);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
free(data);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenPage(dword _open_URL)
|
void OpenPage(dword _open_URL)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
char version[]="WebView 2.47";
|
char version[]="WebView 2.47a";
|
||||||
|
|
||||||
#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";
|
||||||
|
@ -266,4 +266,9 @@ read_folder_2_name:
|
|||||||
align 4
|
align 4
|
||||||
read_folder_3_name:
|
read_folder_3_name:
|
||||||
rb 64
|
rb 64
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
align 4
|
||||||
|
sysopen:
|
||||||
|
dd 7,0,start_parameter,0,0
|
||||||
|
db '/sys/@open',0
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
@ -1,4 +1,4 @@
|
|||||||
header_text db 'Kolibri File Manager v0.47k',0
|
header_text db 'Kolibri File Manager v0.48',0
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
fbutton_name:
|
fbutton_name:
|
||||||
.f1 db '1 Help',0
|
.f1 db '1 Help',0
|
||||||
|
@ -75,48 +75,50 @@ open_file_with_appl_1:
|
|||||||
open_file_with_appl:
|
open_file_with_appl:
|
||||||
; edx - start file name
|
; edx - start file name
|
||||||
; esi - start extension
|
; esi - start extension
|
||||||
mov ebp,files_associations
|
;mov ebp,files_associations ;Leency
|
||||||
.1:
|
.1:
|
||||||
mov [extension_start],esi
|
|
||||||
call search_star_and_end_tags
|
; mov [extension_start],esi ;Leency: do not get file assoc
|
||||||
cmp ebp,-1
|
; call search_star_and_end_tags ;from KFM.INI, use /sys/@open
|
||||||
je .end
|
; cmp ebp,-1
|
||||||
call normalize_extension_of_file
|
; je .end
|
||||||
.search_association:
|
; call normalize_extension_of_file
|
||||||
cmp [end_tag],edi
|
; .search_association:
|
||||||
jbe .end
|
; cmp [end_tag],edi
|
||||||
mov esi,extension_temp_storage
|
; jbe .end
|
||||||
mov ecx,[extension_size]
|
; mov esi,extension_temp_storage
|
||||||
inc edi
|
; mov ecx,[extension_size]
|
||||||
cld
|
; inc edi
|
||||||
push edi
|
; cld
|
||||||
rep cmpsb
|
; push edi
|
||||||
pop edi
|
; rep cmpsb
|
||||||
jne .search_association
|
; pop edi
|
||||||
push esi
|
; jne .search_association
|
||||||
mov esi,edi
|
; push esi
|
||||||
add esi,[extension_size] ;4
|
; mov esi,edi
|
||||||
cmp [esi],byte ' '
|
; add esi,[extension_size] ;4
|
||||||
je @f
|
; cmp [esi],byte ' '
|
||||||
pop esi
|
; je @f
|
||||||
jmp .search_association
|
; pop esi
|
||||||
@@:
|
; jmp .search_association
|
||||||
add esp,4
|
; @@:
|
||||||
inc esi
|
; add esp,4
|
||||||
mov edi,file_name ;start_file_data.name
|
; inc esi
|
||||||
xor eax,eax
|
; mov edi,file_name ;start_file_data.name
|
||||||
@@:
|
; xor eax,eax
|
||||||
cld
|
; @@:
|
||||||
lodsb
|
; cld
|
||||||
stosb
|
; lodsb
|
||||||
cmp al,' '
|
; stosb
|
||||||
cmp al,13
|
; cmp al,' '
|
||||||
jnz @b
|
; cmp al,13
|
||||||
mov [edi-1],byte 0 ;'#'
|
; jnz @b
|
||||||
cmp [use_patch],0
|
; mov [edi-1],byte 0 ;'#'
|
||||||
je @f
|
; cmp [use_patch],0
|
||||||
mov [use_patch],0
|
; je @f
|
||||||
jmp .continue
|
; mov [use_patch],0
|
||||||
|
|
||||||
|
.run_sysopen:
|
||||||
@@:
|
@@:
|
||||||
cmp [select_panel_counter],0
|
cmp [select_panel_counter],0
|
||||||
jne @f
|
jne @f
|
||||||
@ -154,7 +156,8 @@ open_file_with_appl:
|
|||||||
jnz @b
|
jnz @b
|
||||||
.continue:
|
.continue:
|
||||||
mov [start_file_data.param],start_parameter
|
mov [start_file_data.param],start_parameter
|
||||||
call start_appl
|
;call start_appl ;Leency
|
||||||
|
mcall 70,sysopen ;Leency
|
||||||
cmp eax,0
|
cmp eax,0
|
||||||
jge @f
|
jge @f
|
||||||
mov ebx,0
|
mov ebx,0
|
||||||
|
Loading…
Reference in New Issue
Block a user