diff --git a/data/Tupfile.lua b/data/Tupfile.lua index e7a7356088..0ea848b7e8 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/BUTTONS.BMP", PROGS .. "/fs/kfm/trunk/buttons.bmp"}, {"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"}, diff --git a/programs/cmm/examples/Tupfile.lua b/programs/cmm/examples/Tupfile.lua index 23a45733c4..66a2477324 100644 --- a/programs/cmm/examples/Tupfile.lua +++ b/programs/cmm/examples/Tupfile.lua @@ -11,3 +11,4 @@ tup.rule("console.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK tup.rule("info.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "info.com") tup.rule("pigex.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "pigex.com") tup.rule("netcheck.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "netcheck.com") +tup.rule("math.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "math.com") diff --git a/programs/cmm/lib/gui.h b/programs/cmm/lib/gui.h index 270ce9458c..990de9aeaa 100644 --- a/programs/cmm/lib/gui.h +++ b/programs/cmm/lib/gui.h @@ -322,11 +322,18 @@ { dword n; dword inc(dword _addition); + dword set(dword _new_val); }; :dword incn::inc(dword _addition) { - n+=_addition; + n += _addition; + return n; +} + +:dword incn::set(dword _new_val) +{ + n =_new_val; return n; } diff --git a/programs/cmm/lib/kolibri.h b/programs/cmm/lib/kolibri.h index fdf98ec1b4..7d710f224d 100644 --- a/programs/cmm/lib/kolibri.h +++ b/programs/cmm/lib/kolibri.h @@ -179,7 +179,6 @@ struct proc_info :void GetProcessInfo(dword _process_struct_pointer, _process_id) { - skin_height = GetSkinHeight(); EAX = 9; EBX = _process_struct_pointer; ECX = _process_id; diff --git a/programs/cmm/lib/list_box.h b/programs/cmm/lib/list_box.h index db827b8f40..c326244a8a 100644 --- a/programs/cmm/lib/list_box.h +++ b/programs/cmm/lib/list_box.h @@ -26,7 +26,9 @@ struct llist int KeyDown(); int KeyUp(); int KeyHome(); + int KeyHomeHor(); int KeyEnd(); + int KeyEndHor(); int KeyPgDown(); int KeyPgUp(); int KeyLeft(); @@ -124,6 +126,13 @@ struct llist :int llist::ProcessKey(dword key) { + if (horisontal_selelection) switch(key) + { + case SCAN_CODE_LEFT: return KeyLeft(); + case SCAN_CODE_RIGHT: return KeyRight(); + case SCAN_CODE_HOME: return KeyHomeHor(); + case SCAN_CODE_END: return KeyEndHor(); + } switch(key) { case SCAN_CODE_DOWN: return KeyDown(); @@ -133,11 +142,6 @@ struct llist case SCAN_CODE_PGUP: return KeyPgUp(); case SCAN_CODE_PGDN: return KeyPgDown(); } - if (horisontal_selelection) switch(key) - { - case SCAN_CODE_LEFT: return KeyLeft(); - case SCAN_CODE_RIGHT: return KeyRight(); - } return 0; } @@ -164,8 +168,8 @@ struct llist if (cur_y < first) || (cur_y >= first + visible) { first = cur_y; - CheckDoesValuesOkey(); } + CheckDoesValuesOkey(); return 1; } @@ -196,6 +200,21 @@ struct llist return 1; } +:int llist::KeyHomeHor() +{ + if (cur_x==0) return 0; + cur_x = 0; + return 1; +} + +:int llist::KeyEndHor() +{ + if (cur_x==column_max) return 0; + cur_x = column_max; + CheckDoesValuesOkey(); + return 1; +} + :int llist::KeyHome() { if (cur_y==0) && (first==0) return 0; @@ -237,6 +256,7 @@ struct llist if (visible + first > count) first = count - visible; if (first < 0) first = 0; if (cur_y >= count) cur_y = count - 1; + if (cur_x >= column_max) cur_x = column_max; if (cur_y < 0) cur_y = 0; if (cur_x < 0) cur_x = 0; } diff --git a/programs/cmm/lib/patterns/http_downloader.h b/programs/cmm/lib/patterns/http_downloader.h index b9616942e6..0b9bc8bac8 100644 --- a/programs/cmm/lib/patterns/http_downloader.h +++ b/programs/cmm/lib/patterns/http_downloader.h @@ -51,7 +51,7 @@ void _http::receive() } -bool _http::handle_redirect() +:bool _http::handle_redirect() { dword redirect; http_find_header_field stdcall (transfer, "location\0"); @@ -152,7 +152,7 @@ bool DOWNLOADER::MonitorProgress() =====================================*/ -int check_is_the_adress_local(dword _in) +:int check_is_the_adress_local(dword _in) { if (ESBYTE[_in]!='/') return false; _in++; @@ -168,7 +168,7 @@ int check_is_the_adress_local(dword _in) return false; } -int check_is_the_url_absolute(dword _in) +:int check_is_the_url_absolute(dword _in) { if(!strncmp(_in,"ftp:",4)) return true; if(!strncmp(_in,"http:",5)) return true; @@ -181,7 +181,7 @@ int check_is_the_url_absolute(dword _in) return false; } -void get_absolute_url(dword _rez, _base, _new) +:void get_absolute_url(dword _rez, _base, _new) { int i; //case: ./valera.html diff --git a/programs/cmm/lib/strings.h b/programs/cmm/lib/strings.h index 833417d86c..2090dc36e9 100644 --- a/programs/cmm/lib/strings.h +++ b/programs/cmm/lib/strings.h @@ -927,11 +927,11 @@ inline void MEMSETD(EDI,ECX,EAX) } :replace_char(dword in_str, char from_char, to_char, int length) { - int i; - for (i=0; i - add edx,26 shl 16 - add ebx,16*16*3 - pusha - call .calculate_button - mcall ,,,151 - popa - mcall - add edx,26 shl 16 - add ebx,16*16*3 - pusha - call .calculate_button - mcall ,,,152 - popa - mcall - add edx,26 shl 16 - add ebx,16*16*3 - pusha - call .calculate_button - mcall ,,,153 - popa - mcall - add edx,26 shl 16 - add ebx,16*16*3 - pusha - call .calculate_button - mcall ,,,154 - popa - mcall - add edx,26 shl 16 - add ebx,16*16*3 - pusha - call .calculate_button - mcall ,,,155 - popa - mcall - add edx,26 shl 16 - add ebx,16*16*3 - pusha - call .calculate_button - mcall ,,,156 - popa - mcall - add edx,26 shl 16 - add ebx,16*16*3 - pusha - call .calculate_button - mcall ,,,157 - popa + mcall 7,buttons_file_data,<198,16> + + mov ecx, 20 + add ecx, [skin_high] + shl ecx, 16 + add ecx, 16 + mcall 8,<15,16>,,150+0x40000000 + +_new_but: + add ebx,26 shl 16 + inc edx mcall + cmp edx, 157+0x40000000 + jl _new_but + ret ;-------------------------------------- .calculate_button: - mov esi,0xffffff mov ebx,edx mov bx,15 mov ecx,edx shl ecx,16 mov cx,bx - mov eax,8 ret ;------------------------------------------------------------------------------ draw_left_sort_button: diff --git a/programs/fs/kfm/trunk/err_wind.inc b/programs/fs/kfm/trunk/err_wind.inc index e6795898be..12bff93d60 100644 --- a/programs/fs/kfm/trunk/err_wind.inc +++ b/programs/fs/kfm/trunk/err_wind.inc @@ -7,9 +7,6 @@ read_folder_1_error: initiation_error: mov [error_pointer],ini_file_name jmp error_window -buttons_error: - mov [error_pointer],buttons_file_name - jmp error_window icon_error: mov [error_pointer],icons_file_name error_window: diff --git a/programs/fs/kfm/trunk/images/buttons.bmp b/programs/fs/kfm/trunk/images/buttons.bmp new file mode 100644 index 0000000000..3431045808 Binary files /dev/null and b/programs/fs/kfm/trunk/images/buttons.bmp differ diff --git a/programs/fs/kfm/trunk/images/buttons.raw b/programs/fs/kfm/trunk/images/buttons.raw new file mode 100644 index 0000000000..7f7e9a7c13 Binary files /dev/null and b/programs/fs/kfm/trunk/images/buttons.raw differ diff --git a/programs/fs/kfm/trunk/kfm.asm b/programs/fs/kfm/trunk/kfm.asm index a8a19dfa53..4b24b8cdb1 100644 --- a/programs/fs/kfm/trunk/kfm.asm +++ b/programs/fs/kfm/trunk/kfm.asm @@ -69,7 +69,6 @@ START: mov [read_folder_name],ax mov [read_folder_1_name],ax call load_icon_and_convert_to_img - call load_buttons_and_convert_to_img call load_initiation_file call add_memory_for_folders call device_detect_f70 @@ -258,20 +257,6 @@ load_icon_and_convert_to_img: call sub_application_memory ret ;--------------------------------------------------------------------- -load_buttons_and_convert_to_img: - mov ebx,buttons_file_name - call prepare_load_data - jnz buttons_error - mov eax,[appl_memory] - mov [buttons_img_start],eax - call prepare_load_data_2 - add eax,[buttons_img_start] - call prepare_load_data_1 - jnz buttons_error - call convert_bmp_to_img - call sub_application_memory - ret -;--------------------------------------------------------------------- load_initiation_file: mov ebx,ini_file_name call prepare_load_data diff --git a/programs/fs/kfm/trunk/text.inc b/programs/fs/kfm/trunk/text.inc index bb5b5d3cbe..1a6c23db5c 100644 --- a/programs/fs/kfm/trunk/text.inc +++ b/programs/fs/kfm/trunk/text.inc @@ -85,9 +85,6 @@ ini_file_name: icons_file_name: db 'icons.bmp',0 ;--------------------------------------------------------------------- -buttons_file_name: - db 'buttons.bmp',0 -;--------------------------------------------------------------------- error_type: db 'File system error',0 ;---------------------------------------------------------------------