forked from KolibriOS/kolibrios
KFM - 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@3755 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
1dc693eed6
commit
eabaacbe1b
@ -91,12 +91,14 @@ left_start_draw_line rd 1
|
||||
left_folder_block rd 1
|
||||
left_start_draw_cursor_line rw 1
|
||||
;left_panel_clear_all rb 1
|
||||
left_folder_block_1 rd 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
right_start_draw_line rd 1
|
||||
right_folder_block rd 1
|
||||
right_start_draw_cursor_line rw 1
|
||||
;right_panel_clear_all rb 1
|
||||
right_folder_block_1 rd 1
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
sort_counter rd 1
|
||||
@ -175,6 +177,14 @@ create_dir_name:
|
||||
rb 256
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
left_folder_data_1:
|
||||
rb 304*32+32
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
right_folder_data_1:
|
||||
rb 304*32+32
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
retrieved_devices_table:
|
||||
rb 10*100
|
||||
;---------------------------------------------------------------------
|
||||
@ -243,3 +253,11 @@ align 4
|
||||
read_folder_1_name:
|
||||
rb 4096
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
read_folder_2_name:
|
||||
rb 64
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
read_folder_3_name:
|
||||
rb 64
|
||||
;---------------------------------------------------------------------
|
@ -49,34 +49,37 @@ device_detect: ; f1811
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
device_detect_f70:
|
||||
mov eax,[left_folder_data]
|
||||
mov [read_folder.return],eax
|
||||
mcall 70, read_folder
|
||||
mov ax,[select_disk_char]
|
||||
mov [read_folder_2_name],ax
|
||||
mov [read_folder_3_name],ax
|
||||
; mov eax,left_folder_data_1
|
||||
; mov [read_folder_2.return],eax
|
||||
mcall 70, read_folder_2
|
||||
test eax,eax
|
||||
jz @f
|
||||
cmp eax,6
|
||||
jne read_folder_error
|
||||
@@:
|
||||
mov [left_folder_block],ebx
|
||||
mov [left_folder_block_1],ebx
|
||||
mov [temp_counter_1],0
|
||||
mov [retrieved_devices_table_counter],0
|
||||
.start_temp_counter_1:
|
||||
imul esi,[temp_counter_1],304
|
||||
add esi,[left_folder_data]
|
||||
add esi,left_folder_data_1
|
||||
add esi,32+40 ;[eax+32+40]
|
||||
call copy_folder_name_1
|
||||
mov eax,[right_folder_data]
|
||||
mov [read_folder_1.return],eax
|
||||
mcall 70, read_folder_1
|
||||
call copy_folder_name_3
|
||||
; mov eax,right_folder_data_1
|
||||
; mov [read_folder_3.return],eax
|
||||
mcall 70, read_folder_3
|
||||
test eax,eax
|
||||
jz @f
|
||||
cmp eax,6
|
||||
jne read_folder_1_error
|
||||
@@:
|
||||
mov eax,[right_folder_data]
|
||||
mov eax,right_folder_data_1
|
||||
cmp [eax+4],dword 0
|
||||
je .continue
|
||||
mov [right_folder_block],ebx
|
||||
mov [right_folder_block_1],ebx
|
||||
mov ebp,0
|
||||
.start_copy_device_patch:
|
||||
imul edi,[retrieved_devices_table_counter],10
|
||||
@ -84,22 +87,22 @@ device_detect_f70:
|
||||
mov [edi],byte '/'
|
||||
inc edi
|
||||
imul esi,[temp_counter_1],304
|
||||
add esi,[left_folder_data]
|
||||
add esi,left_folder_data_1
|
||||
add esi,32+40 ;[eax+32+40]
|
||||
call proc_copy_patch
|
||||
imul esi,ebp,304
|
||||
add esi,[right_folder_data]
|
||||
add esi,right_folder_data_1
|
||||
add esi,32+40 ;[eax+32+40]
|
||||
mov [edi-1],byte '/'
|
||||
call proc_copy_patch
|
||||
inc [retrieved_devices_table_counter]
|
||||
inc ebp
|
||||
cmp ebp,[right_folder_block]
|
||||
cmp ebp,[right_folder_block_1]
|
||||
jb .start_copy_device_patch
|
||||
.continue:
|
||||
inc [temp_counter_1]
|
||||
mov eax,[temp_counter_1]
|
||||
cmp eax,[left_folder_block]
|
||||
cmp eax,[left_folder_block_1]
|
||||
jb .start_temp_counter_1
|
||||
mov esi,retrieved_devices_table+1
|
||||
call copy_folder_name
|
||||
|
@ -365,9 +365,10 @@ proc_read_folder_1:
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
copy_folder_name:
|
||||
mov edi,read_folder_name+1 ;read_folder.name+1
|
||||
@@:
|
||||
mov edi,read_folder_name+1
|
||||
.1:
|
||||
cld
|
||||
@@:
|
||||
lodsb
|
||||
stosb
|
||||
cmp al,0
|
||||
@ -375,21 +376,23 @@ copy_folder_name:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
copy_folder_name_1:
|
||||
mov edi,read_folder_1_name+1 ;read_folder_1.name+1
|
||||
@@:
|
||||
cld
|
||||
lodsb
|
||||
stosb
|
||||
cmp al,0
|
||||
jne @r
|
||||
ret
|
||||
mov edi,read_folder_1_name+1
|
||||
jmp copy_folder_name.1
|
||||
;---------------------------------------------------------------------
|
||||
copy_folder_name_2:
|
||||
mov edi,read_folder_2_name+1
|
||||
jmp copy_folder_name.1
|
||||
;---------------------------------------------------------------------
|
||||
copy_folder_name_3:
|
||||
mov edi,read_folder_3_name+1
|
||||
jmp copy_folder_name.1
|
||||
;---------------------------------------------------------------------
|
||||
read_folder:
|
||||
.subfunction dd 1
|
||||
.start dd 0
|
||||
.flags dd 0
|
||||
.size dd 5000
|
||||
.return dd 0 ;folder_data
|
||||
.return dd 0
|
||||
db 0
|
||||
.name: dd read_folder_name
|
||||
;---------------------------------------------------------------------
|
||||
@ -398,10 +401,28 @@ read_folder_1:
|
||||
.start dd 0
|
||||
.flags dd 0
|
||||
.size dd 5000
|
||||
.return dd 0 ;folder_data_1
|
||||
.return dd 0
|
||||
db 0
|
||||
.name: dd read_folder_1_name
|
||||
;---------------------------------------------------------------------
|
||||
read_folder_2:
|
||||
.subfunction dd 1
|
||||
.start dd 0
|
||||
.flags dd 0
|
||||
.size dd 5000
|
||||
.return dd left_folder_data_1
|
||||
db 0
|
||||
.name: dd read_folder_2_name
|
||||
;---------------------------------------------------------------------
|
||||
read_folder_3:
|
||||
.subfunction dd 1
|
||||
.start dd 0
|
||||
.flags dd 0
|
||||
.size dd 5000
|
||||
.return dd right_folder_data_1
|
||||
db 0
|
||||
.name: dd read_folder_3_name
|
||||
;---------------------------------------------------------------------
|
||||
read_file_features:
|
||||
.subfunction dd 5
|
||||
.Offset dd 0
|
||||
|
@ -364,6 +364,11 @@ add_memory_for_folders:
|
||||
add ecx,304*32+32
|
||||
mov [appl_memory],ecx
|
||||
mcall 64,1
|
||||
|
||||
mov eax,[left_folder_data]
|
||||
mov [read_folder.return],eax
|
||||
mov eax,[right_folder_data]
|
||||
mov [read_folder_1.return],eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
copy_path:
|
||||
|
@ -226,6 +226,7 @@ key_menu_right:
|
||||
jmp still
|
||||
;---------------------------------------------------------------------
|
||||
draw_left_select_disk_menu:
|
||||
call device_detect_f70
|
||||
mov [select_panel_counter],0
|
||||
call draw_left_panel
|
||||
call draw_right_panel
|
||||
@ -248,6 +249,7 @@ draw_left_select_disk_menu:
|
||||
jmp button
|
||||
;---------------------------------------------------------------------
|
||||
draw_right_select_disk_menu:
|
||||
call device_detect_f70
|
||||
mov [select_panel_counter],1
|
||||
call draw_left_panel
|
||||
call draw_right_panel
|
||||
|
@ -1,4 +1,4 @@
|
||||
header_text db 'KFM - Kolibri File Manager v0.47e',0
|
||||
header_text db 'Kolibri File Manager v0.47f 04/07/2013',0
|
||||
;---------------------------------------------------------------------
|
||||
fbutton_name:
|
||||
.f1 db '1 Help',0
|
||||
|
Loading…
Reference in New Issue
Block a user