@open: add app-chains

git-svn-id: svn://kolibrios.org@5908 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
eAndrew 2015-11-10 20:58:55 +00:00
parent 5ed305bfbd
commit e2e721be07
2 changed files with 33 additions and 16 deletions

View File

@ -1,18 +1,27 @@
[TinyPad] [TinyPad]
exec=/sys/tinypad exec=/sys/tinypad
icon=9 icon=9
next=$TextEditor
[WebView] [WebView]
exec=/sys/network/webview exec=/sys/network/webview
icon=31 icon=31
next=$TinyPad
[TextEditor] [TextEditor]
exec=/sys/develop/t_edit exec=/sys/develop/t_edit
icon=58 icon=58
next=$Text Reader
[Text Reader]
exec=/sys/textreader
icon=55
next=$HexEditor
[KIV] [KIV]
exec=/sys/media/kiv exec=/sys/media/kiv
icon=70 icon=70
next=$Animage
[FontViewer] [FontViewer]
exec=/sys/FONT_VIEWER exec=/sys/FONT_VIEWER
@ -24,6 +33,7 @@ icon=15
[Pixie] [Pixie]
exec=/sys/media/pixie/pixie exec=/sys/media/pixie/pixie
icon=65 icon=65
next=$AC97snd
[AC97snd] [AC97snd]
exec=/sys/media/ac97snd exec=/sys/media/ac97snd
@ -51,6 +61,7 @@ icon=22
[Shell] [Shell]
exec=/sys/shell exec=/sys/shell
icon=2 icon=2
next=$TinyPad
[FASM] [FASM]
exec=/sys/develop/fasm exec=/sys/develop/fasm
@ -66,6 +77,7 @@ icon=75
[cObj] [cObj]
exec=/sys/develop/cObj exec=/sys/develop/cObj
next=$HexEditor
[Eolite] [Eolite]
exec=/sys/file managers/eolite exec=/sys/file managers/eolite
@ -125,14 +137,7 @@ obj=$cObj
raw=$HeEd raw=$HeEd
sh=$Shell
shell=$Shell shell=$Shell
sh=$Shell
bat=$Shell bat=$Shell
cmd=$Shell cmd=$Shell
3ds=$View3DS
asc=$View3DS
skn=/sys/desktop
lif=/sys/demos/life2
kla=/sys/games/klavisha

View File

@ -58,6 +58,7 @@ end if
assoc_ini db "/sys/settings/assoc.ini", 0 assoc_ini db "/sys/settings/assoc.ini", 0
.sec db "Assoc", 0 .sec db "Assoc", 0
.exec db "exec", 0 .exec db "exec", 0
.next db "next", 0
.icon db "icon", 0 .icon db "icon", 0
sb_apps scrollbar \ sb_apps scrollbar \
@ -142,7 +143,7 @@ end if
last_y dd -1 last_y dd -1
if DEBUG eq 1 if DEBUG eq 1
std_param db "~/sys/example.asm", 0 std_param db "/sys/example.asm", 0
end if end if
imports: imports:
@ -219,14 +220,24 @@ end if
cmpe [esi], dword "kex", execute cmpe [esi], dword "kex", execute
open_as: open_as:
invoke libini.get_str, assoc_ini, assoc_ini.sec, esi, buffer, 2048, undefined invoke libini.get_str, assoc_ini, assoc_ini.sec, esi, buffer8, 2048, undefined
cmpe [buffer], byte 0, start_dialog_pre cmpe byte [buffer8], 0, start_dialog_pre
cmpne [buffer], byte "$", @f .run:
invoke libini.get_str, assoc_ini, buffer + 1, assoc_ini.exec, buffer, 2048, undefined mov edi, 0
cmpe [buffer], byte 0, ini_error cmpne byte [buffer8], "$", .pre_open
mov edi, 1
invoke libini.get_str, assoc_ini, buffer8 + 1, assoc_ini.exec, buffer, 2048, undefined
cmpe byte [buffer], 0, ini_error
jmp @f
.pre_open:
stdcall string.copy, buffer8, buffer
@@: @@:
mcall 70, is_openas mcall 70, is_openas
jmp exit cmpge eax, 0, exit
cmpe edi, 0, start_dialog
invoke libini.get_str, assoc_ini, buffer8 + 1, assoc_ini.next, buffer8, 2048, undefined
cmpne byte [buffer], 0, .run
jmp start_dialog
execute: execute:
mov eax, [param_s] mov eax, [param_s]
@ -988,6 +999,7 @@ end if
buffer5 rb 2048 ;OD buffer5 rb 2048 ;OD
buffer6 rb 2048 ;check existance buffer6 rb 2048 ;check existance
buffer7 rb 32 ;for sorting buffer7 rb 32 ;for sorting
buffer8 rd 2048
params rb 2048 params rb 2048
_stack rb 2048 _stack rb 2048
memory: memory: