From eabaacbe1bfc663b16c25ea1bd8b88fcbf72f9e5 Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Thu, 4 Jul 2013 07:04:29 +0000 Subject: [PATCH] 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 --- programs/fs/kfm/trunk/data.inc | 18 +++++++++++ programs/fs/kfm/trunk/detect.inc | 33 +++++++++++--------- programs/fs/kfm/trunk/files.inc | 49 +++++++++++++++++++++--------- programs/fs/kfm/trunk/kfm.asm | 5 +++ programs/fs/kfm/trunk/menu_drv.inc | 2 ++ programs/fs/kfm/trunk/text.inc | 2 +- 6 files changed, 79 insertions(+), 30 deletions(-) diff --git a/programs/fs/kfm/trunk/data.inc b/programs/fs/kfm/trunk/data.inc index 76e9b50856..9fede5e297 100644 --- a/programs/fs/kfm/trunk/data.inc +++ b/programs/fs/kfm/trunk/data.inc @@ -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 ;--------------------------------------------------------------------- @@ -242,4 +252,12 @@ read_folder_name: align 4 read_folder_1_name: rb 4096 +;--------------------------------------------------------------------- +align 4 +read_folder_2_name: + rb 64 +;--------------------------------------------------------------------- +align 4 +read_folder_3_name: + rb 64 ;--------------------------------------------------------------------- \ No newline at end of file diff --git a/programs/fs/kfm/trunk/detect.inc b/programs/fs/kfm/trunk/detect.inc index 97963b4bc1..a1f6af25e4 100644 --- a/programs/fs/kfm/trunk/detect.inc +++ b/programs/fs/kfm/trunk/detect.inc @@ -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 diff --git a/programs/fs/kfm/trunk/files.inc b/programs/fs/kfm/trunk/files.inc index b91c611d89..ccc8e96444 100644 --- a/programs/fs/kfm/trunk/files.inc +++ b/programs/fs/kfm/trunk/files.inc @@ -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 + .size dd 5000 + .return dd 0 db 0 .name: dd read_folder_name ;--------------------------------------------------------------------- @@ -397,11 +400,29 @@ read_folder_1: .subfunction dd 1 .start dd 0 .flags dd 0 - .size dd 5000 - .return dd 0 ;folder_data_1 + .size dd 5000 + .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 diff --git a/programs/fs/kfm/trunk/kfm.asm b/programs/fs/kfm/trunk/kfm.asm index 20402d31f8..3209a24ddd 100644 --- a/programs/fs/kfm/trunk/kfm.asm +++ b/programs/fs/kfm/trunk/kfm.asm @@ -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: diff --git a/programs/fs/kfm/trunk/menu_drv.inc b/programs/fs/kfm/trunk/menu_drv.inc index 903168b2df..4f100ab6a3 100644 --- a/programs/fs/kfm/trunk/menu_drv.inc +++ b/programs/fs/kfm/trunk/menu_drv.inc @@ -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 diff --git a/programs/fs/kfm/trunk/text.inc b/programs/fs/kfm/trunk/text.inc index a24979da80..4c62714841 100644 --- a/programs/fs/kfm/trunk/text.inc +++ b/programs/fs/kfm/trunk/text.inc @@ -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