From f1c6ce150cd315529f0bd66fe000cca4b0c88026 Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Fri, 6 Mar 2009 18:06:36 +0000 Subject: [PATCH] KFar 0.63: saves sort mode; bugfix in editor git-svn-id: svn://kolibrios.org@1045 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/fs/kfar/trunk/build_en.bat | 1 + programs/fs/kfar/trunk/editor.inc | 2 +- programs/fs/kfar/trunk/kfar.asm | 38 +++++++++++++++++++++++++--- programs/fs/kfar/trunk/kfar.ini | 39 +++++++++++++++++++++-------- 4 files changed, 64 insertions(+), 16 deletions(-) diff --git a/programs/fs/kfar/trunk/build_en.bat b/programs/fs/kfar/trunk/build_en.bat index 0d61080ad0..43976a6862 100644 --- a/programs/fs/kfar/trunk/build_en.bat +++ b/programs/fs/kfar/trunk/build_en.bat @@ -2,4 +2,5 @@ @echo lang fix en >lang.inc @fasm kfar.asm kfar @erase lang.inc +@kpack kfar @pause \ No newline at end of file diff --git a/programs/fs/kfar/trunk/editor.inc b/programs/fs/kfar/trunk/editor.inc index 8a99e63444..7271f44a54 100644 --- a/programs/fs/kfar/trunk/editor.inc +++ b/programs/fs/kfar/trunk/editor.inc @@ -1393,10 +1393,10 @@ editor_reserve_space: pop edx ecx test eax, eax jz .nomem - add [ebp + editor_data.memsize], ecx sub eax, ebp add ebp, eax add esi, eax + add [ebp + editor_data.memsize], ecx push ecx mov ecx, max_height lea edi, [ebp + editor_data.linedata_start] diff --git a/programs/fs/kfar/trunk/kfar.asm b/programs/fs/kfar/trunk/kfar.asm index f303045d8e..790137dd90 100644 --- a/programs/fs/kfar/trunk/kfar.asm +++ b/programs/fs/kfar/trunk/kfar.asm @@ -7,8 +7,8 @@ memsize dd mem dd stacktop dd 0, app_path -version equ '0.62' -version_dword equ 0*10000h + 62 +version equ '0.63' +version_dword equ 0*10000h + 63 min_width = 54 max_width = 255 @@ -203,6 +203,24 @@ start: cmp eax, 4 ja @f mov [panel2_colmode], eax +@@: + push 0 + push aLeftSortMode + push aPanels + push app_path + call [ini.get_int] + cmp eax, 14 + jae @f + mov [panel1_sortmode], al +@@: + push 0 + push aRightSortMode + push aPanels + push app_path + call [ini.get_int] + cmp eax, 14 + jae @f + mov [panel2_sortmode], al @@: push nullstr push 512 @@ -401,7 +419,6 @@ exit: pop esi ecx jmp .unload .unload_done: -;if 0 ; commented due to bug in libini cmp [ini.set_int], aIniSetInt jz .nosave push [panel1_colmode] @@ -414,8 +431,19 @@ exit: push aPanels push app_path call [ini.set_int] + movzx eax, [panel1_sortmode] + push eax + push aLeftSortMode + push aPanels + push app_path + call [ini.set_int] + movzx eax, [panel2_sortmode] + push eax + push aRightSortMode + push aPanels + push app_path + call [ini.set_int] .nosave: -;end if if CHECK_FOR_LEAKS mov ecx, [panel1_files] call pgfree @@ -8342,6 +8370,8 @@ aConfirmDeleteIncomplete db 'DeleteIncomplete',0 aPanels db 'Panels',0 aLeftViewMode db 'LeftViewMode',0 aRightViewMode db 'RightViewMode',0 +aLeftSortMode db 'LeftSortMode',0 +aRightSortMode db 'RightSortMode',0 aEditor db 'Editor',0 aEolStyle db 'EOLStyle',0 diff --git a/programs/fs/kfar/trunk/kfar.ini b/programs/fs/kfar/trunk/kfar.ini index fc47063b24..3473f0b880 100644 --- a/programs/fs/kfar/trunk/kfar.ini +++ b/programs/fs/kfar/trunk/kfar.ini @@ -3,29 +3,46 @@ asm=/sys/TinyPad; AsmMenu1,AsmMenu2 inc=/sys/TinyPad ini=/sys/TinyPad txt=/sys/TinyPad -jpg=/sys/JpegView -jpeg=/sys/JpegView -gif=/sys/GIFVIEW; GifMenu1,MenuAnimage -wav=/sys/AC97SND -mp3=/sys/AC97SND -mid=/sys/MIDAMP -bmp=/sys/MV; BmpMenu1,MenuAnimage -png=/sys/@rcher +jpg=/sys/media/kiv +jpeg=/sys/media/kiv +gif=/sys/media/GIFVIEW; GifMenu1,MenuAnimage +wav=/sys/media/AC97SND +mp3=/sys/media/AC97SND +mid=/sys/media/MIDAMP +bmp=/sys/media/kiv; BmpMenu1,MenuAnimage +png=/sys/media/kiv rtf=/sys/RtfRead 3ds=/sys/3d/view3ds lif=/sys/demos/life2 skn=/sys/desktop +m3u=/sys/media/listplay +lap=/sys/media/listplay +asf=/sys/media/listplay +cvs=/sys/graph +obj=/sys/develop/cobj +nes=/sys/fceu +sna=/sys/e80 +htm=/sys/HTMLv +html=/sys/HTMLv [Menu] AsmMenu1=&Редактор,/sys/TinyPad AsmMenu2=&Компилировать,/sys/develop/fasm -GifMenu1=&Просмотр,/sys/GIFVIEW -BmpMenu1=&Просмотр,/sys/MV -MenuAnimage=&Редактор,/sys/animage +GifMenu1=&Просмотр,/sys/media/GIFVIEW +BmpMenu1=&Просмотр,/sys/media/kiv +MenuAnimage=&Редактор,/sys/media/animage [Panels] +# Режимы отображения файлов на панелях +# значения соответствуют цифрам для LCtrl+<1-4> LeftViewMode=2 RightViewMode=2 +# Режимы сортировки файлов на панелях +# значения имеют вид 2 * N + M, где +# M = 0 - прямая сортировка, M = 1 - обратная +# N = 0-6 соответствует режиму сортировки для Ctrl+F<3-9> +LeftSortMode=0 +RightSortMode=0 [Editor] # Символы конца строки, которые будет вставлять