KFM - fixed some bugs.

git-svn-id: svn://kolibrios.org@3840 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2013-07-28 13:06:02 +00:00
parent 43e8b4dc26
commit e612357931
12 changed files with 1501 additions and 1307 deletions

View File

@ -1,36 +1,48 @@
;---------------------------------------------------------------------
;------------------------------------------------------------------------------
confirmation_action:
mov [work_confirmation],0
mov [work_confirmation_yes],0
jmp .red
;--------------------------------------
.red_1:
call draw_window
;--------------------------------------
.red:
call draw_confirmation_button
call draw_confirmation_menu
;--------------------------------------
.still:
mcall 10
cmp eax,1
je .red_1
cmp eax,2
je key_menu_confirmation
cmp eax,3
jne .still
mcall 17
cmp ah,161
je .no_del
cmp ah,160
je .del
cmp ah,1
jne .still
mcall -1
;--------------------------------------
.del:
mov [work_confirmation_yes],1
;--------------------------------------
.no_del:
call draw_window
;--------------------------------------
.ret:
ret
;---------------------------------------------------------------------
;------------------------------------------------------------------------------
draw_confirmation_button:
mov ecx,[window_high]
mov ebx,[window_width]
@ -41,15 +53,12 @@ draw_confirmation_button:
shl ebx,16
mov cx,15
mov bx,40
mov esi,0xffffff
mov edx,0x40000000+160
mov eax,8
int 0x40
mcall 8,,,0x40000000+160,0xffffff
add ebx,50 shl 16
inc edx
int 0x40
mcall
ret
;---------------------------------------------------------------------
;------------------------------------------------------------------------------
draw_confirmation_menu:
mov ecx,[window_high]
mov ebx,[window_width]
@ -61,7 +70,7 @@ draw_confirmation_menu:
shl ebx,16
mov cx,44
mov bx,120
mcall 13, , ,0x6060ff ;0xff
mcall 13,,,0x6060ff
push ebx ecx
add ebx,15 shl 16
add ecx,22 shl 16
@ -71,76 +80,92 @@ draw_confirmation_menu:
push ebx ecx
cmp [work_confirmation],0
jne @f
add ebx,50 shl 16
;--------------------------------------
@@:
int 0x40
mcall
add ecx,1 shl 16
add ebx,1 shl 16
mov bx,38
mov cx,13
mov edx,0x6060ff
int 0x40
mcall ,,,0x6060ff
pop ecx ebx
mov edx,0xff0000
cmp [work_confirmation],0
je @f
add ebx,50 shl 16
mov edx,0xaa00
;--------------------------------------
@@:
int 0x40
mcall
pop ecx ebx
shr ecx,16
mov bx,cx
add ebx,15 shl 16+5
mcall 4,,0x90ffffff,[confirmation_type]
add ebx,7 shl 16+20
mov edx,type_yes
int 0x40
mcall ,,,type_yes
add ebx,56 shl 16
mov edx,type_no
int 0x40
mcall ,,,type_no
ret
;---------------------------------------------------------------------
;------------------------------------------------------------------------------
key_menu_confirmation:
mcall 2
cmp [extended_key],1
je .extended_key
test al,al
jnz .end_1
cmp ah,0xE0
jne @f
;--------------------------------------
.end_1:
jmp confirmation_action.still
;--------------------------------------
@@:
cmp ah,75
je confirmation_key_75.1
cmp ah,77
je confirmation_key_75.1
cmp ah,28
je confirmation_key_28.1
;--------------------------------------
.end:
cmp ah,1
jne confirmation_action.still
ret
;---------------------------------------------------------------------
;------------------------------------------------------------------------------
.extended_key:
mov [extended_key],0
;------------------------------------------------------------------------------
confirmation_key_75:
cmp ah,75 ; arrow left
je .1
cmp ah,77 ; arrow right
jne confirmation_key_28
;--------------------------------------
.1:
dec [work_confirmation]
and [work_confirmation],1
jmp confirmation_action.red
;------------------------------------------------------------------------------
confirmation_key_28:
cmp ah,28 ; Enter
jne confirmation_action.still
;--------------------------------------
.1:
cmp [work_confirmation],0
jne @f
mov [work_confirmation_yes],1
;--------------------------------------
@@:
ret
;---------------------------------------------------------------------
;------------------------------------------------------------------------------

