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

View File

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