From 717f2f2b9fe30abe6d60c5c72588259d7d2ebd27 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Thu, 28 May 2020 16:00:42 +0000 Subject: [PATCH] KFM: use build-in icons git-svn-id: svn://kolibrios.org@7996 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/Tupfile.lua | 1 - .../develop/tinypad/trunk/data/tp-idata.inc | 4 +- programs/develop/tinypad/trunk/tinypad.asm | 2 +- programs/develop/tinypad/trunk/tp-key.asm | 12 +- programs/develop/tinypad/trunk/tp-mouse.asm | 643 +++++++++--------- programs/fs/kfm/trunk/build.bat | 1 - programs/fs/kfm/trunk/buttons.bmp | Bin 6486 -> 0 bytes programs/fs/kfm/trunk/data.inc | 2 +- programs/fs/kfm/trunk/draw.inc | 4 +- programs/fs/kfm/trunk/err_wind.inc | 2 - programs/fs/kfm/trunk/exit.inc | 6 - programs/fs/kfm/trunk/{ => images}/icons.bmp | Bin programs/fs/kfm/trunk/images/icons.raw | Bin 0 -> 4860 bytes programs/fs/kfm/trunk/{ => images}/icons2.bmp | Bin programs/fs/kfm/trunk/kfm.asm | 24 +- programs/fs/kfm/trunk/text.inc | 5 +- 16 files changed, 348 insertions(+), 358 deletions(-) delete mode 100644 programs/fs/kfm/trunk/buttons.bmp delete mode 100644 programs/fs/kfm/trunk/exit.inc rename programs/fs/kfm/trunk/{ => images}/icons.bmp (100%) create mode 100644 programs/fs/kfm/trunk/images/icons.raw rename programs/fs/kfm/trunk/{ => images}/icons2.bmp (100%) diff --git a/data/Tupfile.lua b/data/Tupfile.lua index 947a5c8f23..78c3453ae6 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -30,7 +30,6 @@ img_files = { {"DEVELOP/T_EDIT.INI", PROGS .. "/other/t_edit/t_edit.ini"}, {"File Managers/ICONS.INI", "common/File Managers/icons.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/FNAV", "common/File Managers/fNav/fNav.kex"}, {"File Managers/FNAV/FNAV.EXT", "common/File Managers/fNav/fnav.ext"}, diff --git a/programs/develop/tinypad/trunk/data/tp-idata.inc b/programs/develop/tinypad/trunk/data/tp-idata.inc index e30be9d668..bd42c046c4 100644 --- a/programs/develop/tinypad/trunk/data/tp-idata.inc +++ b/programs/develop/tinypad/trunk/data/tp-idata.inc @@ -4,8 +4,8 @@ hscrl_capt dd -1 body_capt dd -1 s_status dd 0 lineHeight dd LINEH -charWidth dd 6 -scale db 0 +charWidth dd 8 +scale db 0x10 ins_mode db 1 sz app_fasm ,'/rd/1/develop/fasm',0 diff --git a/programs/develop/tinypad/trunk/tinypad.asm b/programs/develop/tinypad/trunk/tinypad.asm index 5b43a48c9c..74ecaecab4 100644 --- a/programs/develop/tinypad/trunk/tinypad.asm +++ b/programs/develop/tinypad/trunk/tinypad.asm @@ -52,7 +52,7 @@ ASEPC = '-' ; separator character (char) ATOPH = 19 ; menu bar height (pixels) SCRLW = 16 ; scrollbar widht/height (pixels) 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 !!! AMINS = 8 ; minimal scroll thumb size (pixels) LCHGW = 3 ; changed/saved marker width (pixels) diff --git a/programs/develop/tinypad/trunk/tp-key.asm b/programs/develop/tinypad/trunk/tp-key.asm index 100d7bf511..2c9d180381 100644 --- a/programs/develop/tinypad/trunk/tp-key.asm +++ b/programs/develop/tinypad/trunk/tp-key.asm @@ -1620,22 +1620,22 @@ endp ;--------------------------------------------------------------- proc key.ctrl_plus ;///// ZOOM IN ////////////////////////////// ;--------------------------------------------------------------- - cmp [scale],7 + cmp [scale],0x17 jz @f inc [scale] - add [lineHeight],LINEH - add [charWidth],6 + add [lineHeight], LINEH + add [charWidth], 8 jmp draw_editor endp ;--------------------------------------------------------------- proc key.ctrl_minus ;///// ZOOM OUT //////////////////////////// ;--------------------------------------------------------------- - cmp [scale],0 + cmp [scale],0x10 jz @f dec [scale] - sub [lineHeight],LINEH - sub [charWidth],6 + sub [lineHeight], LINEH + sub [charWidth], 8 jmp draw_editor @@: ret diff --git a/programs/develop/tinypad/trunk/tp-mouse.asm b/programs/develop/tinypad/trunk/tp-mouse.asm index b109997b02..9290567bae 100644 --- a/programs/develop/tinypad/trunk/tp-mouse.asm +++ b/programs/develop/tinypad/trunk/tp-mouse.asm @@ -1,375 +1,388 @@ diff16 'tp-mouse.asm',0,$ proc check_mouse_in_edit_area - mcall 37,1 - mov ebx,eax - and ebx,0x0000FFFF - shr eax,16 - mov ecx,[cur_editor.Bounds.Top] - inc ecx - pushd [cur_editor.Bounds.Left] ecx [cur_editor.Bounds.Right] ecx - popd [__rc+0xC] [__rc+0x8] [__rc+0x4] [__rc+0x0] - sub [__rc+0x8],SCRLW+6 - mov ecx,[cur_editor.Gutter.Width] - add [__rc+0x0],ecx - mov ecx,[lines.scr] - imul ecx,[lineHeight] - dec ecx - add [__rc+0xC],ecx - mov ecx,__rc - call pt_in_rect - ret + mcall 37,1 + mov ebx,eax + and ebx,0x0000FFFF + shr eax,16 + mov ecx,[cur_editor.Bounds.Top] + inc ecx + pushd [cur_editor.Bounds.Left] ecx [cur_editor.Bounds.Right] ecx + popd [__rc+0xC] [__rc+0x8] [__rc+0x4] [__rc+0x0] + sub [__rc+0x8],SCRLW+6 + mov ecx,[cur_editor.Gutter.Width] + add [__rc+0x0],ecx + mov ecx,[lines.scr] + imul ecx,[lineHeight] + dec ecx + add [__rc+0xC],ecx + mov ecx,__rc + call pt_in_rect + ret endp proc get_mouse_event - mcall 37,2 - and al,3 - mov bl,[ecx] - cmp [ecx],al - mov [ecx],al - jne @f - mcall 37,7 - or eax,eax - jz .mv - add [ecx+6],ax - shr eax,16 - add [ecx+4],ax - mov eax,MEV_WHEEL - ret - .mv: mov eax,MEV_MOVE - ret - @@: mov bh,al - and ebx,0x0101 - cmp bl,bh - je .rb - test al,1 - jz @f - mov eax,MEV_LDOWN - ret - @@: mov eax,MEV_LUP - ret - .rb: test al,2 - jz @f - mov eax,MEV_RDOWN - ret - @@: mov eax,MEV_RUP - ret + mcall 37,2 + and al,3 + mov bl,[ecx] + cmp [ecx],al + mov [ecx],al + jne @f + mcall 37,7 + or eax,eax + jz .mv + add [ecx+6],ax + shr eax,16 + add [ecx+4],ax + mov eax,MEV_WHEEL + ret + .mv: mov eax,MEV_MOVE + ret + @@: mov bh,al + and ebx,0x0101 + cmp bl,bh + je .rb + test al,1 + jz @f + mov eax,MEV_LDOWN + ret + @@: mov eax,MEV_LUP + ret + .rb: test al,2 + jz @f + mov eax,MEV_RDOWN + ret + @@: mov eax,MEV_RUP + ret endp mouse_ev dd mouse.l_down,mouse.l_up,mouse.r_down,mouse.r_up,mouse.wheel,mouse.move mouse: - mcall 9,p_info,-1 - - mov eax,[p_info+70] ;status of window - test eax,100b - jne still.skip_write - - mov ecx,mst - call get_mouse_event - cmp [bot_mode],0 - je @f - mov ah,al - mov al,4 - call [bot_dlg_handler] - jmp still.skip_write - @@: cmp al,MEV_MOVE - jne .no_move - cmp [popup_active],1 - je @f + mcall 9,p_info,-1 + + mov eax,[p_info+70] ;status of window + test eax,100b + jne still.skip_write + + mov ecx,mst + call get_mouse_event + cmp [bot_mode],0 + je @f + mov ah,al + mov al,4 + call [bot_dlg_handler] + jmp still.skip_write + @@: cmp al,MEV_MOVE + jne .no_move + cmp [popup_active],1 + je @f .no_move: - mov [s_status],0 + mov [s_status],0 - push eax - mcall 9,p_info,-1 - cmp ax,[p_info.window_stack_position] - pop eax - jne still.skip_write + push eax + mcall 9,p_info,-1 + cmp ax,[p_info.window_stack_position] + pop eax + jne still.skip_write @@: ;!!! cmp [just_from_popup],0 ;!!! je @f ;!!! cmp al,MEV_LUP ;!!! jne still.skip_write - @@: mov [mev],al - jmp [mouse_ev+eax*4-4] + @@: mov [mev],al + jmp [mouse_ev+eax*4-4] .wheel: - movsx eax,word[mst+4] - lea eax,[eax*3] - add [cur_editor.TopLeft.X],eax - movsx eax,word[mst+6] - lea eax,[eax*3] - add [cur_editor.TopLeft.Y],eax - xor eax,eax - mov [mst+4],eax - call check_bottom_right - call draw_editor - jmp still.skip_write + test [shi], 0x0C ; left or right ctrl key pressed + jnz .wheel_ctrl + movsx eax,word[mst+4] + lea eax,[eax*3] + add [cur_editor.TopLeft.X],eax + movsx eax,word[mst+6] + lea eax,[eax*3] + add [cur_editor.TopLeft.Y],eax + xor eax,eax + mov [mst+4],eax + call check_bottom_right + call draw_editor + 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: - mcall 37,1 - movsx ebx,ax - sar eax,16 - cmp [body_capt],0 - jge .check_body.2 - cmp [vscrl_capt],0 - jge .check_vscroll.2 - cmp [hscrl_capt],0 - jge .check_hscroll.2 + mcall 37,1 + movsx ebx,ax + sar eax,16 + cmp [body_capt],0 + jge .check_body.2 + cmp [vscrl_capt],0 + jge .check_vscroll.2 + cmp [hscrl_capt],0 + jge .check_hscroll.2 - cmp [do_not_draw],0 - jne still.skip_write - mov eax,[mi_cur] - call get_active_menu_item - cmp eax,[mi_cur] - je still.skip_write - push [mi_cur] - cmp [popup_active],0 - je @f - mov [mi_cur],eax - @@: call draw_main_menu - pop [mi_cur] - cmp [popup_active],0 - je still.skip_write - mov ecx,[mi_cur] - or ecx,ecx - js still.skip_write - mov eax,[main_menu.popups+ecx*4-4] - mov edx,main_menu - call dword[main_menu.onshow+ecx*4-4] - call setup_main_menu_popup - mcall 60,2,[h_popup],POPUP_STACK,4 - - call draw_main_menu + cmp [do_not_draw],0 + jne still.skip_write + mov eax,[mi_cur] + call get_active_menu_item + cmp eax,[mi_cur] + je still.skip_write + push [mi_cur] + cmp [popup_active],0 + je @f + mov [mi_cur],eax + @@: call draw_main_menu + pop [mi_cur] + cmp [popup_active],0 + je still.skip_write + mov ecx,[mi_cur] + or ecx,ecx + js still.skip_write + mov eax,[main_menu.popups+ecx*4-4] + mov edx,main_menu + call dword[main_menu.onshow+ecx*4-4] + call setup_main_menu_popup + mcall 60,2,[h_popup],POPUP_STACK,4 + + call draw_main_menu - jmp still.skip_write + jmp still.skip_write .r_down: - @@: cmp [popup_active],0 - je @f - mcall 5,1 - jmp @b - @@: cmp [mouse_captured],0 - jne still.skip_write - call check_mouse_in_edit_area - jnc still.skip_write - mcall 37,0 - mov [mm.Edit+POPUP.pos],eax - @@: mcall 37,2 - cmp eax,ebx - jnz @f - mcall 5,1 - jmp @b - @@: and [mst],0xFD - call onshow.edit - mov dword[POPUP_STACK],mm.Edit - mcall 51,1,popup_thread_start,POPUP_STACK - mov [h_popup],eax - jmp still.skip_write + @@: cmp [popup_active],0 + je @f + mcall 5,1 + jmp @b + @@: cmp [mouse_captured],0 + jne still.skip_write + call check_mouse_in_edit_area + jnc still.skip_write + mcall 37,0 + mov [mm.Edit+POPUP.pos],eax + @@: mcall 37,2 + cmp eax,ebx + jnz @f + mcall 5,1 + jmp @b + @@: and [mst],0xFD + call onshow.edit + mov dword[POPUP_STACK],mm.Edit + mcall 51,1,popup_thread_start,POPUP_STACK + mov [h_popup],eax + jmp still.skip_write .r_up: - jmp still.skip_write + jmp still.skip_write .l_down: - call check_mouse_in_edit_area - jnc .check_vscroll - mov [mouse_captured],1 - mov [body_capt],1 + call check_mouse_in_edit_area + jnc .check_vscroll + mov [mouse_captured],1 + mov [body_capt],1 - call clear_selection + call clear_selection .check_body.2: - sub eax,[cur_editor.Bounds.Left] - sub ebx,[cur_editor.Bounds.Top] - sub eax,[cur_editor.Gutter.Width] - sub eax,LCHGW - sub ebx,2 - push eax - mov eax,ebx - cdq - mov ecx,[lineHeight] - idiv ecx - @@: add eax,[cur_editor.TopLeft.Y] - mov ebx,eax - pop eax - cdq - mov ecx,[charWidth] - idiv ecx - @@: add eax,[cur_editor.TopLeft.X] - mov ecx, ebx - call get_line_offset - cmp eax,[esi] - jl @f - mov eax,[esi] - @@: cmp ebx,[cur_editor.Lines.Count] - jl @f - mov ebx,[cur_editor.Lines.Count] - dec ebx + sub eax,[cur_editor.Bounds.Left] + sub ebx,[cur_editor.Bounds.Top] + sub eax,[cur_editor.Gutter.Width] + sub eax,LCHGW + sub ebx,2 + push eax + mov eax,ebx + cdq + mov ecx,[lineHeight] + idiv ecx + @@: add eax,[cur_editor.TopLeft.Y] + mov ebx,eax + pop eax + cdq + mov ecx,[charWidth] + idiv ecx + @@: add eax,[cur_editor.TopLeft.X] + mov ecx, ebx + call get_line_offset + cmp eax,[esi] + jl @f + mov eax,[esi] + @@: cmp ebx,[cur_editor.Lines.Count] + jl @f + mov ebx,[cur_editor.Lines.Count] + dec ebx @@: - cmp [cur_editor.Caret.X],eax - jne .change_cur_pos - cmp [cur_editor.Caret.Y],ebx - jne .change_cur_pos - call editor_check_for_changes - jmp still.skip_write + cmp [cur_editor.Caret.X],eax + jne .change_cur_pos + cmp [cur_editor.Caret.Y],ebx + jne .change_cur_pos + call editor_check_for_changes + jmp still.skip_write .change_cur_pos: - mov [cur_editor.Caret.X],eax - mov [cur_editor.Caret.Y],ebx - call editor_check_for_changes - jmp still + mov [cur_editor.Caret.X],eax + mov [cur_editor.Caret.Y],ebx + call editor_check_for_changes + jmp still .check_vscroll: - mov ecx,[cur_editor.Bounds.Right] - sub ecx,SCRLW-1 - pushd ecx [cur_editor.Bounds.Top] ecx [cur_editor.Bounds.Bottom] - popd [__rc+0xC] [__rc+0x8] [__rc+0x4] [__rc+0x0] - add [__rc+0x8],SCRLW-2 - add [__rc+0x4],SCRLW-1 - sub [__rc+0xC],SCRLW*2+1 - mov ecx,__rc - call pt_in_rect - jnc .check_hscroll + mov ecx,[cur_editor.Bounds.Right] + sub ecx,SCRLW-1 + pushd ecx [cur_editor.Bounds.Top] ecx [cur_editor.Bounds.Bottom] + popd [__rc+0xC] [__rc+0x8] [__rc+0x4] [__rc+0x0] + add [__rc+0x8],SCRLW-2 + add [__rc+0x4],SCRLW-1 + sub [__rc+0xC],SCRLW*2+1 + mov ecx,__rc + call pt_in_rect + jnc .check_hscroll .check_vscroll.2: - sub ebx,[cur_editor.Bounds.Top] - sub ebx,SCRLW - cmp [vscrl_capt],0 - jge .vcaptured - mov eax,[cur_editor.VScroll.Top] - cmp ebx,eax - jb .center_vcapture - add eax,[cur_editor.VScroll.Size] - cmp ebx,eax - jae .center_vcapture - mov eax,ebx - sub eax,[cur_editor.VScroll.Top] - dec eax - mov [vscrl_capt],eax - dec ebx - jmp .vcaptured + sub ebx,[cur_editor.Bounds.Top] + sub ebx,SCRLW + cmp [vscrl_capt],0 + jge .vcaptured + mov eax,[cur_editor.VScroll.Top] + cmp ebx,eax + jb .center_vcapture + add eax,[cur_editor.VScroll.Size] + cmp ebx,eax + jae .center_vcapture + mov eax,ebx + sub eax,[cur_editor.VScroll.Top] + dec eax + mov [vscrl_capt],eax + dec ebx + jmp .vcaptured .center_vcapture: - mov eax,[cur_editor.VScroll.Size] - shr eax,1 - mov [vscrl_capt],eax + mov eax,[cur_editor.VScroll.Size] + shr eax,1 + mov [vscrl_capt],eax .vcaptured: - sub ebx,[vscrl_capt] - jns @f - xor ebx,ebx - @@: mov [mouse_captured],1 - mov eax,[cur_editor.Bounds.Bottom] - sub eax,[cur_editor.Bounds.Top] - sub eax,[cur_editor.VScroll.Size] - sub eax,SCRLW*3 - cmp eax,ebx - jge @f - mov ebx,eax + sub ebx,[vscrl_capt] + jns @f + xor ebx,ebx + @@: mov [mouse_captured],1 + mov eax,[cur_editor.Bounds.Bottom] + sub eax,[cur_editor.Bounds.Top] + sub eax,[cur_editor.VScroll.Size] + sub eax,SCRLW*3 + cmp eax,ebx + jge @f + mov ebx,eax @@: - mov [cur_editor.VScroll.Top],ebx - mov eax,[cur_editor.Lines.Count] - sub eax,[lines.scr] - imul ebx - mov ebx,[cur_editor.Bounds.Bottom] - sub ebx,[cur_editor.Bounds.Top] - sub ebx,SCRLW*3 - sub ebx,[cur_editor.VScroll.Size] - idiv ebx - cmp eax,[cur_editor.TopLeft.Y] - je still.skip_write - mov [cur_editor.TopLeft.Y],eax - call check_bottom_right - call draw_editor - jmp still.skip_write + mov [cur_editor.VScroll.Top],ebx + mov eax,[cur_editor.Lines.Count] + sub eax,[lines.scr] + imul ebx + mov ebx,[cur_editor.Bounds.Bottom] + sub ebx,[cur_editor.Bounds.Top] + sub ebx,SCRLW*3 + sub ebx,[cur_editor.VScroll.Size] + idiv ebx + cmp eax,[cur_editor.TopLeft.Y] + je still.skip_write + mov [cur_editor.TopLeft.Y],eax + call check_bottom_right + call draw_editor + jmp still.skip_write .check_hscroll: - pushd [cur_editor.Bounds.Left] [cur_editor.Bounds.Bottom] [cur_editor.Bounds.Right] [cur_editor.Bounds.Bottom] - popd [__rc+0xC] [__rc+0x8] [__rc+0x4] [__rc+0x0] - add [__rc+0x8],-SCRLW*2-1 - add [__rc+0x4],-SCRLW+1 - add [__rc+0xC],-1 - add [__rc+0x0],SCRLW+1 - mov ecx,__rc - call pt_in_rect - jnc .check_main_menu + pushd [cur_editor.Bounds.Left] [cur_editor.Bounds.Bottom] [cur_editor.Bounds.Right] [cur_editor.Bounds.Bottom] + popd [__rc+0xC] [__rc+0x8] [__rc+0x4] [__rc+0x0] + add [__rc+0x8],-SCRLW*2-1 + add [__rc+0x4],-SCRLW+1 + add [__rc+0xC],-1 + add [__rc+0x0],SCRLW+1 + mov ecx,__rc + call pt_in_rect + jnc .check_main_menu .check_hscroll.2: - mov ebx,eax - sub ebx,SCRLW+1 - sub ebx,[cur_editor.Bounds.Left] - cmp [hscrl_capt],0 - jge .hcaptured - mov eax,[cur_editor.HScroll.Top] - cmp ebx,eax - jl .center_hcapture - add eax,[cur_editor.HScroll.Size] - cmp ebx,eax - jge .center_hcapture - mov eax,ebx - sub eax,[cur_editor.HScroll.Top] - dec eax - mov [hscrl_capt],eax - dec ebx - jmp .hcaptured + mov ebx,eax + sub ebx,SCRLW+1 + sub ebx,[cur_editor.Bounds.Left] + cmp [hscrl_capt],0 + jge .hcaptured + mov eax,[cur_editor.HScroll.Top] + cmp ebx,eax + jl .center_hcapture + add eax,[cur_editor.HScroll.Size] + cmp ebx,eax + jge .center_hcapture + mov eax,ebx + sub eax,[cur_editor.HScroll.Top] + dec eax + mov [hscrl_capt],eax + dec ebx + jmp .hcaptured .center_hcapture: - mov eax,[cur_editor.HScroll.Size] - shr eax,1 - mov [hscrl_capt],eax + mov eax,[cur_editor.HScroll.Size] + shr eax,1 + mov [hscrl_capt],eax .hcaptured: - sub ebx,[hscrl_capt] - jns @f - xor ebx,ebx - @@: mov [mouse_captured],1 - mov eax,[cur_editor.Bounds.Right] - sub eax,[cur_editor.HScroll.Size] - sub eax,SCRLW*3+1 - cmp eax,ebx - jge @f - mov ebx,eax + sub ebx,[hscrl_capt] + jns @f + xor ebx,ebx + @@: mov [mouse_captured],1 + mov eax,[cur_editor.Bounds.Right] + sub eax,[cur_editor.HScroll.Size] + sub eax,SCRLW*3+1 + cmp eax,ebx + jge @f + mov ebx,eax @@: - mov [cur_editor.HScroll.Top],ebx - mov eax,[cur_editor.Columns.Count] - sub eax,[columns.scr] - imul ebx - mov ebx,[cur_editor.Bounds.Right] - sub ebx,SCRLW*3+1 - sub ebx,[cur_editor.HScroll.Size] - idiv ebx - cmp eax,[cur_editor.TopLeft.X] - je still.skip_write - mov [cur_editor.TopLeft.X],eax - call check_bottom_right - call draw_editor - jmp still.skip_write + mov [cur_editor.HScroll.Top],ebx + mov eax,[cur_editor.Columns.Count] + sub eax,[columns.scr] + imul ebx + mov ebx,[cur_editor.Bounds.Right] + sub ebx,SCRLW*3+1 + sub ebx,[cur_editor.HScroll.Size] + idiv ebx + cmp eax,[cur_editor.TopLeft.X] + je still.skip_write + mov [cur_editor.TopLeft.X],eax + call check_bottom_right + call draw_editor + jmp still.skip_write .check_main_menu: - cmp [do_not_draw],0 - jne .capture_off + cmp [do_not_draw],0 + jne .capture_off - @@: mcall 37,2 - test eax,0x01 - jz @f - mcall 5,1 - jmp @b - @@: and [mst],0xFE + @@: mcall 37,2 + test eax,0x01 + jz @f + mcall 5,1 + jmp @b + @@: and [mst],0xFE - cmp [mi_cur],0 - jle .capture_off - mov ecx,[mi_cur] - mov eax,[main_menu.popups+ecx*4-4] - mov edx,main_menu - call dword[main_menu.onshow+ecx*4-4] - call setup_main_menu_popup - mcall 51,1,popup_thread_start,POPUP_STACK - mov [h_popup],eax + cmp [mi_cur],0 + jle .capture_off + mov ecx,[mi_cur] + mov eax,[main_menu.popups+ecx*4-4] + mov edx,main_menu + call dword[main_menu.onshow+ecx*4-4] + call setup_main_menu_popup + mcall 51,1,popup_thread_start,POPUP_STACK + mov [h_popup],eax .l_up: .capture_off: - or eax,-1 - mov [vscrl_capt],eax - mov [hscrl_capt],eax - mov [body_capt],eax - mov [mouse_captured],0 + or eax,-1 + mov [vscrl_capt],eax + mov [hscrl_capt],eax + mov [body_capt],eax + mov [mouse_captured],0 ;!!! mov [just_from_popup],0 - jmp still.skip_write + jmp still.skip_write diff --git a/programs/fs/kfm/trunk/build.bat b/programs/fs/kfm/trunk/build.bat index ae14b401ad..e1e9f91d22 100644 --- a/programs/fs/kfm/trunk/build.bat +++ b/programs/fs/kfm/trunk/build.bat @@ -1,5 +1,4 @@ @echo lang fix en >lang.inc @fasm -m 16384 kfm.asm kfm @erase lang.inc -@kpack kfm @pause diff --git a/programs/fs/kfm/trunk/buttons.bmp b/programs/fs/kfm/trunk/buttons.bmp deleted file mode 100644 index ea6b4741c0c569a501750661d3c45668836372c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6486 zcmeI0y^a(y5QLYQ{QstX*&ad{yo7o^%{v zzkUDo*w+{AuXw-U{R8iJkB`_NkI(3Tc+dAjdJ14&Da`}y617~Sq7FQhfSke7;tY9FINM7;7g^x}vK6|E;`V&{ zizej=nmCM@{NM2pr&^pxWIov9{Jbb?B`kUOr;1kr)g>>6BQmei0SIXj<}~gj~f-CU6~g0kC-8$QRuhNidD z^oEW#*!IcV>^6p?Pf^-cZZzV+ARV3QXJc@~Ta!+q(IC^%9p*lo@l)MK4|4^9R(%mj zk{Pzvb#>)~fW^>48Y)4u=;{~K?s3}6-xuU_3zc#Tij=rD0WTkAen9U(s@a2eX!V0ZI zSH)me4ka^lTUcecP@$*qa#K+i2G|t@H`RBfz{t~?OmOg4=|;eJ%@QvY1mzS-1UMFo zf)Ruk(ok`jJQ?i)xRXk|o+T?`3e-a2Zi)#gWk7g4|N9>)y5hY{l~)-5qdXsHw&T&l z^R~yFywJMO6E1m93_CA5^QzB+;B%RlUpmd9Ww+e3bBX0*7P68_R9b8P1q8_nrm62V z8=3%*^6}Y${Svy3PO|3*IwF)2cA;Pe^ZP6$2Ge#7>7OUb8Q%Xds`&1@B*Q$R)iujU zpC-;F)E2Nw+}3BER4uXloE-1?@i3tK><*`G{#|s501wPrr$umbw#1nn8(4&a2f@F* zW_tt1x`h2NxI6G~=P@*_arSnZ;Tcxn0e4|FdlsAsDL8S(aXG2(o)ImGqO_ksFG+P( zDdp+;qh>h{@E?Bt)(C?dwA@EfV1sxu0Z8D7&XIA zxY|2Vs#U1P@?CUF!F#i6G68S3#Pti%J&yp=tcszkvL4m^QkOtGN+shRq9IEKvFcIU85_x_T=BOQtPg5{4C!BcnOsTUtv%wAd+#Gu963HWy<4CM0z*j8Nff2V!X4+ zvMLohV`Ok3Gl28JedzN! z1(BS6GRzW~zo@d6c2Q>sRGo3G>@S#L2`}k$TuOfuDYb= zvw=3}fkDQ+VxT|P@V}uf-^;DJU#Hm|Gbl#D8Ii?abH&bt{u3xx;Fj*Y#tf@ literal 0 HcmV?d00001 diff --git a/programs/fs/kfm/trunk/icons2.bmp b/programs/fs/kfm/trunk/images/icons2.bmp similarity index 100% rename from programs/fs/kfm/trunk/icons2.bmp rename to programs/fs/kfm/trunk/images/icons2.bmp diff --git a/programs/fs/kfm/trunk/kfm.asm b/programs/fs/kfm/trunk/kfm.asm index 4b24b8cdb1..98e1f8447b 100644 --- a/programs/fs/kfm/trunk/kfm.asm +++ b/programs/fs/kfm/trunk/kfm.asm @@ -68,7 +68,6 @@ START: mov ax,[select_disk_char] mov [read_folder_name],ax mov [read_folder_1_name],ax - call load_icon_and_convert_to_img call load_initiation_file call add_memory_for_folders call device_detect_f70 @@ -245,18 +244,6 @@ prepare_load_data_3: mov [read_file.size],eax 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: mov ebx,ini_file_name call prepare_load_data @@ -349,6 +336,13 @@ sub_application_memory: mcall 64,1 ret ;--------------------------------------------------------------------- +exit_apl: + mov [confirmation_type],exit_type + call confirmation_action + cmp [work_confirmation_yes],1 + jne red + mcall -1 +;--------------------------------------------------------------------- include 'key.inc' ;--------------------------------------------------------------------- include 'markfile.inc' @@ -379,8 +373,6 @@ include 'err_wind.inc' ;--------------------------------------------------------------------- include 'detect.inc' ;--------------------------------------------------------------------- -include 'conv_bmp.inc' -;--------------------------------------------------------------------- include 'tran_ini.inc' ;--------------------------------------------------------------------- include 'help.inc' @@ -389,8 +381,6 @@ include 'convchar.inc' ;--------------------------------------------------------------------- include 'sort.inc' ;--------------------------------------------------------------------- -include 'exit.inc' -;--------------------------------------------------------------------- include 'progrbar.inc' ;--------------------------------------------------------------------- include 'scroll.inc' diff --git a/programs/fs/kfm/trunk/text.inc b/programs/fs/kfm/trunk/text.inc index 1a6c23db5c..3d32ab6a0a 100644 --- a/programs/fs/kfm/trunk/text.inc +++ b/programs/fs/kfm/trunk/text.inc @@ -1,4 +1,4 @@ -header_text db 'Kolibri File Manager v0.48',0 +header_text db 'Kolibri File Manager v0.48b',0 ;--------------------------------------------------------------------- fbutton_name: .f1 db '1 Help',0 @@ -82,9 +82,6 @@ year_table: ini_file_name: db 'kfm.ini',0 ;--------------------------------------------------------------------- -icons_file_name: - db 'icons.bmp',0 -;--------------------------------------------------------------------- error_type: db 'File system error',0 ;---------------------------------------------------------------------