KFM: use build-in icons

git-svn-id: svn://kolibrios.org@7996 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2020-05-28 16:00:42 +00:00
parent 7a6c5c33a6
commit 717f2f2b9f
16 changed files with 348 additions and 358 deletions

View File

@ -30,7 +30,6 @@ img_files = {
{"DEVELOP/T_EDIT.INI", PROGS .. "/other/t_edit/t_edit.ini"}, {"DEVELOP/T_EDIT.INI", PROGS .. "/other/t_edit/t_edit.ini"},
{"File Managers/ICONS.INI", "common/File Managers/icons.ini"}, {"File Managers/ICONS.INI", "common/File Managers/icons.ini"},
{"File Managers/KFM.INI", "common/File Managers/kfm.ini"}, {"File Managers/KFM.INI", "common/File Managers/kfm.ini"},
{"File Managers/ICONS.BMP", PROGS .. "/fs/kfm/trunk/icons.bmp"},
{"File Managers/FNAV/ABOUT.TXT", "common/File Managers/fNav/About.txt"}, {"File Managers/FNAV/ABOUT.TXT", "common/File Managers/fNav/About.txt"},
{"File Managers/FNAV/FNAV", "common/File Managers/fNav/fNav.kex"}, {"File Managers/FNAV/FNAV", "common/File Managers/fNav/fNav.kex"},
{"File Managers/FNAV/FNAV.EXT", "common/File Managers/fNav/fnav.ext"}, {"File Managers/FNAV/FNAV.EXT", "common/File Managers/fNav/fnav.ext"},

View File

@ -4,8 +4,8 @@ hscrl_capt dd -1
body_capt dd -1 body_capt dd -1
s_status dd 0 s_status dd 0
lineHeight dd LINEH lineHeight dd LINEH
charWidth dd 6 charWidth dd 8
scale db 0 scale db 0x10
ins_mode db 1 ins_mode db 1
sz app_fasm ,'/rd/1/develop/fasm',0 sz app_fasm ,'/rd/1/develop/fasm',0

View File

@ -52,7 +52,7 @@ ASEPC = '-' ; separator character (char)
ATOPH = 19 ; menu bar height (pixels) ATOPH = 19 ; menu bar height (pixels)
SCRLW = 16 ; scrollbar widht/height (pixels) SCRLW = 16 ; scrollbar widht/height (pixels)
ATABW = 8 ; tab key indent width (chars) ATABW = 8 ; tab key indent width (chars)
LINEH = 10 ; line height (pixels) LINEH = 16+1 ; line height (pixels)
PATHL = 256 ; maximum path length (chars) !!! don't change !!! PATHL = 256 ; maximum path length (chars) !!! don't change !!!
AMINS = 8 ; minimal scroll thumb size (pixels) AMINS = 8 ; minimal scroll thumb size (pixels)
LCHGW = 3 ; changed/saved marker width (pixels) LCHGW = 3 ; changed/saved marker width (pixels)

View File

@ -1620,22 +1620,22 @@ endp
;--------------------------------------------------------------- ;---------------------------------------------------------------
proc key.ctrl_plus ;///// ZOOM IN ////////////////////////////// proc key.ctrl_plus ;///// ZOOM IN //////////////////////////////
;--------------------------------------------------------------- ;---------------------------------------------------------------
cmp [scale],7 cmp [scale],0x17
jz @f jz @f
inc [scale] inc [scale]
add [lineHeight], LINEH add [lineHeight], LINEH
add [charWidth],6 add [charWidth], 8
jmp draw_editor jmp draw_editor
endp endp
;--------------------------------------------------------------- ;---------------------------------------------------------------
proc key.ctrl_minus ;///// ZOOM OUT //////////////////////////// proc key.ctrl_minus ;///// ZOOM OUT ////////////////////////////
;--------------------------------------------------------------- ;---------------------------------------------------------------
cmp [scale],0 cmp [scale],0x10
jz @f jz @f
dec [scale] dec [scale]
sub [lineHeight], LINEH sub [lineHeight], LINEH
sub [charWidth],6 sub [charWidth], 8
jmp draw_editor jmp draw_editor
@@: @@:
ret ret

View File

@ -95,6 +95,8 @@ mouse:
jmp [mouse_ev+eax*4-4] jmp [mouse_ev+eax*4-4]
.wheel: .wheel:
test [shi], 0x0C ; left or right ctrl key pressed
jnz .wheel_ctrl
movsx eax,word[mst+4] movsx eax,word[mst+4]
lea eax,[eax*3] lea eax,[eax*3]
add [cur_editor.TopLeft.X],eax add [cur_editor.TopLeft.X],eax
@ -107,6 +109,17 @@ mouse:
call draw_editor call draw_editor
jmp still.skip_write jmp still.skip_write
.wheel_ctrl:
cmp word[mst+6], 0 ; vertical scroll?
je still.skip_write
test word[mst+6], 0x8000 ; scroll up or down?
jnz .wheel_ctrl_down
call key.ctrl_plus ; zoom in
jmp still.skip_write
.wheel_ctrl_down:
call key.ctrl_minus ; zoom out
jmp still.skip_write
.move: .move:
mcall 37,1 mcall 37,1
movsx ebx,ax movsx ebx,ax

View File

@ -1,5 +1,4 @@
@echo lang fix en >lang.inc @echo lang fix en >lang.inc
@fasm -m 16384 kfm.asm kfm @fasm -m 16384 kfm.asm kfm
@erase lang.inc @erase lang.inc
@kpack kfm
@pause @pause

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -273,4 +273,4 @@ sysopen:
db '/sys/@open',0 db '/sys/@open',0
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
buttons_file_data file 'images/buttons.raw' buttons_file_data file 'images/buttons.raw'
;icons_file_data file 'icons.bmp' icons_file_data file 'images/icons.raw'

View File

@ -224,11 +224,11 @@ draw_icon:
call get_icon_number call get_icon_number
imul ebx,270 imul ebx,270
add ebx,mem add ebx,icons_file_data
jmp .draw jmp .draw
;-------------------------------------- ;--------------------------------------
.draw_dir_pic: .draw_dir_pic:
mov ebx,mem mov ebx,icons_file_data
cmp [edx],word '..' cmp [edx],word '..'
jne .draw jne .draw

View File

@ -7,8 +7,6 @@ read_folder_1_error:
initiation_error: initiation_error:
mov [error_pointer],ini_file_name mov [error_pointer],ini_file_name
jmp error_window jmp error_window
icon_error:
mov [error_pointer],icons_file_name
error_window: error_window:
mov [file_system_error],eax mov [file_system_error],eax
.red: .red:

View File

@ -1,6 +0,0 @@
exit_apl:
mov [confirmation_type],exit_type
call confirmation_action
cmp [work_confirmation_yes],1
jne red
mcall -1

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -68,7 +68,6 @@ START:
mov ax,[select_disk_char] mov ax,[select_disk_char]
mov [read_folder_name],ax mov [read_folder_name],ax
mov [read_folder_1_name],ax mov [read_folder_1_name],ax
call load_icon_and_convert_to_img
call load_initiation_file call load_initiation_file
call add_memory_for_folders call add_memory_for_folders
call device_detect_f70 call device_detect_f70
@ -245,18 +244,6 @@ prepare_load_data_3:
mov [read_file.size],eax mov [read_file.size],eax
ret ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
load_icon_and_convert_to_img:
mov ebx,icons_file_name
call prepare_load_data
jnz icon_error
call prepare_load_data_2
add eax,mem
call prepare_load_data_1
jnz icon_error
call convert_bmp_to_img
call sub_application_memory
ret
;---------------------------------------------------------------------
load_initiation_file: load_initiation_file:
mov ebx,ini_file_name mov ebx,ini_file_name
call prepare_load_data call prepare_load_data
@ -349,6 +336,13 @@ sub_application_memory:
mcall 64,1 mcall 64,1
ret ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
exit_apl:
mov [confirmation_type],exit_type
call confirmation_action
cmp [work_confirmation_yes],1
jne red
mcall -1
;---------------------------------------------------------------------
include 'key.inc' include 'key.inc'
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
include 'markfile.inc' include 'markfile.inc'
@ -379,8 +373,6 @@ include 'err_wind.inc'
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
include 'detect.inc' include 'detect.inc'
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
include 'conv_bmp.inc'
;---------------------------------------------------------------------
include 'tran_ini.inc' include 'tran_ini.inc'
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
include 'help.inc' include 'help.inc'
@ -389,8 +381,6 @@ include 'convchar.inc'
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
include 'sort.inc' include 'sort.inc'
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
include 'exit.inc'
;---------------------------------------------------------------------
include 'progrbar.inc' include 'progrbar.inc'
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
include 'scroll.inc' include 'scroll.inc'

View File

@ -1,4 +1,4 @@
header_text db 'Kolibri File Manager v0.48',0 header_text db 'Kolibri File Manager v0.48b',0
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
fbutton_name: fbutton_name:
.f1 db '1 Help',0 .f1 db '1 Help',0
@ -82,9 +82,6 @@ year_table:
ini_file_name: ini_file_name:
db 'kfm.ini',0 db 'kfm.ini',0
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
icons_file_name:
db 'icons.bmp',0
;---------------------------------------------------------------------
error_type: error_type:
db 'File system error',0 db 'File system error',0
;--------------------------------------------------------------------- ;---------------------------------------------------------------------