Fixed bug erase the file name (Save mode) when opening an empty root directory.

git-svn-id: svn://kolibrios.org@3865 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2013-08-09 10:52:42 +00:00
parent 45ec088e95
commit 2cb1ab7e42

View File

@ -78,6 +78,7 @@
dd path dd path
include '../../macros.inc' include '../../macros.inc'
;include '../../debug.inc'
include '../../develop/libraries/box_lib/load_lib.mac' include '../../develop/libraries/box_lib/load_lib.mac'
include '../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../develop/libraries/box_lib/trunk/box_lib.mac'
;include 'macros.inc' ;include 'macros.inc'
@ -1018,11 +1019,22 @@ get_communication_area:
xor eax,eax xor eax,eax
mov al,[param] mov al,[param]
test eax,eax test eax,eax
jz @f jz .exit
mcall 68,22,param,,0x01 mcall 68,22,param,,0x01
mov [communication_area],eax mov [communication_area],eax
movzx ebx,word [eax+2] movzx ebx,word [eax+2]
mov [open_dialog_type],ebx mov [open_dialog_type],ebx
cmp ebx,1
jne @f
pushad
mov [focus_pointer],bl
mov edi,edit1
mov [file_browser_data_1.select_panel_counter],0
or [edi+44],dword ed_focus
mov [edi+12],dword 0xffffb0 ; color yellow
mcall 66,1,0
popad
@@:
mov ebx,[eax+4] mov ebx,[eax+4]
cmp bx,word x_minimal_size ;300 cmp bx,word x_minimal_size ;300
jb @f jb @f
@ -1031,7 +1043,7 @@ get_communication_area:
cmp bx,word y_minimal_size ;200 cmp bx,word y_minimal_size ;200
jb @f jb @f
mov [window_y],ebx mov [window_y],ebx
@@: .exit:
ret ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
load_start_directory: load_start_directory:
@ -1047,7 +1059,7 @@ load_start_directory:
mov esi,[communication_area] mov esi,[communication_area]
add esi,3840 ;4096-256 add esi,3840 ;4096-256
mov eax,[esi] mov eax,[esi]
test eax,eax test al,al
jnz @f jnz @f
mov esi,example_name_temp mov esi,example_name_temp
@@: @@:
@ -1185,6 +1197,9 @@ file_no_folder:
test al,al test al,al
je @f je @f
mov ebx,user_selected_name mov ebx,user_selected_name
xor eax,eax
cmp [ebx],al
je .exit
@@: @@:
cmp [open_dialog_type],2 cmp [open_dialog_type],2
je @f je @f
@ -1210,10 +1225,13 @@ file_no_folder:
jz @f jz @f
mov esi,user_selected_name mov esi,user_selected_name
@@: @@:
xor eax,eax
cmp [esi],al
je .exit
mov edi,[communication_area] mov edi,[communication_area]
add edi,3840 ;4096-256 add edi,3840 ;4096-256
call copy_dir_name call copy_dir_name
.exit:
mov eax,[communication_area] mov eax,[communication_area]
mov [eax],word 1 mov [eax],word 1
jmp button.exit jmp button.exit
@ -1569,8 +1587,13 @@ copy_new_file_name:
add esi,40 add esi,40
mov edi,user_selected_name mov edi,user_selected_name
cld cld
lodsb
test al,al
jnz .1
ret
@@: @@:
lodsb lodsb
.1:
stosb stosb
test al,al test al,al
jnz @r jnz @r
@ -2460,12 +2483,15 @@ copy_dir_name:
pop edi esi pop edi esi
.1: .1:
xor eax,eax xor eax,eax
cmp [esi],al
je .exit
cld cld
@@: @@:
lodsb lodsb
stosb stosb
test eax,eax test eax,eax
jnz @b jnz @b
.exit:
ret ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
;--------------------------------------------------------------------- ;---------------------------------------------------------------------