Open: hide nonexistent applications

git-svn-id: svn://kolibrios.org@5903 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
eAndrew 2015-11-08 17:05:45 +00:00
parent c6a80a9a99
commit 4f66bc4c19
3 changed files with 24 additions and 53 deletions

View File

@ -67,8 +67,12 @@ icon=75
[cObj] [cObj]
exec=/sys/develop/cObj exec=/sys/develop/cObj
[Eolite]
exec=/sys/file managers/eolite
icon=1
[Assoc] [Assoc]
/=/sys/file managers/eolite /=$Eolite
kf=$FontViewer kf=$FontViewer

View File

@ -1,47 +0,0 @@
macro cmpe a, b, c
{
cmp a, b
je c
}
macro cmpne a, b, c
{
cmp a, b
jne c
}
macro cmpg a, b, c
{
cmp a, b
jg c
}
macro cmpl a, b, c
{
cmp a, b
jl c
}
macro cmpnl a, b, c
{
cmp a, b
jnl c
}
macro cmpng a, b, c
{
cmp a, b
jng c
}
macro cmpge a, b, c
{
cmp a, b
jge c
}
macro cmple a, b, c
{
cmp a, b
jle c
}

View File

@ -15,6 +15,7 @@
include "../../proc32.inc" include "../../proc32.inc"
include "../../macros.inc" include "../../macros.inc"
include "../../dll.inc" include "../../dll.inc"
include "../../cmp.inc"
include "../../string.inc" include "../../string.inc"
include "../../develop/libraries/box_lib/trunk/box_lib.mac" include "../../develop/libraries/box_lib/trunk/box_lib.mac"
@ -24,8 +25,6 @@ if DEBUG eq 1
include "../../debug.inc" include "../../debug.inc"
end if end if
include "macros.inc"
;=============================== ;===============================
if lang eq ru if lang eq ru
@ -134,11 +133,16 @@ end if
db 0 db 0
dd icons dd icons
is_file_exists:
dd 0, 0, 0, 0, buffer6
db 0
dd buffer
last_x dd -1 last_x dd -1
last_y dd -1 last_y dd -1
if DEBUG eq 1 if DEBUG eq 1
std_param db "~/sys/settings/assoc.ini", 0 std_param db "~/sys/example.asm", 0
end if end if
imports: imports:
@ -233,7 +237,10 @@ end if
open: open:
invoke libini.get_str, assoc_ini, assoc_ini.sec, slash, buffer, 2048, undefined invoke libini.get_str, assoc_ini, assoc_ini.sec, slash, buffer, 2048, undefined
cmpne [buffer], byte "$", @f
invoke libini.get_str, assoc_ini, buffer + 1, assoc_ini.exec, buffer, 2048, undefined
cmpe [buffer], byte 0, ini_error cmpe [buffer], byte 0, ini_error
@@:
mov eax, [param_s] mov eax, [param_s]
mov [is_open + 8], eax mov [is_open + 8], eax
mcall 70, is_open mcall 70, is_open
@ -707,6 +714,11 @@ end if
;---------------------- ;----------------------
proc section_cb, _file, _sec proc section_cb, _file, _sec
;; CHECK IF EXISTS
invoke libini.get_str, assoc_ini, [_sec], assoc_ini.exec, buffer, 2048, undefined
mcall 70, is_file_exists
cmpe ebx, -1, .exit
mov ebx, [list.size] mov ebx, [list.size]
shl ebx, 5 shl ebx, 5
add ebx, list add ebx, list
@ -721,6 +733,7 @@ end if
inc [sb_apps.max_area] inc [sb_apps.max_area]
@@: @@:
mov eax, 1 mov eax, 1
.exit:
ret ret
endp endp
@ -752,6 +765,7 @@ end if
buffer3 rb 2048 buffer3 rb 2048
buffer4 rb 4096 buffer4 rb 4096
buffer5 rb 4096 buffer5 rb 4096
buffer6 rb 2048
params rb 2048 params rb 2048
_stack rb 2048 _stack rb 2048
memory: memory: