From 6e1d7d18af55e9cbf7c5e056ae72b2caee75aea3 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Fri, 19 Feb 2016 13:34:31 +0000 Subject: [PATCH] add calc+ to autobuild as /kolibrios/utils/calcplus; software_widget: show notification if program is not found; other small changes git-svn-id: svn://kolibrios.org@6253 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/Tupfile.lua | 1 + data/common/settings/app_plus.ini | 2 ++ programs/cmm/app_plus/app_plus.c | 2 +- programs/cmm/appearance/appearance.c | 4 ++-- programs/cmm/software_widget/compile.bat | 2 +- programs/cmm/software_widget/software_widget.c | 14 ++++++++++++-- programs/other/personal/Tupfile.lua | 2 ++ programs/other/personal/build.bat | 3 +++ programs/other/personal/inc/button.inc | 12 ++++-------- programs/other/personal/personal.asm | 10 ++++------ 10 files changed, 32 insertions(+), 20 deletions(-) create mode 100644 programs/other/personal/Tupfile.lua create mode 100644 programs/other/personal/build.bat diff --git a/data/Tupfile.lua b/data/Tupfile.lua index 4d9472ef62..cd2804e69b 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -203,6 +203,7 @@ extra_files = { {"kolibrios/res/skins/", "../skins/authors.txt"}, {"kolibrios/settings/app_plus.ini", "common/settings/app_plus.ini"}, {"kolibrios/utils/appearance", PROGS .. "/cmm/appearance/appearance.com"}, + {"kolibrios/utils/calcplus", PROGS .. "/other/calcplus/calcplus"}, } if build_type == "rus" then tup.append_table(extra_files, { {"Docs/cp866/config.txt", build_type .. "/docs/CONFIG.TXT"}, diff --git a/data/common/settings/app_plus.ini b/data/common/settings/app_plus.ini index 9ac29ba8c9..261a1141cf 100644 --- a/data/common/settings/app_plus.ini +++ b/data/common/settings/app_plus.ini @@ -6,6 +6,7 @@ window_title=KolibriOS Additional Software [Media] zSea=/kolibrios/media/zsea/zsea,46 +FPlay=/kolibrios/media/fplay,40 [3D Tools] Info3DsPro=/kolibrios/3d/info3ds/info3ds,75 @@ -16,4 +17,5 @@ voxel_editor=/kolibrios/3d/voxel_editor/voxel_editor 3dsHeart=/kolibrios/3d/3dsheart,78 [Other] +Calc+=/kolibrios/utils/calcplus,4 Life=/kolibrios/demos/life2,13 diff --git a/programs/cmm/app_plus/app_plus.c b/programs/cmm/app_plus/app_plus.c index 9268548169..e0a5f1e1aa 100644 --- a/programs/cmm/app_plus/app_plus.c +++ b/programs/cmm/app_plus/app_plus.c @@ -25,7 +25,7 @@ dword scr_pal[] = {0xFFFFFF,0xBBDDFF,0x4166B5,0xE0E4E6,0xAFBEDD,0xC4D4E8,0x52ACD #define APP_PLUS_INI_NOT_EXISTS "'APP+\n/kolibrios/settings/app_plus.ini is not exists.\nProgram terminated.' -tE" #define WINDOW_TITLE_TEXT "Error" -#define CONTENT_HEADER_TEXT "/KOLIBRIOS/ NOT MOUNTED" +#define CONTENT_HEADER_TEXT "/KOLIBRIOS/ IS NOT MOUNTED" #define DESCRIPTION_TEXT "Try to find it manually. It should look like image on the right. Note: this action can be done only once diff --git a/programs/cmm/appearance/appearance.c b/programs/cmm/appearance/appearance.c index f640147184..caa79fa970 100644 --- a/programs/cmm/appearance/appearance.c +++ b/programs/cmm/appearance/appearance.c @@ -181,8 +181,8 @@ void DrawTab(dword x,y, but_id, text) void DrawScroller() { - scroll1.bckg_col = 0xBBBbbb; - scroll1.frnt_col = system.color.work; + scroll1.bckg_col = MixColors(system.color.work, 0xBBBbbb, 80); + scroll1.frnt_col = MixColors(system.color.work,0xFFFfff,120); scroll1.line_col = system.color.work_graph; scroll1.max_area = list.count; diff --git a/programs/cmm/software_widget/compile.bat b/programs/cmm/software_widget/compile.bat index 1e9ba6e8c4..6450f167e8 100644 --- a/programs/cmm/software_widget/compile.bat +++ b/programs/cmm/software_widget/compile.bat @@ -1,4 +1,4 @@ -C-- software_widget.c +@C-- software_widget.c @del game_center @copy software_widget.com game_center @copy software_widget.com syspanel diff --git a/programs/cmm/software_widget/software_widget.c b/programs/cmm/software_widget/software_widget.c index 06f9d3712c..f4ed4f53c6 100644 --- a/programs/cmm/software_widget/software_widget.c +++ b/programs/cmm/software_widget/software_widget.c @@ -5,7 +5,7 @@ SOFTWARE CENTER v2.8 #define MEMSIZE 0x9000 #include "..\lib\strings.h" #include "..\lib\mem.h" -#include "..\lib\file_system.h" +#include "..\lib\io.h" #include "..\lib\gui.h" #include "..\lib\obj\libio_lib.h" @@ -87,7 +87,7 @@ void main() case evButton: id=GetButtonID(); if (id==1) ExitProcess(); - if (id>=100) RunProgram(app_path_collection.get(id-100), ""); + if (id>=100) EventRunApp(id-100); break; case evReDraw: @@ -177,6 +177,16 @@ void draw_top_bar() label.write_center(0,5, Form.cwidth, list.y, system.color.work, system.color.work_text, 16, #window_title); } +void EventRunApp(dword appid) +{ + if (file_exists(app_path_collection.get(appid))) { + io.run(app_path_collection.get(appid), ""); + } + else { + notify("'Application not found' -E"); + } +} + stop: diff --git a/programs/other/personal/Tupfile.lua b/programs/other/personal/Tupfile.lua new file mode 100644 index 0000000000..08686d1237 --- /dev/null +++ b/programs/other/personal/Tupfile.lua @@ -0,0 +1,2 @@ +if tup.getconfig("NO_FASM") ~= "" then return end +tup.rule("personal.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "personal") diff --git a/programs/other/personal/build.bat b/programs/other/personal/build.bat new file mode 100644 index 0000000000..3520ef273b --- /dev/null +++ b/programs/other/personal/build.bat @@ -0,0 +1,3 @@ +@fasm personal.asm personal +@kpack personal +@pause \ No newline at end of file diff --git a/programs/other/personal/inc/button.inc b/programs/other/personal/inc/button.inc index 9308d54292..8791026898 100644 --- a/programs/other/personal/inc/button.inc +++ b/programs/other/personal/inc/button.inc @@ -130,14 +130,10 @@ button_draw: call button_draw_all ; arrow pusha - mov eax , 7 - mov ebx , arrowa - mov ecx , 6 shl 16 + 10 - mov edx , 46 shl 16 + 13 - int 0x40 - mov ebx , arrowb - mov edx , 17 shl 16 + 13 - int 0x40 + mov ecx,[sc.btn_text] + or ecx,0x90000000 + mcall 4,<15,11>, ,arrowa + mcall ,<45,11>, ,arrowb popa ret diff --git a/programs/other/personal/personal.asm b/programs/other/personal/personal.asm index ed5b2376b2..f562a68a5a 100644 --- a/programs/other/personal/personal.asm +++ b/programs/other/personal/personal.asm @@ -13,7 +13,7 @@ dd 0x0 dd 0x0 - include 'macros.inc' + include '../../macros.inc' ;=============================================================================; ;============================[ EVENTS ]===========================; ;=============================================================================; @@ -107,7 +107,7 @@ draw_window: xor eax,eax ; Очищаем eax (mov eax,0) (Функция 0) mov ebx,200 shl 16+240 ; [координата по оси x]*65536 + [размер по оси x] add ecx,200 shl 16+280 ; Высота скина + [координата по y]*65536 + [размер по y] - mov edx,[sc.win_body] ; Видимо стиль окна по дефолту + mov edx,[sc.win_body] ; Видимо стиль окна по дефолту or edx,0x34000000 ; Или окно со скином фиксированных размеров mov edi,title ; Заголовок окна int 0x40 ; Прерывание @@ -145,10 +145,8 @@ include 'inc/list.inc' ; ;; button ------------------------------------------------- bnext new_button bback new_button -arrowa: - file 'l.raw' -arrowb: - file 'r.raw' + arrowa db '<',0 + arrowb db '>',0 ;; edit --------------------------------------------------- edit_cnt dd 1 ; counter edit_win db 'WINDOW',0 ; 1