From 804abbc020dd1e88e727b617907c91b8c855c843 Mon Sep 17 00:00:00 2001 From: nisargshah95 Date: Mon, 26 Feb 2018 16:21:06 +0000 Subject: [PATCH] Fix broken treelist icons git-svn-id: svn://kolibrios.org@7167 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/Tupfile.lua | 2 + programs/network/ftpc/ftpc.asm | 7 +-- programs/network/ftpc/gui.inc | 65 ++++++++++++++++++---------- programs/network/ftpc/tl_nod_16.png | Bin 0 -> 712 bytes programs/network/ftpc/tl_sys_16.png | Bin 0 -> 1425 bytes 5 files changed, 47 insertions(+), 27 deletions(-) create mode 100755 programs/network/ftpc/tl_nod_16.png create mode 100755 programs/network/ftpc/tl_sys_16.png diff --git a/data/Tupfile.lua b/data/Tupfile.lua index c682edbac9..c43236b078 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -59,6 +59,8 @@ img_files = { {"NETWORK/WV_SKIN.PNG", PROGS .. "/cmm/browser/wv_skin.png"}, {"NETWORK/FTPD.INI", "common/network/ftpd.ini"}, {"NETWORK/USERS.INI", "common/network/users.ini"}, + {"NETWORK/TL_SYS_16.PNG", PROGS .. "/network/ftpc/tl_sys_16.png"}, + {"NETWORK/TL_NOD_16.PNG", PROGS .. "/network/ftpc/tl_nod_16.png"}, {"SETTINGS/AUTORUN.DAT", "common/settings/AUTORUN.DAT"}, {"SETTINGS/ASSOC.INI", "common/settings/assoc.ini"}, {"SETTINGS/DOCKY.INI", "common/settings/docky.ini"}, diff --git a/programs/network/ftpc/ftpc.asm b/programs/network/ftpc/ftpc.asm index 8fbfd9cda7..4d093fcbec 100644 --- a/programs/network/ftpc/ftpc.asm +++ b/programs/network/ftpc/ftpc.asm @@ -1,6 +1,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; -;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; +;; Copyright (C) KolibriOS team 2013-2018. All rights reserved. ;; ;; Distributed under terms of the GNU General Public License ;; ;; ;; ;; ftpc.asm - FTP client for KolibriOS ;; @@ -61,9 +61,10 @@ macro icall reg, addr, method, [arg] purge mov,add,sub include '../../proc32.inc' -include '../../dll.inc' include '../../network.inc' - +include '../../KOSfuncs.inc' +include '../../load_img.inc' +include '../../develop/libraries/libs-dev/libimg/libimg.inc' include '../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../develop/libraries/box_lib/load_lib.mac' diff --git a/programs/network/ftpc/gui.inc b/programs/network/ftpc/gui.inc index 1ae65f48ba..a2dcf03992 100755 --- a/programs/network/ftpc/gui.inc +++ b/programs/network/ftpc/gui.inc @@ -1,8 +1,7 @@ @use_library_mem mem.Alloc, mem.Free, mem.ReAlloc, dll.Load -fn_icon1 db '../../develop/libraries/box_lib/trunk/tl_sys_16_w.bmp', 0 -fn_icon2 db '../../develop/libraries/box_lib/trunk/tl_nod_16_w.bmp', 0 -bmp_icon dd 0 +icon_tl_sys dd 0 +icon_tl_nod dd 0 TLIST_SZ = 325+16 ;=341. 16 is x-size of scroll bar TLIST1_X = 50 @@ -37,7 +36,7 @@ gui: ;////////////////////////////////////////////////////////////////////////// .init: ; load libraries - stdcall dll.Load, @IMPORT_BOXLIB + stdcall dll.Load, @IMPORT_GUI_LIBS test eax, eax jnz .exit @@ -73,13 +72,9 @@ gui: ;////////////////////////////////////////////////////////////////////////// stdcall dword[tl_data_init], tree1 stdcall dword[tl_data_init], tree2 - ; read *.bmp file system icons - copy_path fn_icon1,path,filestruct.name, 0 - - mov ecx, 3*256*13 - stdcall mem.Alloc, ecx - mov [bmp_icon], eax - + ; read icons + load_image_file 'tl_sys_16.png', icon_tl_sys + mov [filestruct.ptr], eax mov [filestruct.subfn], 0 mov [filestruct.offset], 54 @@ -87,17 +82,13 @@ gui: ;////////////////////////////////////////////////////////////////////////// mcall 70, filestruct cmp ebx, 0 jl @f - m2m dword[tree1.data_img_sys], dword[bmp_icon] - m2m dword[tree2.data_img_sys], dword[bmp_icon] + m2m dword[tree1.data_img_sys], dword[icon_tl_sys] + m2m dword[tree2.data_img_sys], dword[icon_tl_sys] @@: - ; read * .bmp file with the icon of nodes - copy_path fn_icon2, path, filestruct.name, 0 - - mov ecx, 3*256*13 - stdcall mem.Alloc, ecx - mov [bmp_icon], eax - + ; read nodes icon file + load_image_file 'tl_nod_16.png', icon_tl_nod + mov [filestruct.ptr], eax ;mov [filestruct.subfn], 0 ;mov [filestruct.offset], 54 @@ -105,8 +96,8 @@ gui: ;////////////////////////////////////////////////////////////////////////// mcall 70, filestruct cmp ebx, 0 jl @f - m2m dword[tree1.data_img], dword[bmp_icon] - m2m dword[tree2.data_img], dword[bmp_icon] + m2m dword[tree1.data_img], dword[icon_tl_nod] + m2m dword[tree2.data_img], dword[icon_tl_nod] @@: mcall 67, 35, 20, 830, 555 ; resize to main gui window's coordinates @@ -1115,9 +1106,9 @@ pb pb align 4 -@IMPORT_BOXLIB: +@IMPORT_GUI_LIBS: -library box_lib, 'box_lib.obj' +library box_lib, 'box_lib.obj', libimg, 'libimg.obj' import box_lib, \ edit_box_draw, 'edit_box', \ @@ -1170,6 +1161,31 @@ import box_lib, \ ted_text_colored, 'ted_text_colored', \ progressbar_draw, 'progressbar_draw' +import libimg, \ + lib_init1 , 'lib_init', \ + img_is_img , 'img_is_img', \;определяет по данным, может ли библиотека сделать из них изображени \ + img_info , 'img_info', \ + img_from_file , 'img_from_file', \ + img_to_file , 'img_to_file', \ + img_from_rgb , 'img_from_rgb', \ + img_to_rgb , 'img_to_rgb', \;преобразование изображения в данные RG \ + img_to_rgb2 , 'img_to_rgb2', \ + img_decode , 'img_decode', \ ;автоматически определяет формат графических данны \ + img_encode , 'img_encode', \ + img_create , 'img_create', \ + img_destroy , 'img_destroy', \ + img_destroy_layer , 'img_destroy_layer', \ + img_count , 'img_count', \ + img_lock_bits , 'img_lock_bits', \ + img_unlock_bits , 'img_unlock_bits', \ + img_flip , 'img_flip', \ + img_flip_layer , 'img_flip_layer', \ + img_rotate , 'img_rotate', \ + img_rotate_layer , 'img_rotate_layer', \ + img_draw , 'img_draw' + + +run_file_70 FileInfoBlock ; required for libimg auto_list db 1 ; to run LIST immediately after CWD filter rb 512 @@ -1182,6 +1198,7 @@ node_entry db '1111' node_entry2 db '1111' rb 512 remote_list_buf rb 1024 +file_name rb 4096 ; required for libimg conv_tabl rb 128 ed_buffer rb 100 tedit_buffer rb 1024 diff --git a/programs/network/ftpc/tl_nod_16.png b/programs/network/ftpc/tl_nod_16.png new file mode 100755 index 0000000000000000000000000000000000000000..5e2d7eb7544508f67f4bdc4d6c2b4e7df1d209e3 GIT binary patch literal 712 zcmV;(0yq7MP)a`B+=+4I$31uE4Laz*<_yR8-_vTI~l+jqEf0D%7hY4iX;-wQ_F zR$Rlny1-Ue)lgOH1ySe#XY&9--~fI80dx2fIn!}-!LYEvM@QBD{r^u^>jhKk0A=z3 zLg4^^{sLz588yx%B*_s%-~eRt07KybarY)P*%CL~0Ala}MdAQ-`6N5tl9K#TSLXs# z=>SIJ0CoB!JKcwe{6a|N2214tdHeu&`XM{rd3pP9aQ7`d-UCzV0Db)+JKcDA`(|hJ zBs$#!TkRh^-G+wyWM}U`N8gHy`}_O<`uhKIanW&c&T(q=w&#uj z0004EOGiWihy@);00009a7bBm000fv000fv0g!KboB#j-2XskIMF-*n4iE+zBT$%3 z0002vNklYHU`R}Yfn)|oLk0$hlvEfe59JOYdefvoJDToe^~`2~e2 z0!76o2@rwOGB7BwU?34NqVSj)m|0lakY(99IJvla5PV)fegQ!tVG$T#R7_k#Qc6%z zT1FPkmy;J)P*hS@;S^L=1DUO^A+DgQrLCZ&tEX=Oj0PiPaRn1oZ3P7dGjj_|pn#RQ zg0+o=0vOoZ0R`+892}v1CubKX1_oC*cPQV((+g~?w~sHF@8=%?aX({VP;dy49~uVb u8!{P&M@0HXMH?ddkTE7Uj*)>8C;$MK_*)C7Mo+Z>0000c{0 literal 0 HcmV?d00001 diff --git a/programs/network/ftpc/tl_sys_16.png b/programs/network/ftpc/tl_sys_16.png new file mode 100755 index 0000000000000000000000000000000000000000..65fac3ba12531b6c908b82d8a509744468817157 GIT binary patch literal 1425 zcmV;C1#bF@P)Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11nNmd zK~!i%?V4RkR6!Jg#~#$S4Sh2z%C`g|kzRb;0$+?05yBp%G7T|^1T6@}-FoPUtlfSL zlJE)z;m=bP5*b#~9}-(e^=M(?Lq!ltglnfcv(9zy+_`sVQ!DJ=<*=9CIo~~J?#!7p z=iV%!2bs@-fcYFmr#wD64pA!#iGc)6r>0%awE$Em2MH`cyc{apD_jsWfJK0$2!x^` z7sLj9`~D3&dOMi8qC^fxfFJ-r3WyEZcYYsaAIVNPmSu7lAV9Vs+s^vK2IN)e0r?;_ zOkY#|p_Y)%X;mAr@xVqP4-Elhv_H0moPZmTZa_{&4kNo{PykcqaCI0)#zvd~ukpZc zBkx2>+2Mi~pinjfSc4XG34P{fix<-lB;8Q|2LUlQK+=*v_di@M0szc*T+oTZKnf<) zg2#g|G(Q-oYr_+oAIzBK2eJjIY|;GS>LCJsba|H{+K`5TVY)KS&;_+G>V{|m7R?V3 zfb&BI@dYFYH!$TdG(X@Ij6(*FtxzwnVjloRY();>mhh18Yk?Qw9bIToZp+tO5U18xB-cT}%}cV78{>NfIDl$DjsyB9#EYy?Qs`~acoGdJ5eKUna&5UkEiB16G= zAj^}1a{xbo>L=5)n|UlA$a1M}8Qkt{(gOh2E91e}j|5It8U++JU~GuMrMg1B1)Y1c z*+i1%?2deR|K_P45M-)UoIIRV!Tvk>F zkw^p@8X8;>BS2ME6|}dvLwR|*3t|JNrlz2)tBaW{N=;1-ARrctDIqqXt*wojiH&7x zZEa-$5z^S$=$uTYrKQl)(qcE{3aW2(r?60(&XtvwP+wnf1ZZk%g5u(0rv*bpLr_#y z#K^ML*4El!R4yqgfzi=Xbv%%7GbY>|ax?Ta=P2_6o+n({ABJ0ry=uVe zs+I70VlF!u_X+&`>n8#yw&vb~U_xabFJz@`JyX z9|T*TMJNZVV#2H8KC}G-Zn{mErO*@u`(^ePRzKTDE9%cCtjn^8++;VMr}P&1(>TRhFlQW zNR;yfcRkSwaRF5MfxDg3Ji!KwMaOe&DVrhUZgH zoKse&`~LMrr?L@XuAUeQ>WLnaMq69gMJO#G<9Oipe8D&#cnzd`X<0BF zrTb?pcw~T`PRw3jPd0^cnqTR~0Pa{UP^>?VRW{`koX3c+UF+ zzeSfE0DeW?_u>HJ1qIABE{R-Pp_p|8&&B_+EkAt6!Joa2@<@|!W5y#<>=V)F|0y1r z#>S--6D?~JqEY%frGa2u*IXdv9(@CD+)QX&H6TVOpouIBpkU2oI(w-b27+z1@!)?P fNTxn7ctH6DrSWz3H&)?m00000NkvXXu0mjf76N={ literal 0 HcmV?d00001