View File

@ -97,7 +97,7 @@ editbox_copy_name:
;-------------------------------------------------------------
.button_copy:
mov eax,17
int 0x40
mcall
test ah,ah
jz .still
cmp ah,160
@ -127,7 +127,7 @@ editbox_copy_name:
;-------------------------------------------------------------
.key_copy:
mov eax,2
int 0x40
mcall
cmp ah,13
je .exit_with_copy
cmp ah,27
@ -165,10 +165,10 @@ draw_editbox_copy_name:
mov esi,0xffffff
mov edx,0x40000000+160
mov eax,8
int 0x40
mcall
add ebx,50 shl 16
inc edx
int 0x40
mcall
popa
push ebx ecx
@ -182,15 +182,15 @@ draw_editbox_copy_name:
sub ebx,1 shl 16
mov bx,42
mov cx,17
int 0x40
mcall
add ebx,50 shl 16
int 0x40
mcall
pop ecx ebx
mov edx,0xff7700
int 0x40
mcall
mov edx,0xaa00
add ebx,50 shl 16
int 0x40
mcall
pop ecx ebx
shr ecx,16
@ -206,10 +206,10 @@ draw_editbox_copy_name:
mcall 4, ,0x90ffffff
add ebx,18 shl 16+36
mov edx,type_yes
int 0x40
mcall
add ebx,56 shl 16
mov edx,type_no
int 0x40
mcall
ret
;-------------------------------------------------------------
copy_file_1:

View File

@ -25,7 +25,7 @@ default_box
;-------------------------------------------------------------
.button_create:
mov eax,17
int 0x40
mcall
test ah,ah
jz .still
cmp ah,160
@ -49,7 +49,7 @@ default_box
;-------------------------------------------------------------
.key_create:
mov eax,2
int 0x40
mcall
cmp ah,13
je .exit_with_create
cmp ah,27
@ -87,10 +87,10 @@ draw_create_dir:
mov esi,0xffffff
mov edx,0x40000000+160
mov eax,8
int 0x40
mcall
add ebx,50 shl 16
inc edx
int 0x40
mcall
popa
push ebx ecx
@ -104,15 +104,15 @@ draw_create_dir:
sub ebx,1 shl 16
mov bx,42
mov cx,17
int 0x40
mcall
add ebx,50 shl 16
int 0x40
mcall
pop ecx ebx
mov edx,0xff7700
int 0x40
mcall
mov edx,0xaa00
add ebx,50 shl 16
int 0x40
mcall
pop ecx ebx
shr ecx,16
@ -121,10 +121,10 @@ draw_create_dir:
mcall 4, ,0x90ffffff,create_dir ;[confirmation_type]
add ebx,48 shl 16+36
mov edx,type_yes
int 0x40
mcall
add ebx,56 shl 16
mov edx,type_no
int 0x40
mcall
ret
;-------------------------------------------------------------
create_directory_1:

View File

@ -44,18 +44,26 @@ window_width rd 1
window_status rd 1
skin_high rd 1
fbutton_width rd 1
left_panel_x:
.size_x rw 1
.start_x rw 1
left_panel_y:
.size_y rw 1
.start_y rw 1
right_panel_x:
.size_x rw 1
.start_x rw 1
right_panel_y:
.size_y rw 1
.start_y rw 1
left_panel_y_correct_size_y rw 1
right_panel_y_correct_size_y rw 1
drawing_panel_folder rb 1 ; 1-left, 2 right
;---------------------------------------------------------------------
align 4

File diff suppressed because it is too large Load Diff

View File

@ -88,7 +88,7 @@ key_80:
jbe .marked_action ;still
mov ax,[left_start_draw_cursor_line]
add ax,10
cmp ax,[left_panel_y.size_y]
cmp ax,[left_panel_y_correct_size_y]
jae @f
.add_1:
add [left_start_draw_cursor_line],10
@ -97,7 +97,7 @@ key_80:
.all:
sub ecx,10 shl 16
mov edx,0xffffff
int 0x40
mcall
mov [not_clear_lines],1
call draw_folder_data
mov [not_clear_lines],0
@ -138,7 +138,7 @@ key_80:
jbe .marked_action_1 ;still
mov ax,[right_start_draw_cursor_line]
add ax,10
cmp ax,[right_panel_y.size_y]
cmp ax,[right_panel_y_correct_size_y]
jae @f
.add_2:
add [right_start_draw_cursor_line],10
@ -178,7 +178,7 @@ key_72:
.all:
add ecx,10 shl 16
mov edx,0xffffff
int 0x40
mcall
mov [not_clear_lines],1
call draw_folder_data
mov [not_clear_lines],0

View File

@ -25,7 +25,7 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;*****************************************************************************
; KFM v0.47g 24/07/2013
; KFM v0.47h 28/07/2013
;---------------------------------------------------------------------
use32
org 0x0
@ -44,6 +44,7 @@ org 0x0
;include 'macros.inc'
include '../../../macros.inc'
include '../../../config.inc' ;for nightbuild
;include '../../../debug.inc' ;for nightbuild
include 'editbox.inc'
;use_edit_box

View File

@ -280,7 +280,7 @@ draw_left_menu:
imul cx,10
mov edx,0xffffcc
mov eax,13
int 0x40
mcall
call draw_menu_Selection
call draw_menu_data
ret
@ -294,7 +294,7 @@ draw_right_menu:
imul cx,10
mov edx,0xffffcc
mov eax,13
int 0x40
mcall
call draw_menu_Selection
call draw_menu_data
ret
@ -322,7 +322,7 @@ draw_menu_Selection:
mov cx,10
mov edx,0xbbffbb
mov eax,13
int 0x40
mcall
pop ecx ebx
ret
;---------------------------------------------------------------------

View File

@ -22,7 +22,7 @@ progress_bar_delete:
je .end
sub ebx,13
mov edx,delete_type
int 0x40
mcall
.end:
popa
mov [draw_all_progressbar],0
@ -53,7 +53,7 @@ progress_bar_copy:
@@:
mov edx,0xff0000
.continue_1:
int 0x40
mcall
call calculate_progress_data_2
shr ecx,16
mov bx,cx
@ -74,7 +74,7 @@ progress_bar_copy:
mov edx,move_type_1
.continue:
int 0x40
mcall
.end:
popa
mov [draw_all_progressbar],0
@ -92,7 +92,7 @@ clear_text_area_1:
mov bx,ax
mov eax,13
mov edx, 0x6060ff
int 0x40
mcall
pop ebx
@@:
ret
@ -124,7 +124,7 @@ calculate_progress_data_2:
sub si,bx
mov bx,si
mov edx,0xffffff
int 0x40
mcall
pop ebx
@@:
ret
@ -135,7 +135,7 @@ calculate_progress_data_3:
cmp [draw_all_progressbar],0
je @f
mov edx, 0x6060ff
int 0x40
mcall
@@:
add ebx,10 shl 16
sub ebx,20
@ -164,7 +164,7 @@ calculate_progress_data_6:
mov ebp,[current_progress_value]
call calculate_progress_data_1
mov bx,[temp_progress_value]
int 0x40
mcall
call calculate_progress_data_2
ret
;---------------------------------------------------------------------

View File

