OpenDialog and Proc_Lib

1) Fix for unused events
2) Auto popup OpenDialog


git-svn-id: svn://kolibrios.org@1654 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2010-10-11 14:00:08 +00:00
parent d1b2b4706f
commit 52ac68520a
2 changed files with 55 additions and 18 deletions

View File

@ -54,9 +54,9 @@ START:
mcall 68,11
mcall 66,1,1
mcall 40,0x27
call get_active_pocess
call get_communication_area
call get_active_pocess
load_libraries l_libs_start,end_l_libs
test eax,eax
@ -374,7 +374,7 @@ user_selected_name_action:
call draw_window
ret
@@:
add eax,12
add eax,16 ;12
;copy_path user_selected_name,dir_pach,eax,0
mov esi,dir_pach
mov edi,eax
@ -967,7 +967,7 @@ load_start_directory:
movzx ebx,word [eax]
test eax,eax
jz .1
add eax,12 ;4
add eax,16 ;12 ;4
mov esi,eax
push esi
mov esi,[communication_area]
@ -1123,7 +1123,7 @@ file_no_folder:
ret
@@:
mov edi,eax
add edi,12
add edi,16 ;12
mov esi,file_name
call copy_dir_name
@ -1622,17 +1622,27 @@ prepare_scrollbar_data:
ret
;---------------------------------------------------------------------
get_active_pocess:
; mcall 9,procinfo,-1
; mov eax,[ebx+30]
; mov [PID],eax
; xor ecx,ecx
;@@:
; inc ecx
; mcall 9,procinfo
; mov eax,[PID]
; cmp eax,[ebx+30]
; jne @r
; mov [active_process],ecx
mcall 9,procinfo,-1
mov eax,[ebx+30]
mov [PID],eax
xor ecx,ecx
@@:
inc ecx
mcall 9,procinfo
mov eax,[PID]
cmp eax,[ebx+30]
jne @r
mov [active_process],ecx
mov ecx,[ebx+30] ; PID
mcall 18,21
mov [active_process],eax ; WINDOW SLOT
mov ebx,[communication_area]
test ebx,ebx
jz .1
mov [ebx+12],eax ; WINDOW SLOT to com. area
.1:
ret
;---------------------------------------------------------------------
get_window_param:

View File

@ -89,6 +89,10 @@ OpenDialog_exit
.start:
pusha
mov ebp,dword [esp+36]
mcall 40,1b
push eax ; save events mask
mov eax,od_com_area
test eax,eax
jz .1
@ -132,7 +136,7 @@ OpenDialog_exit
mov [eax+8],ebx
mov edi,eax
add edi,12
add edi,16 ;12
mov esi,od_opendir_pach
xor eax,eax
@ -177,11 +181,31 @@ OpenDialog_exit
.still:
mcall 23,50
cmp eax,1
jne @f
jne .no_draw
pusha
call od_draw_window
popa
pusha
mcall 9,od_procinfo,-1
mov ecx,[ebx+30] ; PID
mcall 18,21
mov ecx,eax ; WINDOW SLOT
mcall 18,7
cmp eax,ecx ; compare ACTIVE and WINDOW SLOT
jne @f
mov eax,od_com_area
; xor ecx,ecx
mov ecx,[eax+12]
test ecx,ecx
jz @f
mcall 18,3
@@:
popa
.no_draw:
mov eax,od_com_area
movzx ebx,word [eax]
test ebx,ebx
@ -192,7 +216,7 @@ OpenDialog_exit
jne .still
mov esi,od_com_area
add esi,12
add esi,16 ;12
mov edi,od_openfile_pach
call .copy
mov od_status,1
@ -224,6 +248,9 @@ OpenDialog_exit
mov od_x_size,ebx
mov ebx,[eax+8]
mov od_y_size, ebx
pop ebx ; restore events mask
mcall 40
OpenDialog_exit
;----------------------------------------------
.get_filter_data: