From 8bf60cac6d3f1c243f20bd148eff3c97e87a2639 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sat, 18 Dec 2021 15:21:21 +0000 Subject: [PATCH] @MENU: allow to set links to files that would be open using @open MENU.DAT: add a "Welcome" link, small resort WEBVIEW: fix links browsing at bugs.kolibri-n.org @RESHARE: fix crash on skin change CMM: use @reshare for some apps which leads to size decrease OSUPDATE: rework UI git-svn-id: svn://kolibrios.org@9439 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/eng/settings/menu.dat | 9 +-- data/rus/settings/menu.dat | 7 +- programs/cmm/appearance/appearance.c | 6 +- programs/cmm/browser/const.h | 2 +- programs/cmm/drvinst/drvinst.c | 2 +- programs/cmm/eolite/Eolite.c | 6 +- programs/cmm/eolite/include/settings.h | 2 +- programs/cmm/lib/gui.h | 4 +- programs/cmm/lib/gui/reshare.h | 45 +++++++++++++ programs/cmm/lib/obj/http.h | 2 + programs/cmm/lib/strings.h | 10 ++- programs/cmm/misc/build.bat | 2 +- programs/cmm/misc/install.c | 6 +- programs/cmm/misc/mblocks.c | 6 +- programs/cmm/misc/osupdate.c | 91 +++++++++++++++----------- programs/cmm/misc/reshare.c | 3 +- programs/cmm/sysmon/sysmon.c | 10 +-- programs/media/piano/piano.asm | 4 +- programs/system/menu/trunk/menu.asm | 18 ++++- 19 files changed, 155 insertions(+), 80 deletions(-) create mode 100644 programs/cmm/lib/gui/reshare.h diff --git a/data/eng/settings/menu.dat b/data/eng/settings/menu.dat index acff4f4ceb..1ba417c066 100644 --- a/data/eng/settings/menu.dat +++ b/data/eng/settings/menu.dat @@ -1,5 +1,5 @@ #0 **** MAIN -23 Game Center |allgames +58 Welcome |index.htm 00 2D Demos > |@1 00 3D Demos > |@2 00 Graphics > |@3 @@ -9,6 +9,7 @@ 00 Data processing > |@10 00 Network > |@11 00 Other > |@14 +23 Game Center |allgames 60 System panel |syspanel 18 Documentation |docpack 53 Run |run @@ -48,11 +49,11 @@ 22 Toy piano |media/piano 11 Fplay Video player * |/kolibrios/media/fplay #5 **** DEV -09 KPack Archiver |kpack 54 Flat Assembler |develop/fasm -20 Diff Tool |develop/diff -13 Debug Board |develop/board 16 Debugger |develop/mtdbg +13 Debug Board |develop/board +09 KPack Archiver |kpack +20 Diff Tool |develop/diff 34 Base Converter |develop/h2d2b 59 Character table |develop/ASCIIVju 59 Key ASCII-codes |develop/keyascii diff --git a/data/rus/settings/menu.dat b/data/rus/settings/menu.dat index f37c3de92b..b4b036f7ae 100644 --- a/data/rus/settings/menu.dat +++ b/data/rus/settings/menu.dat @@ -1,5 +1,5 @@ #0 **** MAIN -23 Игровой центр |allgames +58 Вступление |index.htm 00 2D Демки > |@1 00 3D Демки > |@2 00 Графика > |@3 @@ -9,6 +9,7 @@ 00 Офис > |@10 00 Сеть > |@11 00 Разное > |@14 +23 Игровой центр |allgames 60 Системная панель |syspanel 18 Документация |docpack 53 Запуск программы |run @@ -48,12 +49,12 @@ 22 Детское пианино |media/piano 11 Видеоплеер Fplay * |/kolibrios/media/fplay #5 **** Разработка -09 Упаковщик KPack |kpack 54 Flat Assembler |develop/fasm +09 Упаковщик KPack |kpack +16 Отладчик |develop/mtdbg 13 Доска отладки |develop/board 59 HEX-редактор |develop/heed 20 Diff tool |develop/diff -16 Отладчик |develop/mtdbg 34 Hex2Dec2Bin |develop/h2d2b 59 Таблица символов |develop/ASCIIVju 59 ASCII-коды |develop/keyascii diff --git a/programs/cmm/appearance/appearance.c b/programs/cmm/appearance/appearance.c index b93015437e..989fabd9ff 100644 --- a/programs/cmm/appearance/appearance.c +++ b/programs/cmm/appearance/appearance.c @@ -6,7 +6,6 @@ #include "../lib/strings.h" #include "../lib/io.h" #include "../lib/list_box.h" -#include "../lib/obj/libimg.h" #include "../lib/gui.h" #include "../lib/obj/box_lib.h" @@ -102,7 +101,6 @@ void main() load_dll(boxlib, #box_lib_init,0); load_dll(libini, #lib_init,1); - load_dll(libimg, #libimg_init,1); load_dll(Proc_lib, #OpenDialog_init,0); o_dialog.type = 2; //select folder OpenDialog_init stdcall (#o_dialog); @@ -196,8 +194,8 @@ void DrawWindowContent() tabs.w = Form.cwidth-LP-LP; tabs.draw(); - DrawIcon16(tabs.x + TAB_PADDING, 15, sc.work, 17); - DrawIcon16(strlen(T_SKINS)*8 + tabs.x + TAB_PADDING + TAB_PADDING, 15, sc.work, 6); + draw_icon_16w(tabs.x + TAB_PADDING, 15, 17); + draw_icon_16w(strlen(T_SKINS)*8 + tabs.x + TAB_PADDING + TAB_PADDING, 15, 6); id = select_list.cur_y; SelectList_Init( diff --git a/programs/cmm/browser/const.h b/programs/cmm/browser/const.h index bc1afe5b73..013baa909b 100644 --- a/programs/cmm/browser/const.h +++ b/programs/cmm/browser/const.h @@ -107,4 +107,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw"; #define DEFAULT_URL URL_SERVICE_HOMEPAGE -char version[]="WebView 3.66-2"; \ No newline at end of file +char version[]="WebView 3.66-3"; \ No newline at end of file diff --git a/programs/cmm/drvinst/drvinst.c b/programs/cmm/drvinst/drvinst.c index 994c2bde4e..0051cc5693 100644 --- a/programs/cmm/drvinst/drvinst.c +++ b/programs/cmm/drvinst/drvinst.c @@ -145,7 +145,7 @@ void Draw_DriverListWindow() //RIGHT FRAME GetCurrentSectionData(); DrawBar(right_frame_x, PADDING+3, Form.cwidth - right_frame_x - PADDING, 80, sc.work); - DrawIcon32(right_frame_x, PADDING, sc.work, cur_icon); + draw_icon_32(right_frame_x, PADDING, sc.work, cur_icon); WriteTextB(right_frame_x+44, PADDING+3, 0x81, sc.work_text, ini_sections.get(select_list.cur_y)); WriteText(right_frame_x+44, PADDING+23, 0x80, sc.work_text, #cur_version); if(cur_readme_path[0]) readme_w = DrawStandartCaptButton(right_frame_x, PADDING+45, BUTTON_ID_README, T_README); diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index de1a4fc501..108f09be6a 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -9,9 +9,9 @@ TODO: http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334 */ -#define ABOUT_TITLE "EOLITE 5.15" -#define TITLE_EOLITE "Eolite File Manager 5.15" -#define TITLE_KFM "Kolibri File Manager 2.15"; +#define ABOUT_TITLE "EOLITE 5.15-1" +#define TITLE_EOLITE "Eolite File Manager 5.15-1" +#define TITLE_KFM "Kolibri File Manager 2.15-1"; #define MEMSIZE 1024 * 250 #include "../lib/clipboard.h" diff --git a/programs/cmm/eolite/include/settings.h b/programs/cmm/eolite/include/settings.h index b95c975320..1a0c48adcb 100644 --- a/programs/cmm/eolite/include/settings.h +++ b/programs/cmm/eolite/include/settings.h @@ -160,7 +160,7 @@ void SaveIniSettings() void Write_Error(int error_number) { char error_message[500]; - sprintf(#error_message,"\"%s\n%s\" -%s","Eolite",get_error(error_number),"tE"); + sprintf(#error_message,"\"Eolite\n%s\" -tE", get_error(error_number)); notify(#error_message); } diff --git a/programs/cmm/lib/gui.h b/programs/cmm/lib/gui.h index baa654e75f..87f0614c34 100644 --- a/programs/cmm/lib/gui.h +++ b/programs/cmm/lib/gui.h @@ -27,6 +27,7 @@ #include "../lib/gui/child_window.h" #include "../lib/gui/text_view_area.h" +#include "../lib/gui/reshare.h" #ifndef INCLUDE_MENU_H #include "../lib/gui/menu.h" @@ -357,7 +358,4 @@ struct block { } - - - #endif \ No newline at end of file diff --git a/programs/cmm/lib/gui/reshare.h b/programs/cmm/lib/gui/reshare.h new file mode 100644 index 0000000000..f84b7084a1 --- /dev/null +++ b/programs/cmm/lib/gui/reshare.h @@ -0,0 +1,45 @@ + +:bool draw_icon_32(dword _x,_y, _bg, _icon_n) { + static dword bg; + static dword shared; + static dword icon32mem; + dword size; + if (!shared) || (bg!=_bg) { + if (shared = memopen("ICONS32", NULL, SHM_READ)) + { + size = EDX; + if (!icon32mem) icon32mem = malloc(size); + memmov(icon32mem, shared, size); + EDX = icon32mem + size; + EAX = bg = _bg; + for (ESI = icon32mem; ESI < EDX; ESI += 4) { + if (DSDWORD[ESI]==0x00000000) DSDWORD[ESI] = EAX; + } + } + } + if (icon32mem) { + PutPaletteImage(32*32*4*_icon_n + icon32mem, 32, 32,_x, _y, 32, 0); + return true; + } + return false; +} + +:bool draw_icon_16(dword _x,_y, _icon_n) { + static dword shared_i16; + if (!shared_i16) shared_i16 = memopen("ICONS18", NULL, SHM_READ); + if (shared_i16) { + PutPaletteImage(18*18*4*_icon_n + shared_i16, 18, 18,_x, _y, 32, 0); + return true; + } + return false; +} + +:bool draw_icon_16w(dword _x,_y, _icon_n) { + static dword shared_i16w; + if (!shared_i16w) shared_i16w = memopen("ICONS18W", NULL, SHM_READ); + if (shared_i16w) { + PutPaletteImage(18*18*4*_icon_n + shared_i16w, 18, 18,_x, _y, 32, 0); + return true; + } + return false; +} diff --git a/programs/cmm/lib/obj/http.h b/programs/cmm/lib/obj/http.h index 81185fb861..c6c1c4857a 100644 --- a/programs/cmm/lib/obj/http.h +++ b/programs/cmm/lib/obj/http.h @@ -224,6 +224,8 @@ void _http::receive() case '?': strchr(#newurl+8, '?'); //returns EAX if (EAX) ESBYTE[EAX] = '\0'; + strchr(#newurl+8, '/'); //returns EAX + if (!EAX) chrcat(#newurl, '/'); break; case '/': new_URL++; diff --git a/programs/cmm/lib/strings.h b/programs/cmm/lib/strings.h index ddc481afcc..e1921acd01 100644 --- a/programs/cmm/lib/strings.h +++ b/programs/cmm/lib/strings.h @@ -905,11 +905,17 @@ inline signed csshexdec(dword text) :void miniprintf(dword dst, format, insert_line) { dword in_pos = strchr(format, '%'); - if (ESBYTE[in_pos+1] == 's') { - strlcpy(dst, format, in_pos - format); + EBX = ESBYTE[EAX+1]; + if (EBX == 's') { + strncpy(dst, format, in_pos - format); strcat(dst, insert_line); strcat(dst, in_pos+2); } + if (EBX == 'd') || (EBX == 'i') { + strncpy(dst, format, in_pos - format); + strcat(dst, itoa(insert_line)); + strcat(dst, in_pos+2); + } } inline cdecl int sprintf(dword buf, format,...) diff --git a/programs/cmm/misc/build.bat b/programs/cmm/misc/build.bat index ac0d251abb..563fcf07c1 100644 --- a/programs/cmm/misc/build.bat +++ b/programs/cmm/misc/build.bat @@ -14,4 +14,4 @@ cd .. del warning.txt -pause \ No newline at end of file +rem pause \ No newline at end of file diff --git a/programs/cmm/misc/install.c b/programs/cmm/misc/install.c index b512da36fd..0dbdf60f6b 100644 --- a/programs/cmm/misc/install.c +++ b/programs/cmm/misc/install.c @@ -5,7 +5,6 @@ #include "../lib/copyf.h" #include "../lib/obj/libini.h" -#include "../lib/obj/libimg.h" #include "../lib/patterns/restart_process.h" @@ -40,8 +39,7 @@ void main() { word btn; load_dll(libini, #lib_init,1); - load_dll(libimg, #libimg_init,1); - loop() switch(WaitEventTimeout(300) & 0xFF) + loop() switch(@WaitEventTimeout(300)) { case evButton: btn = GetButtonID(); @@ -89,7 +87,7 @@ void DrawIntro() void DrawInstallComplete() { - DrawIcon32(WINW-32/2, 140, sc.work, 49); + draw_icon_32(WINW-32/2, 140, sc.work, 49); WriteTextCenter(0,185, WINW, sc.work_text, T_COMPLETE); DrawCaptButton(WINW-110/2, WINH-70, 110, 28, B_EXIT, 0x0092D8, 0xFFFfff, T_EXIT); diff --git a/programs/cmm/misc/mblocks.c b/programs/cmm/misc/mblocks.c index c2031a1f68..ff1e43f76c 100644 --- a/programs/cmm/misc/mblocks.c +++ b/programs/cmm/misc/mblocks.c @@ -10,8 +10,6 @@ #include "..\lib\gui.h" #include "..\lib\random.h" -#include "..\lib\obj\libimg.h" - #define BTN_CLOSED 0 #define BTN_PRESSED 1 #define BTN_OPEN 2 @@ -40,8 +38,8 @@ int count; void main() { dword id; - load_dll(libimg, #libimg_init,1); + mem_init(); NewGame(); loop() switch(@WaitEvent()) @@ -151,7 +149,7 @@ void ReDraw_Game_Button(int id) case BTN_OPEN: DrawBar(xx+1, yy+1, CELL_SIZE-1, CELL_SIZE-1, 0xFFFfff);//background } - DrawIcon32(xx+6, yy+6, 0xFFFfff, bitpict[id]+51); //skip first 51 icons as they are boring for game + draw_icon_32(xx+6, yy+6, 0xffFFFfff, bitpict[id]+51); //skip first 51 icons as they are boring for game } void Draw_Panel() diff --git a/programs/cmm/misc/osupdate.c b/programs/cmm/misc/osupdate.c index defe9af7e6..9d260e063a 100644 --- a/programs/cmm/misc/osupdate.c +++ b/programs/cmm/misc/osupdate.c @@ -3,8 +3,6 @@ #include "../lib/gui.h" #include "../lib/copyf.h" -#include "../lib/obj/libini.h" -#include "../lib/obj/libimg.h" #include "../lib/obj/http.h" #include "../lib/obj/network.h" @@ -12,47 +10,50 @@ bool install_complete = false; _http http; +dword unimg_id; #define WINW 460 -#define WINH 380 +#define WINH 330 //#define LANG_RUS 1 #ifdef LANG_RUS #define T_WINDOW_TITLE "Онлайн обновление KolibriOS" -#define T_TITLE_H1 "ОНЛАЙН ОБНОВЛЕНИЕ" +#define T_TITLE_H1 "Онлайн обновление" #define T_INTRO "Данное приложение скачает последнюю версию KolibriOS и распакует ее на RAM-диск. При этом ядро не будет перезапущено, для этого необходимо сохранить образ и перезагрузится. Пожалуйста, закройте все открытые приложения перед началом обновления. ВНИМАНИЕ: Все изменные файлы на RAM-диске будут перезаписаны!"; #define T_INSTALL "Обновить" -#define T_COMPLETE "Обновление завершено" +#define T_DOWNLOADING "Скачиваю свежий образ kolibri.img..." +#define T_UNPACKING "Распаковываю и копирую файлы..." +#define T_COMPLETE "Обновление успешно завершено." #define T_EXIT "Выход" #define IMG_URL "http://builds.kolibrios.org/rus/data/data/kolibri.img" #define KS "Сохранить настройки" -#define checkbox_h 190 #else #define T_WINDOW_TITLE "KolibriOS Online Updater" -#define T_TITLE_H1 "ONLINE UPDATE" +#define T_TITLE_H1 "Online Updater" #define T_INTRO "This app will download the latest KolibriOS dirsto and update your RAM-disk with it. Kernel won't be restarted. Please close all opened apps before start. Note that all changes on RAM-disk will be lost."; #define T_INSTALL "Update" -#define T_COMPLETE "Update complete" +#define T_DOWNLOADING "Downloading the latest kolibri.img..." +#define T_UNPACKING "Unpacking and copying files..." +#define T_COMPLETE "Update complete successfully." #define T_EXIT "Exit" #define IMG_URL "http://builds.kolibrios.org/eng/data/data/kolibri.img" #define KS "Keep settings folder" -#define checkbox_h 210 #endif char accept_language[]="en"; //not used, necessary for http.get() void Operation_Draw_Progress(dword f) {} //not used, necessary for copyf() checkbox keep_settings = { KS, true }; +sensor progress = { 40, WINH-70, WINW-80, 20 }; void main() { int btn; - sensor progress; - load_dll(libimg, #libimg_init,1); load_dll(libHTTP, #http_lib_init,1); + SetWindowLayerBehaviour(-1, ZPOS_ALWAYS_TOP); @SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_STACK); loop() switch(@WaitEventTimeout(300)) { @@ -78,23 +79,7 @@ void main() case evReDraw: _DRAW_WINDOW: - sc.get(); - DefineAndDrawWindow(screen.width-WINW/2,screen.height-WINH/2, - WINW+9,WINH+skin_height,0x34,sc.work,T_WINDOW_TITLE,0); - WriteText(30, 20, 0x81, 0xEC008C, T_TITLE_H1); - if (!install_complete) { - DrawTextViewArea(30, 50, WINW-60, WINH-80, T_INTRO, -1, sc.work_text); - progress.set_size(30, WINH-130, WINW-60, 20); - if (http.transfer<=0) { - DrawCaptButton(WINW-110/2, WINH-70, 110, 28, 9, 0x0092D8, 0xFFFfff, T_INSTALL); - keep_settings.draw(30, WINH - checkbox_h); - } - } else { - DrawIcon32(WINW-32/2, 140, sc.work, 49); - WriteTextCenter(0,185, WINW, sc.work_text, T_COMPLETE); - DrawCaptButton(WINW-110/2, WINH-70, 110, 28, 2, - 0x0092D8, 0xFFFfff, T_EXIT); - } + draw_window(); case evNetwork: if (http.transfer <= 0) break; @@ -112,6 +97,37 @@ void main() } } +void draw_window() +{ + sc.get(); + DefineAndDrawWindow(screen.width-WINW/2,screen.height-WINH/2, + WINW+9,WINH+skin_height,0x34,sc.work,T_WINDOW_TITLE,0); + WriteText(30, 20, 0x91, 0xEC008C, T_TITLE_H1); + if (!install_complete) { + if (GetProcessSlot(unimg_id)) { + //UNPACKING + draw_icon_32(WINW-32/2, 140, sc.work, 89); + WriteTextCenter(0, 185, WINW, sc.work_text, T_UNPACKING); + } else if (http.transfer<=0) { + //INTRO + DrawTextViewArea(30, 65, WINW-60, WINH-80, T_INTRO, -1, sc.work_text); + DrawCaptButton(WINW-160, WINH-70, 110, 28, 9, 0x0092D8, 0xFFFfff, T_INSTALL); + keep_settings.draw(30, WINH-65); + } else { + //DOWNLOADING + draw_icon_32(WINW-32/2, 140, sc.work, 51); + WriteTextCenter(0, 185, WINW, sc.work_text, T_DOWNLOADING); + progress.draw_wrapper(); + } + } else { + //COMPLETE + draw_icon_32(WINW-32/2, 140, sc.work, 49); + WriteTextCenter(0, 185, WINW, sc.work_text, T_COMPLETE); + DrawCaptButton(WINW-110/2, WINH-70, 110, 28, 2, + 0x0092D8, 0xFFFfff, T_EXIT); + } +} + dword GetFreeSpaceOfRamdisk() { dword rdempty = malloc(1440*1024); @@ -142,7 +158,7 @@ signed CheckFreeSpace(dword _latest, _combined) void EventDownloadComplete() { - dword unimg_id, slot_n; + dword slot_n; signed space_delta; int i=0; @@ -153,18 +169,19 @@ void EventDownloadComplete() char exract_param[64]; char backup_settings[64]; - do { sprintf(#osupdate, "/tmp0/1/osupdate%d", i); i++; + do { miniprintf(#osupdate, "/tmp0/1/osupdate%d", i); i++; } while (dir_exists(#osupdate)); CreateDir(#osupdate); - sprintf(#latest, "%s/latest", #osupdate); - sprintf(#backup, "%s/rdbackup", #osupdate); - sprintf(#combined, "%s/combined", #osupdate); - sprintf(#backup_settings, "%s/settings", #backup); - sprintf(#exract_param, "/tmp0/1/latest.img %s -e", #latest); - + miniprintf(#latest, "%s/latest", #osupdate); + miniprintf(#backup, "%s/rdbackup", #osupdate); + miniprintf(#combined, "%s/combined", #osupdate); + miniprintf(#backup_settings, "%s/settings", #backup); + miniprintf(#exract_param, "/tmp0/1/latest.img %s -e", #latest); unimg_id = RunProgram("/sys/unimg", #exract_param); + draw_window(); + do { slot_n = GetProcessSlot(unimg_id); pause(10); @@ -172,7 +189,7 @@ void EventDownloadComplete() space_delta = CheckFreeSpace(#latest, #combined); if (space_delta<0) { - sprintf(#param, "'Not enought free space! You need %d KB more.'E", -space_delta); + miniprintf(#param, "'Not enought free space! You need %d KB more.'E", -space_delta); notify(#param); } else { copyf("/sys", #backup); diff --git a/programs/cmm/misc/reshare.c b/programs/cmm/misc/reshare.c index 1215f734df..7c0e768397 100644 --- a/programs/cmm/misc/reshare.c +++ b/programs/cmm/misc/reshare.c @@ -38,11 +38,12 @@ UPDATE_ICONS18WORK: $push sc.work sc.get(); $pop eax - IF (sc.work != EAX) { + if (sc.work != EAX) { icons16w.load("/sys/icons16.png"); icons16w.replace_2colors(0xffFFFfff, sc.work, 0xffCACBD6, MixColors(sc.work, 0, 200)); memmov(shared_i16w, icons16w.imgsrc, size16); img_destroy stdcall(icons16w.image); + icons16w.image = NULL; } loop() IF(WaitEvent()==evDesktop) GOTO UPDATE_ICONS18WORK; diff --git a/programs/cmm/sysmon/sysmon.c b/programs/cmm/sysmon/sysmon.c index e98c1c947a..2dae49a279 100644 --- a/programs/cmm/sysmon/sysmon.c +++ b/programs/cmm/sysmon/sysmon.c @@ -294,14 +294,8 @@ void MonitorTmp() void DrawIconWithText(dword _x, _y, _icon, _title) { - static dword shared_icons_16; - if (!shared_icons_16) shared_icons_16 = memopen("ICONS18W", NULL, SHM_READ); - if (shared_icons_16) { - PutPaletteImage(18*18*4*_icon + shared_icons_16, 18, 18,_x, _y, 32, 0); - } else { - _x -= ICONGAP; - } - WriteTextWithBg(_x+ICONGAP, _y + 2, 0xD0, sc.work_text, _title, sc.work); + if (draw_icon_16w(_x, _y, _icon)) _x += ICONGAP; + WriteTextWithBg(_x, _y + 2, 0xD0, sc.work_text, _title, sc.work); } dword GetCpuLoad(dword max_h) diff --git a/programs/media/piano/piano.asm b/programs/media/piano/piano.asm index fb71a7b0e3..dc4ca0ac46 100644 --- a/programs/media/piano/piano.asm +++ b/programs/media/piano/piano.asm @@ -896,13 +896,13 @@ if lang eq ru t_notes db 'ДО РЕ МИ ФА СОЛЬ ЛЯ СИ ДО',0 caption db 'Детское пианино',0 else - message db 'To see help click twice on the window header',0 + message db 'Click twice on the window header to see help.',0 message1 db 'Press any key in English keyboard layout - ',0 message2 db 'so you will hear the sound from the PC-speaker (Beeper)',0 message3 db 'Note "C" is the key V,Tab,U,Enter',0 message4 db 'and when Caps Lock is on then the keys V,Q,I.',0 t_notes db 'C D E F G A B C ',0 - caption db 'Baby piano',0 + caption db 'Toy piano',0 end if ;--------------------------------------------------------------------- diff --git a/programs/system/menu/trunk/menu.asm b/programs/system/menu/trunk/menu.asm index 357e8e0d7f..b62dc80d4e 100644 --- a/programs/system/menu/trunk/menu.asm +++ b/programs/system/menu/trunk/menu.asm @@ -462,9 +462,15 @@ align 4 rep movsb ; copy string mov [edi],byte 0 ; store terminator mcall 70,fileinfo_start ; start program - or [close_now],1 ; set close flag pop edi + or [close_now],1 ; set close flag mov [mousemask],0 + ; if program run failed then start /sys/@open with param + test eax,eax + jns close + mov eax, fileinfo_start.name + mov [file_open.params], eax + mcall 70,file_open jmp close ;-------------------------------------- align 4 @@ -1070,6 +1076,16 @@ fileinfo_start: .rezerved_1 dd 0x0 ; nop .name: times 50 db ' ' +;-------------------------------------- +align 4 +file_open: + .subfunction dd 7 ; 7=START /SYS/@OPEN APP WITH PARAM + .flags dd 0 ; flags + .params dd 0x0 ; nop + .rezerved dd 0x0 ; nop + .rezerved_1 dd 0x0 ; nop + .name: + db '/SYS/@OPEN',0 ;------------------------------------------------------------------------------ IM_END: ;------------------------------------------------------------------------------