From 6a4eb2fa291811389613c9786e9a6df10a511305 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Tue, 2 Oct 2018 20:13:25 +0000 Subject: [PATCH] Eolite: fix for PunkJoker WebView and TxtRead: combine toolbars into one file to save 2 sectors in IMG git-svn-id: svn://kolibrios.org@7428 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/Tupfile.lua | 1 - programs/cmm/browser/WebView.c | 18 +++++++------ programs/cmm/browser/wv_skin.png | Bin 574 -> 0 bytes programs/cmm/eolite/include/left_panel.h | 5 ++-- programs/cmm/eolite/include/translations.h | 4 +-- programs/cmm/template/template.c | 29 +++------------------ programs/cmm/txtread/toolbar.png | Bin 576 -> 961 bytes programs/cmm/txtread/txtread.c | 8 +++--- 8 files changed, 23 insertions(+), 42 deletions(-) delete mode 100644 programs/cmm/browser/wv_skin.png diff --git a/data/Tupfile.lua b/data/Tupfile.lua index 1b6b6e3e5a..d690ec1d97 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -52,7 +52,6 @@ img_files = { {"MEDIA/KIV.INI", PROGS .. "/media/kiv/trunk/kiv.ini"}, {"MEDIA/PIXIE/PIXIE.INI", PROGS .. "/cmm/pixie2/pixie.ini"}, {"MEDIA/PIXIE/SKIN.PNG", PROGS .. "/cmm/pixie2/skin.png"}, - {"NETWORK/WV_SKIN.PNG", PROGS .. "/cmm/browser/wv_skin.png"}, {"NETWORK/FTPC.INI", PROGS .. "/network/ftpc/ftpc.ini"}, {"NETWORK/FTPD.INI", "common/network/ftpd.ini"}, {"NETWORK/USERS.INI", "common/network/users.ini"}, diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index aa44e5568f..419555eeec 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -32,7 +32,7 @@ _http http = {0, 0, 0, 0, 0, 0, 0}; char homepage[] = FROM "html\\homepage.htm""\0"; #ifdef LANG_RUS -char version[]="Текстовый браузер 1.8b"; +char version[]="Текстовый браузер 1.8c"; ?define IMAGES_CACHE_CLEARED "Кэш картинок очищен" ?define T_LAST_SLIDE "Это последний слайд" char loading[] = "Загрузка страницы...
"; @@ -47,7 +47,7 @@ char link_menu[] = "Копировать ссылку Скачать содержимое ссылки"; #else -char version[]="Text-based Browser 1.8"; +char version[]="Text-based Browser 1.8c"; ?define IMAGES_CACHE_CLEARED "Images cache cleared" ?define T_LAST_SLIDE "This slide is the last" char loading[] = "Loading...
"; @@ -115,6 +115,7 @@ char editURL[sizeof(URL)]; int mouse_twb; edit_box address_box = {250,60,30,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,sizeof(URL),#editURL,#mouse_twb,2,19,19}; +#define SKIN_Y 24 void main() { @@ -124,7 +125,7 @@ void main() load_dll(libimg, #libimg_init,1); load_dll(libHTTP, #http_lib_init,1); load_dll(iconv_lib, #iconv_open,0); - Libimg_LoadImage(#skin, abspath("wv_skin.png")); + Libimg_LoadImage(#skin, "/sys/toolbar.png"); wv_progress_bar.progress_color = 0x72B7EB; CreateDir("/tmp0/1/downloads"); if (param) strcpy(#URL, #param); else strcpy(#URL, URL_SERVICE_HOME); @@ -253,10 +254,10 @@ void Draw_Window() DrawRectangle(address_box.left-3, address_box.top-3, address_box.width+5, 25,border_color); DefineButton(address_box.left-52, address_box.top-2, 24, skin.h-2, BACK_BUTTON+BT_HIDE, 0); DefineButton(address_box.left-27, address_box.top-2, 24, skin.h-2, FORWARD_BUTTON+BT_HIDE, 0); - img_draw stdcall(skin.image, address_box.left-53, address_box.top-3, 51, skin.h, 3, 0); + img_draw stdcall(skin.image, address_box.left-53, address_box.top-3, 51, skin.h, 0, SKIN_Y); DefineButton(address_box.left+address_box.width+1, address_box.top-3, 16, skin.h-1, REFRESH_BUTTON+BT_HIDE+BT_NOFRAME, 0); DefineButton(Form.cwidth-27, address_box.top-3, 23, skin.h-1, SANDWICH_BUTTON+BT_HIDE, 0); - img_draw stdcall(skin.image, Form.cwidth-24, address_box.top-3, 17, skin.h, 105, 0); + img_draw stdcall(skin.image, Form.cwidth-24, address_box.top-3, 17, skin.h, 102, SKIN_Y); DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, col_bg); DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, border_color); if (!header) @@ -414,7 +415,7 @@ void OpenPage() } if (!strncmp(#URL,"http:",5)) || (!strncmp(#URL,"https://",8)) { - img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, 131, 0); + img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, 68, SKIN_Y); if (!strncmp(#URL,"http:",5)) { http.get(#URL); @@ -450,13 +451,14 @@ void OpenPage() DrawEditBoxWebView() { + int skin_x_offset; DrawBar(address_box.left-2, address_box.top-2, address_box.width+3, 2, address_box.color); DrawBar(address_box.left-2, address_box.top, 2, 22, address_box.color); address_box.size = address_box.pos = address_box.shift = address_box.shift_old = strlen(#editURL); address_box.offset = 0; edit_box_draw stdcall(#address_box); - if (http.transfer > 0) EAX = 131; else EAX = 54; - img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, EAX, 0); + if (http.transfer > 0) skin_x_offset = 68; else skin_x_offset = 51; + img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, skin_x_offset, SKIN_Y); } diff --git a/programs/cmm/browser/wv_skin.png b/programs/cmm/browser/wv_skin.png deleted file mode 100644 index cf6f91601e51435585b13e24efe1fc8066b82423..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 574 zcmV-E0>S->P)Px#Do{*RMg08y^z`(MjEv*r;+B?{?Ck7VSXg9aWPE&l zr>Cd<1pL%aS;WM|a<}Viy;3#+00FW|L_t(Y$K{t{bHgAAh856AWB>o(of=IAb?LTS z_F-Hv*TbHVzze1Z5hKG-4X+)8nT&R3Y7UkQUv?OnqS@G~A*>hl#@CJx>P|G=f_9bZ z`lxS0Yr79kn=~?6eYc>uAZ;7a;CX^(4;t+v6Gyv7TP7g3Ct7vefClfk3EKOfoza-~ zB>+Mb=V(j78Qu=3hX@(I zz>=&Kp4r?M80<-Yq0LF2L_I28qwQO0;%P7KHQlAwLDqUpvg`~5y6jH&lY|=`b-pM_ zCA=vd0y9Gs#YEvfTCq_{AIw;5b9`$u! M07*qoM6N<$g4+=XmH+?% diff --git a/programs/cmm/eolite/include/left_panel.h b/programs/cmm/eolite/include/left_panel.h index b09e0b2ea6..ddf1b70108 100644 --- a/programs/cmm/eolite/include/left_panel.h +++ b/programs/cmm/eolite/include/left_panel.h @@ -92,7 +92,7 @@ void GetDiskIconAndName(char disk_first_letter, dword dev_icon, disc_name) void _SystemDiscs::Get() { - byte ret = 0; + bool kolibrios_exists=false; char dev_name[10], sys_discs[10]; int i1, j1, dev_num_i, dev_disc_num; dword devbuf; @@ -113,7 +113,8 @@ void _SystemDiscs::Get() } if (!strcmp(#sys_discs, "/rd/1")) { - if (dir_exists("/kolibrios")) { + if (dir_exists("/kolibrios")) && (!kolibrios_exists) { + kolibrios_exists=true; list.add("/kolibrios"); dev_num++; } diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index ef72de24ea..29375e8816 100644 --- a/programs/cmm/eolite/include/translations.h +++ b/programs/cmm/eolite/include/translations.h @@ -1,5 +1,5 @@ -#define TITLE "Eolite File Manager v3.96c" -#define ABOUT_TITLE "EOLITE 3.96c" +#define TITLE "Eolite File Manager v3.96d" +#define ABOUT_TITLE "EOLITE 3.96d" #ifdef LANG_RUS ?define T_FILE "Файл" diff --git a/programs/cmm/template/template.c b/programs/cmm/template/template.c index 18a6661693..c7b128dc90 100644 --- a/programs/cmm/template/template.c +++ b/programs/cmm/template/template.c @@ -2,36 +2,15 @@ * Template C-- program. */ -#define MEMSIZE 4096*10 +#define MEMSIZE 4096*5 -#include "../lib/io.h" -#include "../lib/gui.h" +#include "../lib/kolibri.h" +#include "../lib/fs.h" proc_info Form; void main() { - word btn; - loop() switch(WaitEvent()) - { - case evButton: - btn = GetButtonID(); - if (btn == 1) ExitProcess(); - break; - - case evKey: - GetKeys(); - if (key_scancode == SCAN_CODE_ESC) ExitProcess(); - break; - - case evReDraw: - draw_window(); - break; - } + RunProgram("/sys/syspanel", "/sys/settings/games.ini"); } -void draw_window() -{ - DefineAndDrawWindow(215, 100, 350, 300, 0x34, 0xEEEeee, "Window title",0); - GetProcessInfo(#Form, SelfInfo); -} diff --git a/programs/cmm/txtread/toolbar.png b/programs/cmm/txtread/toolbar.png index 4052692b6ceaa240cacec9f72fe2170d894bb09e..4f00ecd11805d8a947f2ef5b6fe0639f78e31eb0 100644 GIT binary patch literal 961 zcmV;y13vtTP)Cdm;^K0* z>-_xu^z`(WmX>5>WPE&lSXfxpPFW#+Bt8HD11?EKK~#7F+?LyF12GIlrMP2{eA)m1 z+(IcUqi*U=U_;0}=Ah9bII%_ab{KWAj89w-MAO${(p_*{Ph1G(_JzabHwB+4EQKVC ztibv8g_ago3t{C?^k7Ren%1gDOXt8+xRPvX23|EyxEHBGIDYOksdvFor1!J{=Y-o3 zk~V?4YMuc1=#j8fpRu0zz1_A;Shk5D2YBf#j~2Q~+j zZ(|jfSXC@k1+R0$#W2N61f+w5Z&(W)xNpm&B36y@w`$ipElkA}Wdvjd$lC_!1|apV zZw@Bk(tt(Pv%+;^s3!mlw+dw*=$qu>Ao_aMEbLXm>oQ>)4NBHbb+72V7Jk){$kax3 zW(Dd#8p2!CCO?8Qn&_^2H#ax6u#zftr1{RnyHdzzFw2fzU!)IgkgQ)H=`RO zAR}M}RI8DSTBy@m8EUidddGcXo`um3vLfje79oZ;v*e!f|!f_&4y>7;^Ur2$c3J+p#yTf~(fhOk?!99THi86bF5BQr zs1lsTP^_cRg2UU@AHfW96bzK=RY<`CzAl5q72@s!ox!E9Q_cW~H-nSdP)WNv3bBB% z*XumE!)K{tV3!DQ24}HBAbyJg?^gI0djq!_-0H9{p^GAE?^%OmLfd)|PvHCD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