1) Bottom menu does work through OpenDialog now 
2) Removed code for invoke Sysxtree.


git-svn-id: svn://kolibrios.org@1588 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2010-08-24 19:33:09 +00:00
parent 0b08e1d642
commit e5f1731a11
2 changed files with 84 additions and 54 deletions

View File

@ -12,7 +12,7 @@ jmps dw _close, kDel,kMute, bList.shuf, bList.repe, bList.prev, bList.next
; bottom actions ; bottom actions
dw kDel,bLsave,bLload,bRemAll,bAdd,bAddDir,bSelZero,bInvSel,bSelAll,bRemCrop dw kDel,bLsave,bLload,bRemAll,bAdd,bAddDir,bSelZero,bInvSel,bSelAll,bRemCrop
dw bMinimize,bAbout,bResetTrk dw bMinimize,bAbout,bResetTrk
;------------------------------------------------------------------------
jmps_end: jmps_end:
key: key:
@ -108,7 +108,7 @@ key:
mov eax,IPC_TRIG mov eax,IPC_TRIG
call ipc_send call ipc_send
jmp red jmp red
;------------------------------------------------------------------------
button: button:
mov eax,17 mov eax,17
mcall mcall
@ -171,9 +171,11 @@ SH_POPUP equ 10
mov eax,67 mov eax,67
mcall mcall
ret ret
;------------------------------------------------------------------------
bMinimize: bMinimize:
; mcall 18,10 ; mcall 18,10
jmp still jmp still
;------------------------------------------------------------------------
bList: bList:
mov [popup],-1 mov [popup],-1
mov edx,[listsel] mov edx,[listsel]
@ -253,6 +255,7 @@ SH_POPUP equ 10
cmp al,[list_count] cmp al,[list_count]
jae still jae still
jmp play_ jmp play_
;------------------------------------------------------------------------
bBar: bBar:
cmp [tick_count],0 cmp [tick_count],0
jz still jz still
@ -281,8 +284,9 @@ SH_POPUP equ 10
mov [cur_ptr],esi mov [cur_ptr],esi
drw: drw:
jmp red jmp red
;------------------------------------------------------------------------
OCT_CH equ 3 OCT_CH equ 3
;------------------------------------------------------------------------
bOctU: bOctU:
add [octave],OCT_CH add [octave],OCT_CH
jmp midi_kill jmp midi_kill
@ -320,34 +324,53 @@ OCT_CH equ 3
and [list_count],0 and [list_count],0
mov [play_limit],playlist-2 mov [play_limit],playlist-2
jmp red jmp red
bAdd: ;------------------------------------------------------------------------
movzx eax,[list_count] bAdd:
dpd eax movzx eax,[list_count]
call fopen dpd eax
mov edi,filename mov [OpenDialog_data.type],0 ; Open
cmp byte[edi],0 or [flag],FL_LOCK
jz still push dword OpenDialog_data
call str_len call [OpenDialog_Start]
xchg eax,ecx and [flag],not FL_LOCK
mov esi,edi cmp [OpenDialog_data.status],1
jmp add_song jne still
bAddDir:
call fopen mov edi,filename
mov edi,filename cmp byte[edi],0
cmp byte[edi],0 jz still
jz still call str_len
call find_slash xchg eax,ecx
lea edx,[edi-filename+fnbuf] ; edx -> '/' mov esi,edi
and byte[edi],0 jmp add_song
mov esi,filename ;------------------------------------------------------------------------
mov edi,fnbuf bAddDir:
mov ecx,1024/4 mov [OpenDialog_data.type],2 ; Dir
rep movsd or [flag],FL_LOCK
and dword [dir_info+4], 0 push dword OpenDialog_data
.nxt2: call [OpenDialog_Start]
and [flag],not FL_LOCK
cmp [OpenDialog_data.status],1
jne still
mov esi,filename
mov edi,fnbuf
xor eax,eax
@@:
cld
lodsb
stosb
test eax,eax
jnz @r
mov [edi-1],byte '/'
mov edx,edi
and dword [dir_info+4], 0
.nxt2:
mcall 70, dir_info mcall 70, dir_info
cmp ebx, 1 test eax,eax
jnz red ;still jnz red
test byte [dir_table+32], 11000b ; exclude directories & vol label test byte [dir_table+32], 11000b ; exclude directories & vol label
jnz .no jnz .no
mov edi, dir_table+32+40 mov edi, dir_table+32+40
@ -370,8 +393,12 @@ OCT_CH equ 3
sub ecx, esi sub ecx, esi
call PL_add call PL_add
.no: .no:
inc dword [dir_info+4] mov eax,[dir_info+4]
jmp .nxt2 cmp eax,[dir_table+8]
je red
inc dword [dir_info+4]
jmp .nxt2
;------------------------------------------------------------------------
bSelZero: bSelZero:
call PL_clearsel call PL_clearsel
jmp red jmp red
@ -390,7 +417,7 @@ OCT_CH equ 3
mov edx,about1 mov edx,about1
call debug_outstr call debug_outstr
jmp still jmp still
;------------------------------------------------------------------------
get_num: ; out: eax-number entered get_num: ; out: eax-number entered
or [flag],FL_LOCK or [flag],FL_LOCK
mcall 10 mcall 10
@ -418,7 +445,7 @@ get_num: ; out: eax-number entered
jne get_num jne get_num
mcall 17 mcall 17
jmp get_num jmp get_num
;------------------------------------------------------------------------
find_slash: find_slash:
; in: edi-filename, out: edi-slash ptr-1 ; in: edi-filename, out: edi-slash ptr-1
push eax ecx push eax ecx
@ -432,4 +459,4 @@ find_slash:
add edi,2 add edi,2
pop ecx eax pop ecx eax
ret ret
;------------------------------------------------------------------------

