OpenDialog - rebuilding the device list before calling the menu "select disk", it is necessary to support the reconnection of devices (usb, tmp, etc.)

git-svn-id: svn://kolibrios.org@3734 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2013-06-30 02:18:52 +00:00
parent 8eb466e244
commit 95a615f8dd

View File

@ -433,6 +433,7 @@ user_selected_name_action:
select_disk: select_disk:
call check_alt call check_alt
.1: .1:
call load_root_directory
xor eax,eax xor eax,eax
mov [menu_data_1.ret_key],eax mov [menu_data_1.ret_key],eax
@ -807,7 +808,7 @@ mouse:
jne .menu_bar_2 jne .menu_bar_2
cmp [menu_data_1.cursor_out],dword 0 cmp [menu_data_1.cursor_out],dword 0
jne analyse_out_menu_1 jne select_disk.1 ;analyse_out_menu_1
jmp .menu_bar_1 jmp .menu_bar_1
;-------------------------------------------- ;--------------------------------------------
.menu_bar_2: .menu_bar_2:
@ -1188,8 +1189,16 @@ file_no_folder:
jmp button.exit jmp button.exit
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
load_root_directory: load_root_directory:
mov [dirinfo.name],dword dir_path_temp
mov eax,[dirinfo.return]
push eax
mov eax,[file_browser_data_1.folder_data]
push eax
xor eax,eax
mov [dirinfo.return],eax
mov [file_browser_data_1.folder_data],eax
mov esi,root_pach mov esi,root_pach
mov edi,dir_path mov edi,dir_path_temp
call copy_dir_name call copy_dir_name
call load_directory call load_directory
mov eax,[N_error] mov eax,[N_error]
@ -1211,7 +1220,7 @@ load_root_directory:
imul esi,[temp_counter_1],304 imul esi,[temp_counter_1],304
add esi,[root_folder_area] add esi,[root_folder_area]
add esi,32+40 add esi,32+40
mov edi,dir_path+1 mov edi,dir_path_temp+1
mov [edi-1],byte '/' mov [edi-1],byte '/'
call copy_dir_name call copy_dir_name
call load_directory call load_directory
@ -1274,6 +1283,11 @@ load_root_directory:
mov [menu_data_1.text_end],edi mov [menu_data_1.text_end],edi
xor eax,eax xor eax,eax
mov [edi],eax mov [edi],eax
pop eax
mov [file_browser_data_1.folder_data],eax
pop eax
mov [dirinfo.return],eax
mov [dirinfo.name],dword dir_path
ret ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
memory_free_error: memory_free_error:
@ -2689,7 +2703,7 @@ title_2:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
align 4 align 4
menu_data_1: menu_data_1:
.type: dd 0 ;+0 .type: dd 1 ;+0
.x: .x:
.size_x dw 80 ;+4 .size_x dw 80 ;+4
.start_x dw 10 ;+6 .start_x dw 10 ;+6
@ -3012,6 +3026,9 @@ previous_dir_path:
dir_path: dir_path:
rb 4096 rb 4096
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
dir_path_temp:
rb 4096
;---------------------------------------------------------------------
text_work_area: text_work_area:
rb 1024 rb 1024
;--------------------------------------------------------------------- ;---------------------------------------------------------------------