From b80a9d4dc8f5103d0ee79a560e888091680a71ca Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Thu, 5 Oct 2017 21:38:09 +0000 Subject: [PATCH] Eolite 3.82: use icons16.png for icons and "/sys/File Managers/icons.ini" for icon associations instead of build in data git-svn-id: svn://kolibrios.org@7054 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/common/File Managers/icons.ini | 53 ++++--- data/common/icons16.png | Bin 4703 -> 4541 bytes programs/cmm/eolite/Eolite.c | 60 ++++---- programs/cmm/eolite/include/icons.h | 141 ++++--------------- programs/cmm/eolite/include/settings.h | 2 +- programs/cmm/eolite/include/translations.h | 4 +- programs/cmm/lib/kolibri.h | 2 + programs/cmm/lib/patterns/libimg_load_skin.h | 8 ++ 8 files changed, 111 insertions(+), 159 deletions(-) diff --git a/data/common/File Managers/icons.ini b/data/common/File Managers/icons.ini index fb53c565ae..ef345b6e72 100644 --- a/data/common/File Managers/icons.ini +++ b/data/common/File Managers/icons.ini @@ -1,6 +1,6 @@ [icons16] -asm=4 -inc=4 +=0 +=22 txt=3 rtf=3 ini=3 @@ -13,6 +13,16 @@ inf=3 xml=3 odt=3 fb2=3 +asm=4 +inc=4 +img=5 +ima=5 +imz=5 +bwz=5 +dsk=5 +vfd=5 +wil=5 +wlz=5 jpg=6 jpe=6 jpeg=6 @@ -84,27 +94,8 @@ au=7 snd=7 wma=7 wm=7 -avi=11 -mpg=11 -mpe=11 -mpeg=11 -flv=11 -3gp=11 -mkv=11 -wmv=11 -mov=11 -mp4=11 -img=5 -ima=5 -imz=5 -bwz=5 -dsk=5 -vfd=5 -wil=5 -wlz=5 exe=8 com=8 -bat=8 7z=9 rar=9 zip=9 @@ -126,6 +117,16 @@ uu=9 xxe=9 z=9 dat=10 +avi=11 +mpg=11 +mpe=11 +mpeg=11 +flv=11 +3gp=11 +mkv=11 +wmv=11 +mov=11 +mp4=11 ttf=12 ttc=12 chr=12 @@ -144,3 +145,13 @@ dll=18 ocx=18 so=18 drv=18 +iso=19 +cue=19 +mdf=19 +grf=20 +xls=21 +xlsx=21 +nes=23 +bat=24 +sh=24 +sys=25 \ No newline at end of file diff --git a/data/common/icons16.png b/data/common/icons16.png index 912392c5eb732202e3760915d2f03e6b0a641870..b65b942ff2a2e7b1c38ce5460fe963f89ec2c398 100644 GIT binary patch literal 4541 zcmV;u5kl^XP)Zlib?J&aspNP`33^`XVccD!2ZUE@eM!O8~&f0hm!(aI*bTUz&;d z@A}Ofbfvl3woqT%7s$_lJs2<~)WhWy0LHq;W=hMevxK;e%z5RFr5e*fb#NcQ-~#?xVX|BVg)ED zC^v;z0))I?HY-(v*%aVJJ@$BTo7yuII#QXIE#G1Hc%To!@!*RuZ5{Es?ERR-9vKY8+`BrNCW=WFUnfaqNvm5_=&j4%n~u3ft{btHg$QyE_|En>5jhY=>Z zupZ^2jsgI))xe1c6aY_IgS66#6aYJ|E22m&?gC)57;QGAO{oj`>c#oCqydO+>T?7F z;3R^V;|u+ZKmkzCLMx$e(8?oS0Dsg2?k9#VN+N&60Y*0-tfT;B*0ea1A>depQnmqV zqmfG4g=j))sTR=G(qyR*4(+1ft$mZrbPUkKs7;AnFo|Vh)&A#d0PD*=F1w+l|B0r)kQ{o0v&=JSOCZ+UFV6tJbR z(Ns97ngT|~95!to<)#49f>rtV34n9LWxL9yK^*c`d%oa+&<)3wT>t>4xXfCL-ung3NIYc~hOefACJolQeVe zV>C5zIJLFy;E?dizvHs?{s92{Hjbb>^|Pt%{F~HPJChD?AIkxj?;jv+w0xyv3Z-s{ zqF0|AN}Jb3a)@4cGys^XD46fM$ltngnM2z0$8rH;`u>3w0Rtd{kY}HvO$iaydMJoq z9XXV?&Yf!g{(%^S`kl{H&DPOOV<<0m3@w=SU-sTVkZ%P*kiPTEleCD*(fbGQzcGnk zeCoe>+Vh?_ngW7@gME?$Akz1;FPTbSS2qGXfO`>GL|}LG-P;O1Is%{e#-9Ji^lW#c zLXH5qIpy9|N}tx=;Bo{wd!d;dV8qis#{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A3bCffV}Wvywx>l&K%ma$3y-5_qPvVdEr6fuCTCav};#7Wo2bkVc|hr zLSA@Yc_oZoczHJ%-I)*NyP6LrF>D--9XNn59nFI=W8`nRU?$qYmtvo7z`hM^`qP>h zBw^bYK!gp``W0{Rbu6(hs$&Y^=6!>>_u7q0w9kipb;qr1n)c{{=2nS$k1wbB4fSHizljmGY0KWML z081+X@@N1^hzjY=m)_Xnrb3?738sL7rs@*F)@QmBkPzY=ur@>mK;r<=-cSQAG+YUQ zF%WgL8xB4m;&MrnZ%fY>Rq46_`O;|p+Xd)V!Dw3pa4N$Hj2cayt{Z__oz?4I59mIP h_+#yf-`n-z{{ecSQr;*fR80T?002ovPDHLkV1k)azT5x+ diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 3ba256095b..19e77181c7 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -7,23 +7,26 @@ //libraries #define MEMSIZE 4096 * 180 -#include "..\lib\clipboard.h" -#include "..\lib\strings.h" -#include "..\lib\mem.h" -#include "..\lib\file_system.h" -#include "..\lib\gui.h" -#include "..\lib\list_box.h" -#include "..\lib\random.h" -#include "..\lib\kfont.h" -#include "..\lib\collection.h" -#include "..\lib\menu.h" -#include "..\lib\obj\libini.h" -#include "..\lib\obj\box_lib.h" -#include "..\lib\patterns\history.h" +#include "../lib/clipboard.h" +#include "../lib/strings.h" +#include "../lib/mem.h" +#include "../lib/file_system.h" +#include "../lib/gui.h" +#include "../lib/list_box.h" +#include "../lib/random.h" +#include "../lib/kfont.h" +#include "../lib/collection.h" +#include "../lib/menu.h" +#include "../lib/copyf.h" + +#include "../lib/obj/libini.h" +#include "../lib/obj/box_lib.h" + +#include "../lib/patterns/history.h" +#include "../lib/patterns/libimg_load_skin.h" //images -#include "imgs\left_p.txt" -#include "imgs\icons.txt" +#include "imgs/left_p.txt" //Button IDs enum { @@ -103,6 +106,9 @@ bool show_dev_name=true, active_panel=1; //} settings; +libimg_image icons16_default; +libimg_image icons16_selected; + #define STATUS_BAR_H 16; int status_bar_h = 0; @@ -114,7 +120,6 @@ byte cmd_free=0; #include "include\settings.h" #include "include\progress_dialog.h" -#include "..\lib\copyf.h" #include "include\copy.h" #include "include\gui.h" #include "include\sorting.h" @@ -136,6 +141,8 @@ void main() load_dll(boxlib, #box_lib_init,0); load_dll(libini, #lib_init,1); + load_dll(libio, #libio_init,1); + load_dll(libimg, #libimg_init,1); eolite_ini_path = abspath("Eolite.ini"); @@ -143,6 +150,11 @@ void main() SystemDiscs.Get(); SetAppColors(); + Libimg_LoadImage(#icons16_default, "/sys/icons16.png"); + Libimg_LoadImage(#icons16_selected, "/sys/icons16.png"); + Libimg_ReplaceColor(icons16_selected.image, icons16_selected.w, icons16_selected.h, 0xffFFFfff, 0xFF94AECE); + Libimg_ReplaceColor(icons16_selected.image, icons16_selected.w, icons16_selected.h, 0xffCACBD6, 0xFF94AECE); + //-p just show file/folder properties dialog if (param) && (param[0]=='-') && (param[1]=='p') { @@ -316,7 +328,7 @@ void main() id=GetButtonID(); switch(id) { - case 01: + case CLOSE_BTN: KillProcess(about_window); SaveIniSettings(); ExitProcess(); @@ -360,7 +372,7 @@ void main() DeleteButton(POPUP_BTN1); DeleteButton(POPUP_BTN2); break; - case BREADCRUMB_ID...400: + case BREADCRUMB_ID...360: ClickOnBreadCrumb(id-BREADCRUMB_ID); break; } @@ -688,10 +700,10 @@ void Line_ReDraw(dword bgcol, filenum){ char temp_path[sizeof(file_path)]; char label_file_name[4096]; if (filenum==-1) return; - DrawBar(files.x,y,3,files.item_h,bgcol); - DrawBar(files.x+19,y,files.w-19,files.item_h,bgcol); - if (files.item_h>15) DrawBar(files.x+3,y,16,icon_y-y,bgcol); - if (files.item_h>16) DrawBar(files.x+3,icon_y+15,16,y+files.item_h-icon_y-15,bgcol); + DrawBar(files.x,y,4,files.item_h,bgcol); + DrawBar(files.x+20,y,files.w-20,files.item_h,bgcol); + DrawBar(files.x+4,y,16,icon_y-y,bgcol); + if (files.item_h>16) DrawBar(files.x+4,icon_y+15,16,y+files.item_h-icon_y-15,bgcol); file_offet = file_mas[filenum+files.first]*304 + buf+32; attr = ESDWORD[file_offet]; @@ -715,13 +727,13 @@ void Line_ReDraw(dword bgcol, filenum){ } else { - if (!strncmp(file_name_off,"..",3)) ext1=".."; else { + if (!strncmp(file_name_off,"..",3)) ext1=""; else { ext1=""; WriteTextCenter(files.x+files.w-140, files.text_y+y+1, 72, 0, ext1); } } sprintf(#temp_path,"%s/%s",#path,file_name_off); - DrawIconByExtension(#temp_path, ext1, files.x+3, icon_y, bgcol); + DrawIconByExtension(#temp_path, ext1, files.x+4, icon_y, bgcol); if (TestBit(attr, 1)) || (TestBit(attr, 2)) text_col=0xA6A6B7; //system or hiden? if (bgcol!=0xFFFfff) diff --git a/programs/cmm/eolite/include/icons.h b/programs/cmm/eolite/include/icons.h index 0714505b3a..952b25f05c 100644 --- a/programs/cmm/eolite/include/icons.h +++ b/programs/cmm/eolite/include/icons.h @@ -1,55 +1,32 @@ -char *ext[]={ -"..", 17, -"",16, "",16, -"txt", 1, "doc", 1, "rtf", 1, "odt", 1, "log", 1, "docx",1, -"htm", 2, "html",2, "mht", 2, -"ini", 3, "js", 3, "conf",3, "inf", 3, -"xlt", 4, "xls", 4, "ods", 4, "xlsx",4, -"cmd", 5, "bat", 5, "py", 5, "sh", 5, "ksh", 5, "com", 5, -"kex", 6, "lua", 6, -"exe", 7, "msi", 7, -"sys", 8, "ocx", 8, "drv", 8, "so", 8, -"inc", 9, -"chr", 10, "mt", 10, "ttf", 10, "fon", 10, "kf", 10, -"asm", 11, -"mp3", 12, "wav", 12, "mid", 12, "midi",12, "ogg", 12, "wma", 12, "flac",12, -"skn", 13, -"avi", 14, "flv", 14, "mpg", 14, "wmv", 14, "mov", 14, "mkv", 14, "mp4", 14, "vob", 14, "webm", 14, -"djvu",15, "pdf", 15, "fb2", 15, -"nes", 18, "smc", 18, "min", 18, -"gif", 19, "bmp", 19, "tga", 19, "pcx", 19, "png", 19, "pnm", 19, "jpg", 19, "xcf", 19, "ai", 19, -"jpeg",19, "raw", 11, "psd", 19, "wbmp",19, "tiff",19, "tif", 19, -"3ds", 20, "asc", 20, "ico", 20, "cur", 20, "ani", 20, "vox", 20, -"img", 21, "ima", 21, -"dll", 22, "obj", 22, "dict",22, -"rar", 23, "zip", 23, "cab", 23, "tar", 23, "ajr", 23, "jar", 23, "7z", 23, "gz", 23, "kexp", 23, -"iso", 24, "cue", 24, "nrg", 24, "mdf", 24, -"grf", 25, -0,0}; +_ini icons = { "/sys/File managers/icons.ini", "icons16" }; void DrawIconByExtension(dword file_path, extension, xx, yy, fairing_color) { char BYTE_HEAD_FILE[4]; + char ext[512]; int i; dword icon_n=0; - if (extension) for (i=0; ext[i]!=0; i+=2;) + + if (extension) { - if (strcmpi(extension, ext[i])==0) - { - icon_n = ext[i+1]; - break; - } + strcpy(#ext, extension); + strlwr(#ext); + icon_n = icons.GetInt(#ext, 2); } else if (file_path) { - //if (!strncmp(file_path, "/rd/1",5)) || (!strncmp(file_path, "/tmp",4)) { ReadFile(0,4,#BYTE_HEAD_FILE,file_path); - IF(DSDWORD[#BYTE_HEAD_FILE]=='KCPK')||(DSDWORD[#BYTE_HEAD_FILE]=='UNEM') icon_n = 6; - //} + IF(DSDWORD[#BYTE_HEAD_FILE]=='KCPK')||(DSDWORD[#BYTE_HEAD_FILE]=='UNEM') icon_n = icons.GetInt("kex", 2); + } + if (fairing_color==col_selec) + { + img_draw stdcall(icons16_selected.image, xx, yy, 16, 16, 0, icon_n*16); + IconFairing(icon_n, xx, yy, fairing_color); + } + else + { + img_draw stdcall(icons16_default.image, xx, yy, 16, 16, 0, icon_n*16); } - ficons_pal[0] = fairing_color; - PutPaletteImage(icon_n*16*15+#ficons,16,15,xx,yy,8,#ficons_pal); - if (fairing_color!=0xFFFfff) IconFairing(icon_n, xx, yy, fairing_color); } @@ -57,35 +34,24 @@ void IconFairing(dword filenum, x,y, color) { switch(filenum) { - case 0...1: //file - case 3: //íàñòðîéêè - RIGHT_PAINT: - PutPixel(x+10,y,color); - PutPixel(x+11,y+1,color); - PutPixel(x+12,y+2,color); - PutPixel(x+13,y+3,color); + case 0: //folder + case 22: // + DrawBar(x+7,y,8,2,color); + IF (filenum==22) PutPixel(x+10,y+1,0x1A7B17); //green arrow part + DrawBar(x,y+13,15,2,color); + PutPixel(x,y,color); + PutPixel(x+6,y,color); + PutPixel(x+14,y+2,color); + PutPixel(x,y+12,color); + PutPixel(x+14,y+12,color); return; - case 2: //html + case 13: //html DrawBar(x,y,1,7,color); DrawBar(x+1,y,1,6,color); DrawBar(x,y+10,1,5,color); DrawBar(x+1,y+11,1,4,color); - GOTO RIGHT_PAINT; - case 9: //inc - DrawBar(x+13,y,1,3,color); - DrawBar(x+14,y,2,4,color); - DrawBar(x+15,y,1,15,color); - PutPixel(x+3,y+14,color); - DrawBar(x+4,y+13,1,2,color); - DrawBar(x+5,y+12,10,3,color); - PutPixel(x+10,y+11,color); - DrawBar(x+11,y+10,1,2,color); - DrawBar(x+12,y+9,1,3,color); - PutPixel(x+12,y+7,color); - DrawBar(x+13,y+6,2,7,color); - PutPixel(x+14,y+5,color); return; - case 10: //font + case 12: //font DrawBar(x+1,y+1,1,13,color); DrawBar(x+2,y+1,1,11,color); DrawBar(x+3,y+1,1,10,color); @@ -100,57 +66,10 @@ void IconFairing(dword filenum, x,y, color) DrawBar(x+8,y+10,2,1,color); DrawBar(x+7,y+11,2,3,color); return; - case 12: //audio - PutPixel(x+2,y+9,color); - PutPixel(x+1,y+10,color); - PutPixel(x+10,y+8,color); - PutPixel(x+9,y+9,color); - - PutPixel(x+6,y+13,color); - PutPixel(x+5,y+14,color); - PutPixel(x+14,y+12,color); - PutPixel(x+13,y+13,color); - return; - case 13: //skin - PutPixel(x+15,y,color); - return; - case 16...17: //folder - DrawBar(x,y,1,15,color); - DrawBar(x+8,y,8,2,color); - IF (filenum==17) PutPixel(x+11,y+1,0x1A7B17); //green arrow part - DrawBar(x+1,y+13,15,2,color); - PutPixel(x+1,y,color); - PutPixel(x+7,y,color); - PutPixel(x+15,y+2,color); - PutPixel(x+1,y+12,color); - PutPixel(x+15,y+12,color); - return; - case 18: + case 23: //nes DrawBar(x,y+11,1,2,color); DrawBar(x+15,y+11,1,2,color); DrawBar(x,y+13,16,1,color); return; - case 24: - DrawBar(x,y,6,1,color); - DrawBar(x,y+1,4,1,color); - DrawBar(x,y+2,3,1,color); - DrawBar(x,y+3,2,2,color); - - DrawBar(x,y+5,1,5,color); - - DrawBar(x,y+10,2,2,color); - DrawBar(x,y+12,3,1,color); - DrawBar(x,y+13,4,1,color); - DrawBar(x,y+14,6,1,color); - - DrawBar(x+11,y,5,1,color); - DrawBar(x+13,y+1,3,1,color); - DrawBar(x+14,y+2,2,1,color); - DrawBar(x+15,y+3,1,2,color); - - DrawBar(x+15,y+10,1,2,color); - DrawBar(x+14,y+12,2,1,color); - DrawBar(x+13,y+13,3,1,color); - DrawBar(x+11,y+14,5,1,color); } } diff --git a/programs/cmm/eolite/include/settings.h b/programs/cmm/eolite/include/settings.h index 0df25b73d2..579676b2a4 100644 --- a/programs/cmm/eolite/include/settings.h +++ b/programs/cmm/eolite/include/settings.h @@ -76,7 +76,7 @@ void settings_dialog() else if (id==24) two_panels ^= true; else if (id==32) show_breadcrumb ^= true; else if (id==25) { files.item_h++; files_active.item_h = files_inactive.item_h = files.item_h; } - else if (id==26) && (files.item_h>15) files_inactive.item_h = files.item_h = files.item_h-1; + else if (id==26) && (files.item_h>16) files_inactive.item_h = files.item_h = files.item_h-1; else if (id==27) show_status_bar ^= 1; else if (id==30) { kfont.size.pt++; IF(!kfont.changeSIZE()) kfont.size.pt--; BigFontsChange(); } else if (id==31) { kfont.size.pt--; IF(!kfont.changeSIZE()) kfont.size.pt++; BigFontsChange(); } diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index be6f1e9403..dc55c797c1 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.81" -#define ABOUT_TITLE "EOLITE 3.81" +#define TITLE "Eolite File Manager v3.82" +#define ABOUT_TITLE "EOLITE 3.82" #ifdef LANG_RUS ?define T_FILE "” ©«" diff --git a/programs/cmm/lib/kolibri.h b/programs/cmm/lib/kolibri.h index ac8f88b343..c6827fc5d5 100644 --- a/programs/cmm/lib/kolibri.h +++ b/programs/cmm/lib/kolibri.h @@ -62,6 +62,8 @@ char program_path[4096]; #define BT_HIDE 0x40000000 #define BT_NOFRAME 0x20000000 +#define CLOSE_BTN 1 + //------------------------------------------------------------------------- #include "../lib/system.h" diff --git a/programs/cmm/lib/patterns/libimg_load_skin.h b/programs/cmm/lib/patterns/libimg_load_skin.h index 4a2030d783..baa505f5e4 100644 --- a/programs/cmm/lib/patterns/libimg_load_skin.h +++ b/programs/cmm/lib/patterns/libimg_load_skin.h @@ -27,4 +27,12 @@ for (i = image_data; i < max_i; i += 4) if (DSDWORD[i]==0) DSDWORD[i] = new_transparent_color; } +:void Libimg_ReplaceColor(dword struct_pointer, w, h, old_color, new_color) +{ + dword i, max_i, image_data; + image_data = ESDWORD[struct_pointer + 24]; + max_i = w * h * 4 + image_data; + for (i = image_data; i < max_i; i += 4) if (DSDWORD[i]==old_color) DSDWORD[i] = new_color; +} + #endif \ No newline at end of file