View File

@ -73,7 +73,7 @@ include '../../../develop/libraries/box_lib/load_lib.mac'
lang fix en lang fix en
;purge mov ;purge mov
include 'debug.inc' include 'debug.inc'
include 'dlg.inc' ;include 'dlg.inc'
include 'playlist.inc' include 'playlist.inc'
include 'gif_lite.inc' include 'gif_lite.inc'
bottom: bottom:
@ -137,22 +137,24 @@ clearpath:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
;OpenDialog_start: ;OpenDialog_start:
; copy_path open_dialog_name,path,library_path,0 ; copy_path open_dialog_name,path,library_path,0
mov [OpenDialog_data.type],0 ; Open
or [flag],FL_LOCK
push dword OpenDialog_data push dword OpenDialog_data
call [OpenDialog_Start] call [OpenDialog_Start]
and [flag],not FL_LOCK
cmp [OpenDialog_data.status],2 ; OpenDialog does not start ; cmp [OpenDialog_data.status],2 ; OpenDialog does not start
je .fopen ; some kind of alternative, instead OpenDialog ; je .fopen ; some kind of alternative, instead OpenDialog
cmp [OpenDialog_data.status],1 cmp [OpenDialog_data.status],1
je open_file ; je open_file
jmp still ; jmp still
jne still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
.fopen: ;.fopen:
call fopen ; call fopen
get_path: ; get_path:
cmp byte[filename],0 ; cmp byte[filename],0
jz still ; jz still
open_file: open_file:
cmp [param],'W' cmp [param],'W'
je .noplay je .noplay
@ -323,12 +325,12 @@ str_len:
pop edi ecx pop edi ecx
ret ret
fopen: ;fopen:
or [flag],FL_LOCK ; or [flag],FL_LOCK
opendialog draw_window, ret_path, ret_path, filename ;; opendialog draw_window, ret_path, ret_path, filename
ret_path: ;ret_path:
and [flag],not FL_LOCK ; and [flag],not FL_LOCK
ret ; ret
include 'event.inc' include 'event.inc'
include "thread.inc" include "thread.inc"
@ -491,7 +493,8 @@ thread_stack:
rb 4096 rb 4096
stacktop: stacktop:
;---------------------------------------------------------------- ;----------------------------------------------------------------
dir_table rb 32+304 dir_table:
rb 32+304
workarea: workarea:
rb 120*1024 rb 120*1024
I_END: I_END: