forked from KolibriOS/kolibrios
KFM
1) Now shows the full value for the year 2) Fix sort buttons 3) For ".." dir is not shown unnecessary data git-svn-id: svn://kolibrios.org@9726 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a89837dd81
commit
4debc9fd1b
@ -165,9 +165,9 @@ left_sort_date:
|
|||||||
je still
|
je still
|
||||||
mov [left_sort_flag],3
|
mov [left_sort_flag],3
|
||||||
.1:
|
.1:
|
||||||
|
call draw_left_select_disk_button
|
||||||
call draw_left_sort_button
|
call draw_left_sort_button
|
||||||
call left_sort_files
|
call left_sort_files
|
||||||
; mov [left_panel_clear_all],1
|
|
||||||
call draw_left_panel
|
call draw_left_panel
|
||||||
jmp still
|
jmp still
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
@ -195,6 +195,7 @@ right_sort_date:
|
|||||||
je still
|
je still
|
||||||
mov [right_sort_flag],3
|
mov [right_sort_flag],3
|
||||||
.1:
|
.1:
|
||||||
|
call draw_right_select_disk_button
|
||||||
call draw_right_sort_button
|
call draw_right_sort_button
|
||||||
call right_sort_files
|
call right_sort_files
|
||||||
call draw_right_panel
|
call draw_right_panel
|
||||||
|
@ -39,7 +39,7 @@ _new_but:
|
|||||||
draw_left_sort_button:
|
draw_left_sort_button:
|
||||||
mov bx,[left_panel_x.start_x]
|
mov bx,[left_panel_x.start_x]
|
||||||
add bx,[left_panel_x.size_x]
|
add bx,[left_panel_x.size_x]
|
||||||
sub ebx,50+15
|
sub ebx,50+15+12
|
||||||
mov cx,[left_panel_y.start_y]
|
mov cx,[left_panel_y.start_y]
|
||||||
call calclulate_sort_button_1
|
call calclulate_sort_button_1
|
||||||
mov edx,145
|
mov edx,145
|
||||||
@ -80,7 +80,7 @@ calclulate_sort_button_2:
|
|||||||
cmp ebp,4
|
cmp ebp,4
|
||||||
jne @f
|
jne @f
|
||||||
|
|
||||||
mov bx,15
|
mov bx,15+12
|
||||||
jmp .continue
|
jmp .continue
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@@:
|
@@:
|
||||||
@ -129,7 +129,7 @@ calclulate_sort_button_2:
|
|||||||
draw_right_sort_button:
|
draw_right_sort_button:
|
||||||
mov bx,[right_panel_x.start_x]
|
mov bx,[right_panel_x.start_x]
|
||||||
add bx,[right_panel_x.size_x]
|
add bx,[right_panel_x.size_x]
|
||||||
sub ebx,50+15
|
sub ebx,50+15+12
|
||||||
mov cx,[right_panel_y.start_y]
|
mov cx,[right_panel_y.start_y]
|
||||||
call calclulate_sort_button_1
|
call calclulate_sort_button_1
|
||||||
mov edx,149
|
mov edx,149
|
||||||
@ -283,37 +283,20 @@ decimal_string_2:
|
|||||||
pop edx ecx ebx eax
|
pop edx ecx ebx eax
|
||||||
ret
|
ret
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
decimal_string_4:
|
decimal_string:
|
||||||
push eax ecx edx
|
push eax ebx ecx edx
|
||||||
xor ecx,ecx
|
mov ecx,10
|
||||||
mov [ebx],byte '0'
|
|
||||||
inc ebx
|
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
.p3:
|
.p3:
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
push ebx
|
div ecx
|
||||||
mov ebx,10
|
|
||||||
div ebx
|
|
||||||
pop ebx
|
|
||||||
add edx,48
|
add edx,48
|
||||||
push edx
|
|
||||||
inc ecx
|
|
||||||
cmp eax,0
|
|
||||||
jne .p3
|
|
||||||
|
|
||||||
cmp ecx,3
|
|
||||||
jbe .p4
|
|
||||||
|
|
||||||
mov ecx,4
|
|
||||||
dec ebx
|
|
||||||
;--------------------------------------
|
|
||||||
.p4:
|
|
||||||
pop edx
|
|
||||||
mov [ebx],dl
|
mov [ebx],dl
|
||||||
inc ebx
|
dec ebx
|
||||||
loop .p4
|
test eax,eax
|
||||||
|
jnz .p3
|
||||||
|
|
||||||
pop edx ecx eax
|
pop edx ecx ebx eax
|
||||||
ret
|
ret
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
draw_type_size_date:
|
draw_type_size_date:
|
||||||
@ -430,9 +413,9 @@ draw_type_size_date:
|
|||||||
pop ecx
|
pop ecx
|
||||||
jz @f
|
jz @f
|
||||||
|
|
||||||
mov ebx,size_table
|
mov ebx,size_table+3
|
||||||
call decimal_string_4
|
call decimal_string
|
||||||
mov [ebx],byte 'E' ; Exa Byte
|
mov [ebx+1],byte 'E' ; Exa Byte
|
||||||
jmp .size_convert_end
|
jmp .size_convert_end
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@@:
|
@@:
|
||||||
@ -442,9 +425,9 @@ draw_type_size_date:
|
|||||||
pop ecx
|
pop ecx
|
||||||
jz @f
|
jz @f
|
||||||
|
|
||||||
mov ebx,size_table
|
mov ebx,size_table+3
|
||||||
call decimal_string_4
|
call decimal_string
|
||||||
mov [ebx],byte 'P' ; Peta Byte
|
mov [ebx+1],byte 'P' ; Peta Byte
|
||||||
jmp .size_convert_end
|
jmp .size_convert_end
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@@:
|
@@:
|
||||||
@ -454,9 +437,9 @@ draw_type_size_date:
|
|||||||
pop ecx
|
pop ecx
|
||||||
jz @f
|
jz @f
|
||||||
|
|
||||||
mov ebx,size_table
|
mov ebx,size_table+3
|
||||||
call decimal_string_4
|
call decimal_string
|
||||||
mov [ebx],byte 'T' ; Tera Byte
|
mov [ebx+1],byte 'T' ; Tera Byte
|
||||||
jmp .size_convert_end
|
jmp .size_convert_end
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@@:
|
@@:
|
||||||
@ -466,9 +449,9 @@ draw_type_size_date:
|
|||||||
pop ecx
|
pop ecx
|
||||||
jz @f
|
jz @f
|
||||||
|
|
||||||
mov ebx,size_table
|
mov ebx,size_table+3
|
||||||
call decimal_string_4
|
call decimal_string
|
||||||
mov [ebx],byte 'G' ; Giga Byte
|
mov [ebx+1],byte 'G' ; Giga Byte
|
||||||
jmp .size_convert_end
|
jmp .size_convert_end
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@@:
|
@@:
|
||||||
@ -478,9 +461,9 @@ draw_type_size_date:
|
|||||||
test eax,eax
|
test eax,eax
|
||||||
jz @f
|
jz @f
|
||||||
|
|
||||||
mov ebx,size_table
|
mov ebx,size_table+3
|
||||||
call decimal_string_4
|
call decimal_string
|
||||||
mov [ebx],byte 'M' ; Mega Byte
|
mov [ebx+1],byte 'M' ; Mega Byte
|
||||||
jmp .size_convert_end
|
jmp .size_convert_end
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@@:
|
@@:
|
||||||
@ -489,39 +472,27 @@ draw_type_size_date:
|
|||||||
test eax,eax
|
test eax,eax
|
||||||
jz @f
|
jz @f
|
||||||
|
|
||||||
mov ebx,size_table
|
mov ebx,size_table+3
|
||||||
call decimal_string_4
|
call decimal_string
|
||||||
mov [ebx],byte 'K' ; Kilo Byte
|
mov [ebx+1],byte 'K' ; Kilo Byte
|
||||||
jmp .size_convert_end
|
jmp .size_convert_end
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@@:
|
@@:
|
||||||
mov eax,ebx
|
mov eax,ebx
|
||||||
;.size_convert:
|
;.size_convert:
|
||||||
mov ebx,size_table
|
mov ebx,size_table+4
|
||||||
call decimal_string_4
|
call decimal_string
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
.size_convert_end:
|
.size_convert_end:
|
||||||
cmp [size_table],byte '0'
|
|
||||||
jne @f
|
|
||||||
|
|
||||||
mov [size_table],byte ' '
|
|
||||||
;--------------------------------------
|
|
||||||
@@:
|
|
||||||
cmp [size_table+4],byte ' '
|
|
||||||
jne @f
|
|
||||||
|
|
||||||
mov esi,size_table+3
|
|
||||||
mov edi,esi
|
|
||||||
inc edi
|
|
||||||
mov ecx,5
|
|
||||||
std
|
|
||||||
rep movsb
|
|
||||||
jmp @r
|
|
||||||
;--------------------------------------
|
|
||||||
@@:
|
|
||||||
pop edx ebx
|
pop edx ebx
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
.date:
|
.date:
|
||||||
|
cmp [edx],word '..'
|
||||||
|
jne @f
|
||||||
|
|
||||||
|
cmp [edx+2],byte 0
|
||||||
|
je .not_show_date
|
||||||
|
@@:
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mov al,[edx-40+28]
|
mov al,[edx-40+28]
|
||||||
push ebx
|
push ebx
|
||||||
@ -531,14 +502,16 @@ draw_type_size_date:
|
|||||||
mov ebx,date_table+3
|
mov ebx,date_table+3
|
||||||
call decimal_string_2
|
call decimal_string_2
|
||||||
mov ax,[edx-40+30]
|
mov ax,[edx-40+30]
|
||||||
mov ebx,year_table
|
lea ebx,[year_table+4]
|
||||||
call decimal_string_4
|
mov [ebx-4], dword '0000'
|
||||||
mov ax,[year_table+2]
|
mov [ebx], byte '0'
|
||||||
mov [date_table+6],ax
|
call decimal_string
|
||||||
|
mov eax,[year_table+1]
|
||||||
|
mov [date_table+6],eax
|
||||||
pop ebx
|
pop ebx
|
||||||
ror ebx,16
|
ror ebx,16
|
||||||
add bx,[left_panel_x.size_x]
|
add bx,[left_panel_x.size_x]
|
||||||
sub ebx,122+12+15
|
sub ebx,161 ;122+12+15
|
||||||
rol ebx,16
|
rol ebx,16
|
||||||
mov ecx,0
|
mov ecx,0
|
||||||
cmp [marked_file],byte 0
|
cmp [marked_file],byte 0
|
||||||
@ -547,7 +520,9 @@ draw_type_size_date:
|
|||||||
mov ecx,0xff0000
|
mov ecx,0xff0000
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@@:
|
@@:
|
||||||
mcall 4,,,type_table,20
|
mcall 4,,,type_table,22
|
||||||
|
;--------------------------------------
|
||||||
|
.not_show_date:
|
||||||
popa
|
popa
|
||||||
ret
|
ret
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
@ -660,7 +635,7 @@ draw_folder_data:
|
|||||||
xor edx,edx
|
xor edx,edx
|
||||||
div ebx
|
div ebx
|
||||||
pop edx ebx
|
pop edx ebx
|
||||||
sub eax,23+2+2
|
sub eax,23+2+2+2
|
||||||
mov esi,[file_name_length]
|
mov esi,[file_name_length]
|
||||||
mov [temp_counter_1],0
|
mov [temp_counter_1],0
|
||||||
cmp esi,eax
|
cmp esi,eax
|
||||||
|
Loading…
Reference in New Issue
Block a user