@ -343,15 +343,15 @@ calculate_for_draw_scroll_bar:
mov bx,14
add ecx,16 shl 16
sub cx,31
int 0x40
mcall
popa
xor edx,edx
push ebx
mov bx,1
int 0x40
mcall
push ecx
add ebx,15 shl 16
int 0x40
mcall
pop ecx
pop ebx
mov [draw_scroll_character],1
@ -419,14 +419,14 @@ draw_scroll_bar_srectangle:
mov cx,1
cmp [draw_scroll_character],2
je .draw_center
int 0x40
mcall
pusha
add ecx,1 shl 16
add ebx,1 shl 16
mov cx,14
mov bx,14
mov edx,0xbbddff
int 0x40
mcall
xor edx,edx
cmp [draw_scroll_character],1
jne .draw_down
@ -434,42 +434,42 @@ draw_scroll_bar_srectangle:
mov bx,7
add ecx,8 shl 16
mov cx,1
int 0x40
mcall
sub ecx,1 shl 16
add ebx,1 shl 16
mov bx,5
int 0x40
mcall
sub ecx,1 shl 16
add ebx,1 shl 16
mov bx,3
int 0x40
mcall
sub ecx,1 shl 16
add ebx,1 shl 16
mov bx,1
int 0x40
mcall
jmp .continue
.draw_down:
add ebx,3 shl 16
mov bx,7
add ecx,5 shl 16
mov cx,1
int 0x40
mcall
add ecx,1 shl 16
add ebx,1 shl 16
mov bx,5
int 0x40
mcall
add ecx,1 shl 16
add ebx,1 shl 16
mov bx,3
int 0x40
mcall
add ecx,1 shl 16
add ebx,1 shl 16
mov bx,1
int 0x40
mcall
.continue:
popa
add ecx,15 shl 16
int 0x40
mcall
pop ecx
ret
@ -497,11 +497,11 @@ draw_scroll_bar_srectangle:
.draw_center_continue:
mov bx,14
mov edx,0xbbddff
int 0x40
mcall
xor edx,edx
mov cx,1
sub ecx,1 shl 16
int 0x40
mcall
pop ecx
cmp [scroll_pointer_1],1
jne .right_1
@ -517,15 +517,15 @@ draw_scroll_bar_srectangle:
mov bx,10
add ecx,4 shl 16
mov cx,1
int 0x40
mcall
add ecx,3 shl 16
sub ebx,1 shl 16
mov bx,12
int 0x40
mcall
add ebx,1 shl 16
mov bx,10
add ecx,3 shl 16
int 0x40
mcall
.continue_1:
popa
ror ecx,16
@ -537,7 +537,7 @@ draw_scroll_bar_srectangle:
add ecx,[right_scroll_compens]
.draw_center_continue_2:
rol ecx,16
int 0x40
mcall
pop ecx
ret
;---------------------------------------------------------------------

View File

@ -19,6 +19,7 @@ left_sort_files:
sub ecx,[left_folder_data]
mov ebx,[appl_memory]
add ecx,ebx
add ecx,4 ; äëÿ ñòðàõîâêè
push ebx
mov [appl_memory],ecx
mcall 64,1
@ -46,6 +47,7 @@ left_sort_files:
rep movsd
; sub memory for sorting
pop ecx
add ecx,4 ; äëÿ ñòðàõîâêè
mov [appl_memory],ecx
mcall 64,1
cmp [exit_to_dir],0
@ -138,6 +140,12 @@ left_type_sort_1:
je .1
ja .add_counter
.no_add_counter:
; pushad
; pushfd
; dps 'left_type_sort'
; newline
; popfd
; popad
call move_area_for_bdvk
pop edi esi
jmp .end
@ -579,9 +587,29 @@ move_area_for_bdvk:
sub ecx,ebx
sub ecx,eax
shr ecx,2
; pushad
; pushfd
; dph [appl_memory]
; newline
; dps 'ECX:'
; dpd ecx
; newline
; dps 'ESI:'
; dpd esi
; newline
; dps 'EDI:'
; dpd edi
; newline
; popfd
; popad
std
rep movsd
; pushad
; pushfd
; dps 'move_area_for_bdvk END'
; newline
; popfd
; popad
; mov eax,ecx
; mov ebx,304
; mov edx,0
@ -654,6 +682,7 @@ right_sort_files:
push ecx
sub ecx,[right_folder_data]
add ecx,[esp]
add ecx,4 ; äëÿ ñòðàõîâêè
mov [appl_memory],ecx
mcall 64,1
mov edi,[esp]
@ -680,6 +709,7 @@ right_sort_files:
rep movsd
; sub memory for sorting
pop ecx
add ecx,4 ; äëÿ ñòðàõîâêè
mov [appl_memory],ecx
mcall 64,1
cmp [exit_to_dir],0
@ -766,6 +796,12 @@ right_type_sort_1:
je .1
ja .add_counter
.no_add_counter:
; pushad
; pushfd
; dps 'left_type_sort'
; newline
; popfd
; popad
call move_area_for_bdvk
pop edi esi
jmp .end

View File

@ -1,4 +1,4 @@
header_text db 'Kolibri File Manager v0.47g 24/07/2013',0
header_text db 'Kolibri File Manager v0.47h 28/07/2013',0
;---------------------------------------------------------------------
fbutton_name:
.f1 db '1 Help',0