From 64183baa43089d8230ac157666933bf8104e1341 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Fri, 14 Sep 2018 09:49:37 +0000 Subject: [PATCH] IconEdit: add a notice while opening a file git-svn-id: svn://kolibrios.org@7358 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/iconedit/compile_en.bat | 6 +++++- programs/cmm/iconedit/compile_ru.bat | 18 ++++++++++++++++++ programs/cmm/iconedit/iconedit.c | 15 +++++++++++++++ programs/cmm/lib/kolibri.h | 10 +++++++++- 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 programs/cmm/iconedit/compile_ru.bat diff --git a/programs/cmm/iconedit/compile_en.bat b/programs/cmm/iconedit/compile_en.bat index 331ea4abae..926c272b46 100644 --- a/programs/cmm/iconedit/compile_en.bat +++ b/programs/cmm/iconedit/compile_en.bat @@ -1,8 +1,12 @@ +@del lang.h-- +@echo #define LANG_ENG 1 >lang.h-- @del iconedit +cls + @c-- iconedit.c @rename *.com *. @del warning.txt - +@del lang.h-- if exist iconedit ( "C:\Program Files\WinImage\winimage.exe" "D:\Soft\Kolibri\QEMU\kolibri.img" /H /Q /I iconedit diff --git a/programs/cmm/iconedit/compile_ru.bat b/programs/cmm/iconedit/compile_ru.bat new file mode 100644 index 0000000000..def3a2fdfc --- /dev/null +++ b/programs/cmm/iconedit/compile_ru.bat @@ -0,0 +1,18 @@ +@del lang.h-- +@echo #define LANG_RUS 1 >lang.h-- +@del iconedit +cls + +@c-- iconedit.c +@rename *.com *. +@del warning.txt +@del lang.h-- + +if exist iconedit ( + "C:\Program Files\WinImage\winimage.exe" "D:\Soft\Kolibri\QEMU\kolibri.img" /H /Q /I iconedit + d: + cd "D:\Soft\Kolibri\QEMU" + call "D:\Soft\Kolibri\QEMU\qemu-kos-img.bat" +) else ( + @pause +) diff --git a/programs/cmm/iconedit/iconedit.c b/programs/cmm/iconedit/iconedit.c index 48d62891bd..bb98659598 100644 --- a/programs/cmm/iconedit/iconedit.c +++ b/programs/cmm/iconedit/iconedit.c @@ -19,12 +19,26 @@ #include "colors_mas.h" +#include "lang.h--" + //===================================================// // // // DATA // // // //===================================================// +#ifdef LANG_RUS +#define T_NOTIFY_OPEN "'IconEdit +В данный момент IconEdit может открывать только иконки, созданные в самом редакторе. +Если нужно открыть другое изображение, воспользуйтесь инструментом <Фотоаппарат> +для захвата картинки с экрана.' -Wt" +#else +#define T_NOTIFY_OPEN "'IconEdit +You can open only files created in IconEdit for now! +In other case please use tool to get an image from screen.' -Wt" +#endif + + #define T_TITLE "Icon Editor 0.56 Alpha" #define TOPBAR_H 24+8 @@ -241,6 +255,7 @@ void main() EventCreateNewIcon(); break; case BTN_OPEN: + notify(T_NOTIFY_OPEN); RunProgram("/sys/lod", sprintf(#param, "*png* %s",#program_path)); break; case BTN_SAVE: diff --git a/programs/cmm/lib/kolibri.h b/programs/cmm/lib/kolibri.h index 1a0ffa2b1a..a3694c597b 100644 --- a/programs/cmm/lib/kolibri.h +++ b/programs/cmm/lib/kolibri.h @@ -127,7 +127,15 @@ inline fastcall dword GetFreeRAM() $mov eax, 18 $mov ebx, 16 $int 0x40 - //return eax = free RAM in Kb + //return eax = free RAM size in Kb +} + +inline fastcall dword GetTotalRAM() +{ + $mov eax, 18 + $mov ebx, 17 + $int 0x40 + //return eax = total RAM size in Kb } inline fastcall int GetCpuIdleCount()