mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-28 19:53:12 +03:00
1) OpenDialog saved position and size
2) Proc_Lib support for OpenDialog saved position and size 3) Heed - used OpenDialog saved position and size git-svn-id: svn://kolibrios.org@1581 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5a26b0c156
commit
d82167fd95
@ -3243,6 +3243,12 @@ OpenDialog_data:
|
|||||||
.openfile_pach dd fname_buf ;+36
|
.openfile_pach dd fname_buf ;+36
|
||||||
.filename_area dd filename_area ;+40
|
.filename_area dd filename_area ;+40
|
||||||
.filter_area dd Filter
|
.filter_area dd Filter
|
||||||
|
.x:
|
||||||
|
.x_size dw 420 ;+48 ; Window X size
|
||||||
|
.x_start dw 10 ;+50 ; Window X position
|
||||||
|
.y:
|
||||||
|
.y_size dw 320 ;+52 ; Window y size
|
||||||
|
.y_start dw 10 ;+54 ; Window Y position
|
||||||
|
|
||||||
communication_area_name:
|
communication_area_name:
|
||||||
db 'FFFFFFFF_open_dialog',0
|
db 'FFFFFFFF_open_dialog',0
|
||||||
|
@ -45,6 +45,9 @@ include '../../trunk/box_lib.mac'
|
|||||||
;include 'load_lib.mac'
|
;include 'load_lib.mac'
|
||||||
;include 'box_lib.mac'
|
;include 'box_lib.mac'
|
||||||
@use_library
|
@use_library
|
||||||
|
|
||||||
|
x_minimal_size equ 300
|
||||||
|
y_minimal_size equ 200
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
START:
|
START:
|
||||||
@ -103,17 +106,17 @@ control_minimal_window_size:
|
|||||||
mov esi,-1
|
mov esi,-1
|
||||||
mov eax,procinfo
|
mov eax,procinfo
|
||||||
mov eax,[eax+66]
|
mov eax,[eax+66]
|
||||||
cmp eax,200
|
cmp eax,dword y_minimal_size ;200
|
||||||
jae @f
|
jae @f
|
||||||
mov esi,200
|
mov esi,dword y_minimal_size ;200
|
||||||
mcall 67,-1,ebx,ebx
|
mcall 67,-1,ebx,ebx
|
||||||
@@:
|
@@:
|
||||||
mov edx,-1
|
mov edx,-1
|
||||||
mov eax,procinfo
|
mov eax,procinfo
|
||||||
mov eax,[eax+62]
|
mov eax,[eax+62]
|
||||||
cmp eax,300
|
cmp eax,dword x_minimal_size ;300
|
||||||
jae @f
|
jae @f
|
||||||
mov edx,300
|
mov edx,dword x_minimal_size ;300
|
||||||
mcall 67,-1,ebx,,ebx
|
mcall 67,-1,ebx,,ebx
|
||||||
@@:
|
@@:
|
||||||
.end:
|
.end:
|
||||||
@ -371,7 +374,7 @@ user_selected_name_action:
|
|||||||
call draw_window
|
call draw_window
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
add eax,4
|
add eax,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
|
||||||
@ -555,6 +558,20 @@ button:
|
|||||||
jz @f
|
jz @f
|
||||||
call start_error_window_thread
|
call start_error_window_thread
|
||||||
@@:
|
@@:
|
||||||
|
call get_window_param
|
||||||
|
mov ebx,[communication_area]
|
||||||
|
mov ecx,procinfo
|
||||||
|
; mov eax,[window_x]
|
||||||
|
mov eax,[ecx+34]
|
||||||
|
shl eax,16
|
||||||
|
add eax,[ecx+42]
|
||||||
|
mov [ebx+4],eax
|
||||||
|
; mov eax,[window_y]
|
||||||
|
mov eax,[ecx+38]
|
||||||
|
shl eax,16
|
||||||
|
add eax,[ecx+46]
|
||||||
|
mov [ebx+8],eax
|
||||||
|
|
||||||
mcall -1
|
mcall -1
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
.reload_dir:
|
.reload_dir:
|
||||||
@ -930,8 +947,16 @@ get_communication_area:
|
|||||||
jz @f
|
jz @f
|
||||||
mcall 68,22,param,,0x01
|
mcall 68,22,param,,0x01
|
||||||
mov [communication_area],eax
|
mov [communication_area],eax
|
||||||
movzx eax,word [eax+2]
|
movzx ebx,word [eax+2]
|
||||||
mov [open_dialog_type],eax
|
mov [open_dialog_type],ebx
|
||||||
|
mov ebx,[eax+4]
|
||||||
|
cmp bx,word x_minimal_size ;300
|
||||||
|
jb @f
|
||||||
|
mov [window_x],ebx
|
||||||
|
mov ebx,[eax+8]
|
||||||
|
cmp bx,word y_minimal_size ;200
|
||||||
|
jb @f
|
||||||
|
mov [window_y],ebx
|
||||||
@@:
|
@@:
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
@ -942,11 +967,11 @@ load_start_directory:
|
|||||||
movzx ebx,word [eax]
|
movzx ebx,word [eax]
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jz .1
|
jz .1
|
||||||
add eax,4
|
add eax,12 ;4
|
||||||
mov esi,eax
|
mov esi,eax
|
||||||
push esi
|
push esi
|
||||||
mov esi,[communication_area]
|
mov esi,[communication_area]
|
||||||
add esi,4096-256
|
add esi,3840 ;4096-256
|
||||||
mov eax,[esi]
|
mov eax,[esi]
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jnz @f
|
jnz @f
|
||||||
@ -1090,7 +1115,7 @@ file_no_folder:
|
|||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
mov edi,eax
|
mov edi,eax
|
||||||
add edi,4
|
add edi,12
|
||||||
mov esi,file_name
|
mov esi,file_name
|
||||||
call copy_dir_name
|
call copy_dir_name
|
||||||
|
|
||||||
@ -1101,7 +1126,7 @@ file_no_folder:
|
|||||||
mov esi,user_selected_name
|
mov esi,user_selected_name
|
||||||
@@:
|
@@:
|
||||||
mov edi,[communication_area]
|
mov edi,[communication_area]
|
||||||
add edi,4096-256
|
add edi,3840 ;4096-256
|
||||||
call copy_dir_name
|
call copy_dir_name
|
||||||
|
|
||||||
mov eax,[communication_area]
|
mov eax,[communication_area]
|
||||||
@ -1220,7 +1245,9 @@ draw_window:
|
|||||||
|
|
||||||
mcall 12,1
|
mcall 12,1
|
||||||
|
|
||||||
mcall 0,<10,420>,<10,320>,0x63AABBCC,
|
; mcall 0,<10,420>,<10,320>,0x63AABBCC,
|
||||||
|
xor esi,esi
|
||||||
|
mcall 0,[window_x],[window_y],0x63AABBCC,
|
||||||
|
|
||||||
; mov ecx,[communication_area]
|
; mov ecx,[communication_area]
|
||||||
; add ecx,4096+4+4
|
; add ecx,4096+4+4
|
||||||
@ -1874,7 +1901,7 @@ delete_unsupported_BDFE:
|
|||||||
|
|
||||||
push eax ebx ecx esi
|
push eax ebx ecx esi
|
||||||
mov edi,[communication_area]
|
mov edi,[communication_area]
|
||||||
add edi,4096+4
|
add edi,4100
|
||||||
call compare_expansion
|
call compare_expansion
|
||||||
test eax,eax
|
test eax,eax
|
||||||
pop esi ecx ebx eax
|
pop esi ecx ebx eax
|
||||||
@ -2846,6 +2873,12 @@ name_editboxes_end:
|
|||||||
|
|
||||||
mouse_dd rd 1
|
mouse_dd rd 1
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
window_x:
|
||||||
|
.x_size dw 420
|
||||||
|
.x_start dw 10
|
||||||
|
window_y:
|
||||||
|
.y_size dw 320
|
||||||
|
.y_start dw 10
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
features_table:
|
features_table:
|
||||||
.type_table:
|
.type_table:
|
||||||
|
@ -47,6 +47,10 @@ od_status equ dword [ebp+32] ; 0-Cancel, 1-Get path OK, 2-Use alternatives
|
|||||||
od_openfile_pach equ dword [ebp+36] ; Getting path to file
|
od_openfile_pach equ dword [ebp+36] ; Getting path to file
|
||||||
od_filename_area equ dword [ebp+40] ; Adress of file name area
|
od_filename_area equ dword [ebp+40] ; Adress of file name area
|
||||||
od_filter_area equ dword [ebp+44] ; Adress of filter area
|
od_filter_area equ dword [ebp+44] ; Adress of filter area
|
||||||
|
od_x_size equ [ebp+48] ; Window X size
|
||||||
|
od_x_start equ [ebp+50] ; Window X position
|
||||||
|
od_y_size equ [ebp+52] ; Window y size
|
||||||
|
od_y_start equ [ebp+54] ; Window Y position
|
||||||
;*****************************************************************************
|
;*****************************************************************************
|
||||||
.init:
|
.init:
|
||||||
pusha
|
pusha
|
||||||
@ -92,8 +96,43 @@ OpenDialog_exit
|
|||||||
mov [eax+2],bx
|
mov [eax+2],bx
|
||||||
|
|
||||||
mov [eax],word 2 ; folder for open
|
mov [eax],word 2 ; folder for open
|
||||||
|
|
||||||
|
pusha
|
||||||
|
mcall 9,od_procinfo,-1
|
||||||
|
|
||||||
|
mov eax,[ebx+42] ;main window x size
|
||||||
|
shr eax,1
|
||||||
|
add eax,[ebx+34] ; main window x start
|
||||||
|
mov cx,od_x_size
|
||||||
|
shr cx,1
|
||||||
|
sub ax,cx
|
||||||
|
test ax,cx
|
||||||
|
test eax,0x8000
|
||||||
|
jz @f
|
||||||
|
xor eax,eax
|
||||||
|
@@:
|
||||||
|
mov od_x_start,ax
|
||||||
|
|
||||||
|
mov eax,[ebx+46] ;main window y size
|
||||||
|
shr eax,1
|
||||||
|
add eax,[ebx+38] ; main window y start
|
||||||
|
mov cx,od_y_size
|
||||||
|
shr cx,1
|
||||||
|
sub ax,cx
|
||||||
|
test eax,0x8000
|
||||||
|
jz @f
|
||||||
|
xor eax,eax
|
||||||
|
@@:
|
||||||
|
mov od_y_start,ax
|
||||||
|
popa
|
||||||
|
|
||||||
|
mov ebx,dword od_x_size
|
||||||
|
mov [eax+4],ebx
|
||||||
|
mov ebx,dword od_y_size
|
||||||
|
mov [eax+8],ebx
|
||||||
|
|
||||||
mov edi,eax
|
mov edi,eax
|
||||||
add edi,4
|
add edi,12
|
||||||
|
|
||||||
mov esi,od_opendir_pach
|
mov esi,od_opendir_pach
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
@ -108,7 +147,7 @@ OpenDialog_exit
|
|||||||
cmp od_type,dword 2
|
cmp od_type,dword 2
|
||||||
je .4
|
je .4
|
||||||
mov edi,od_com_area
|
mov edi,od_com_area
|
||||||
add edi,4096-256
|
add edi,3840 ;4096-256
|
||||||
|
|
||||||
mov esi,od_filename_area
|
mov esi,od_filename_area
|
||||||
test esi,esi
|
test esi,esi
|
||||||
@ -153,10 +192,11 @@ OpenDialog_exit
|
|||||||
jne .still
|
jne .still
|
||||||
|
|
||||||
mov esi,od_com_area
|
mov esi,od_com_area
|
||||||
add esi,4
|
add esi,12
|
||||||
mov edi,od_openfile_pach
|
mov edi,od_openfile_pach
|
||||||
call .copy
|
call .copy
|
||||||
mov od_status,1
|
mov od_status,1
|
||||||
|
|
||||||
mov esi,od_openfile_pach
|
mov esi,od_openfile_pach
|
||||||
mov edi,od_opendir_pach
|
mov edi,od_opendir_pach
|
||||||
call .copy_dir_path
|
call .copy_dir_path
|
||||||
@ -165,7 +205,7 @@ OpenDialog_exit
|
|||||||
cmp od_type,dword 2
|
cmp od_type,dword 2
|
||||||
je @f
|
je @f
|
||||||
mov esi,od_com_area
|
mov esi,od_com_area
|
||||||
add esi,4096-256
|
add esi,3840
|
||||||
mov edi,od_filename_area
|
mov edi,od_filename_area
|
||||||
test edi,edi
|
test edi,edi
|
||||||
jz @f
|
jz @f
|
||||||
@ -179,6 +219,11 @@ OpenDialog_exit
|
|||||||
.1:
|
.1:
|
||||||
mov od_status,2
|
mov od_status,2
|
||||||
.3:
|
.3:
|
||||||
|
mov eax,od_com_area
|
||||||
|
mov ebx,[eax+4]
|
||||||
|
mov od_x_size,ebx
|
||||||
|
mov ebx,[eax+8]
|
||||||
|
mov od_y_size, ebx
|
||||||
OpenDialog_exit
|
OpenDialog_exit
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
.get_filter_data:
|
.get_filter_data:
|
||||||
@ -189,7 +234,7 @@ OpenDialog_exit
|
|||||||
; jmp still
|
; jmp still
|
||||||
ret
|
ret
|
||||||
@@:
|
@@:
|
||||||
add edi,4096+4
|
add edi,4100
|
||||||
mov esi,od_filter_area
|
mov esi,od_filter_area
|
||||||
mov ecx,[esi]
|
mov ecx,[esi]
|
||||||
test ecx,ecx
|
test ecx,ecx
|
||||||
|
Loading…
Reference in New Issue
Block a user