From 2d855e9f4d08c5b8bbe7d4c93345a1004d77d82d Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sat, 26 Sep 2015 21:56:55 +0200 Subject: [PATCH] libman, also sores the matching project file just in case of... --- icons/other/script_bricks.png | Bin 0 -> 1541 bytes src/ce_icons.inc | 42 ++++++++++++++++++++++++++++++++++ src/ce_libman.pas | 2 ++ src/ce_libmaneditor.lfm | 24 +++++++++++++++---- src/ce_libmaneditor.pas | 26 +++++++++++++++++++++ 5 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 icons/other/script_bricks.png diff --git a/icons/other/script_bricks.png b/icons/other/script_bricks.png new file mode 100644 index 0000000000000000000000000000000000000000..c1aefef0eade845fa8392612f370e1ca7027c1c8 GIT binary patch literal 1541 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD$Tv3bSNU;+l1ennz|zM-B0$V)JVzP|XC=H|jx7ncO3BHWAB;NpiyW)Z+ZoqGVvir744~DzI`cN=+=uFAB-e&w+(vKt_H^esM;Afr4|esh*)icxGNo zet9uiy|1s8XI^nhVqS8pr;Du;&;-5A%oHmVCr49rGZPb2O9KN#Lsuh9b2mo|Cnsk| zS2Gs_Gjm6nUYGpj(%jU%5}4i;gkDpedO=Acw*Y9fOKMSOS!#+~QGTuh*vnR#xZPre z(>$o&6x?nx#;I2y=oo!a#3DsBObD2IKumbD1#;jCKQ#}S+KYh6+J28)H3I`vrKgKy zNX4xs!QL6djuQXMHW@PJUb>}LJ5ft2W5vM^0nv>anS!e>EY{uo!zsVXoS!jTUZF~J z9?L`}jV^Y6xm#HxT7grx?7QSV+b(x@m}gJt#k9$Jn~cxp`S^$gen_q_oAGmh{=e%S zKUkk_ZWc^mdo#(XqhtBzimhK*tr!Ki1hXk|T=>jut7y=1B+e=BzIDmNce_=;nO7`7 zbY{Oqa;RZ&-juVRHgmfd{XQpsBuKKOa?{g4hfCEK2S#h( zvGdnkbZMjL%2tI#jg>1-RmE|fdTgMv^1!6!k9WL^76?eWx$$sV@AQLqJbU-DMemh7 z^jUDqORYrPN@1PTiTyKiLDw~`;{G>Lm>qxa+A6_c)kia^uSXwq4FQ zQeHoEIbgT5r%}*;)09UAuhY)vTTXQQ^DDF7alyAo%F~|wRI7}S4X?cunLCxiiN)7t z?ykSRVJ6mVq!fR6=4vcyI*>I@sc@ZaeN(wrlkoTB1y^#NJMOPbzgh5cr^k~gFGTOJ z*?l>*yXTPCi7XLcQ?-hyw;GqbEsRYV3srwDxZ!TFRW>vF@|~|1hl3aNER1jp2!41q zSYF_N#lZ}lOVt-n_S^mW!pL)H&JXhsg-#1pnEvhfVE;q!00Zk*uAFZS#=)S1+0)g} JWt~$(695emM&bYf literal 0 HcmV?d00001 diff --git a/src/ce_icons.inc b/src/ce_icons.inc index aaeb3d9f..54a06ea2 100644 --- a/src/ce_icons.inc +++ b/src/ce_icons.inc @@ -1606,6 +1606,48 @@ LazarusResources.Add('pencil','PNG',[ +#24'67'#197'a'#213#16'<'#235#26#10#31' '#192#0#180#149#19#130#202'Tj)'#0#0#0 +#0'IEND'#174'B`'#130 ]); +LazarusResources.Add('script_bricks','PNG',[ + #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#16#0#0#0#16#8#6#0#0#0#31#243#255'a' + +#0#0#0#25'tEXtSoftware'#0'Adobe ImageReadyq'#201'e<'#0#0#3'"iTXtXML:com.adob' + +'e.xmp'#0#0#0#0#0' ?'#188'F{'#0#0#2 + +'yIDATx'#218#164'SKh'#19'A'#24#254'v'#178'1'#1'm'#210#218'&}'#145'*'#26'h' + +#168#193#136#16#21#177'hi'#17#170#208#163'-'#189#248'Bo'#130'7'#15#1'['#31' ' + +'z)'#158#4#145'"('#138#7#15#30#218'j'#20'*Q'#148#180#190#210'C'#155'>m'#155 + +'VI'#140#137#209'f'#147'n'#178'3'#206'nLL'#20'Q'#240'c'#127'v'#152#249#191'o' + +#254#215#8#248#5#230#179#131#17'g'#173#217'b2'#136#136#167#179'x'#181#244#5 + +':'#1#16#180'S'#6'"'#8#208#243#13'=!0'#136#196'^B^'#223';t'#225#238#187'%' + +#246'7x'#167#194#204#191#24'cU='#131#195#164'X %g'#142'u'#185#234#181'u'#228 + +#201'eD'#251'w#zc'#15#194#3'}'#160#218#253'9\'#26#158#197#170'B'#177#177'r' + +#237#190#18#129#22#187#181'N'#19#226#166'['#184#141#170'mM'#168#218#222#8#242 + +#254#22'V'#248#158#148#205'I<'#157#139#162#251#206#27#196'R'#25#136'y'#178 + +#229#252#195'u&'#163'Q[+'#220'>O.'#162#210#177#21#169#133' '#194#129'y'#168 + +#202'z^'#8#202#227'0('#169#192#146#167#227#184#234'['#16'Pd'#217#177#195'V' + +#141#151#193'>'#12#189#189#6'['#189#25#194#243#17#148#233'*a=y'#19','#203#163 + +'"'#2'FCq'#136#140'-r'#202#235#18#1#170#208#189#238#6#11#188'>'#15#170'k'#182 + +'`^V'#208#147#236'D'#130'v'#128#190#0#14#172#204#224'T'#139#29'31'#9#132#202 + +'sy^'#161#6#10'U'#28#229'F'#29'('#163'0Y'#140#16'i'#26'Q'#169#19#237'n'#23#26 + +'j,'#184#247','#199#153#8#127#3#201#164#167#127#19'`:q'#167#211#10#236'r'#245 + +'#4'#206#195#228'}f'#138#196'{NPQ^'#241'c'#14#128#177#143'_!'#200#210'x'#158 + +'WH'#193'l4'#216#212#255#134#186'C'#216'd'#235#230'D'#192'>'#185#140#129#17 + +'?'#178#148#226'p'#235'f'#205'o9'#145'F'#252#250'i'#127'A'#160#246#226'#'#150 + +#228#249'&y_]W}'#220'Ym'#149#0'B'#4'MD'#157#186#253#141'V4;'#172#26'!'#248'I' + +'m('#164#130#192'j'#150'"q'#174#29#127#130'w:'#130#19#247#199'p'#212'mC'#136 + +#223#174'g'#217'p'#241#185'H'#228#228#232#21#223#172#187#211'U'#139#140#194 + +'J'#200'j'#20'M5&xZ'#237'('#211#139'834'#1'q%'#250#160#216'G0'#181#29'i['#211 + +#220#245'8'#195'S'#160#140#161'XBPS'#225#213'S'#31#16#255'x'#193'h<'#210'{' + +#208#201#143'>'#252#244#1#12#220#156#248'7'#240'qB'#160'$'#2#254#184#240'?' + +#248'.'#192#0#5#181#10'l'#246#0'3S'#0#0#0#0'IEND'#174'B`'#130 +]); LazarusResources.Add('textfield_add','PNG',[ #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#16#0#0#0#16#8#6#0#0#0#31#243#255'a' +#0#0#0#4'gAMA'#0#0#175#200'7'#5#138#233#0#0#0#25'tEXtSoftware'#0'Adobe Image' diff --git a/src/ce_libman.pas b/src/ce_libman.pas index 7ec5fdb4..36ce4fa2 100644 --- a/src/ce_libman.pas +++ b/src/ce_libman.pas @@ -19,10 +19,12 @@ type fAlias: string; fSourcePath: string; fLibFile: string; + fProjFile: string; published property libAlias: string read fAlias write fAlias; property libSourcePath: string read fSourcePath write fSourcePath; property libFile: string read fLibFile write fLibFile; + property projectFile: string read fProjFile write fProjFile; end; (** diff --git a/src/ce_libmaneditor.lfm b/src/ce_libmaneditor.lfm index ccd36553..ccb506c2 100644 --- a/src/ce_libmaneditor.lfm +++ b/src/ce_libmaneditor.lfm @@ -50,7 +50,7 @@ inherited CELibManEditorWidget: TCELibManEditorWidget TabOrder = 1 end object btnSelFile: TBitBtn - Left = 549 + Left = 521 Height = 26 Hint = 'select the library file' Top = 0 @@ -61,7 +61,7 @@ inherited CELibManEditorWidget: TCELibManEditorWidget TabOrder = 2 end object btnSelRoot: TBitBtn - Left = 605 + Left = 577 Height = 26 Hint = 'select the sources root' Top = 0 @@ -72,7 +72,7 @@ inherited CELibManEditorWidget: TCELibManEditorWidget TabOrder = 3 end object btnEditAlias: TBitBtn - Left = 521 + Left = 493 Height = 26 Hint = 'edit the library alias' Top = 0 @@ -103,7 +103,7 @@ inherited CELibManEditorWidget: TCELibManEditorWidget TabOrder = 6 end object btnSelfoldOfFiles: TBitBtn - Left = 577 + Left = 549 Height = 26 Hint = 'select a folder of library files' Top = 0 @@ -135,6 +135,17 @@ inherited CELibManEditorWidget: TCELibManEditorWidget Spacing = 0 TabOrder = 9 end + object btnSelProj: TBitBtn + Left = 605 + Height = 26 + Hint = 'select the project file' + Top = 0 + Width = 28 + Align = alRight + OnClick = btnSelProjClick + Spacing = 0 + TabOrder = 10 + end end object List: TListView[1] Left = 4 @@ -158,6 +169,11 @@ inherited CELibManEditorWidget: TCELibManEditorWidget AutoSize = True Caption = 'Sources root' Width = 78 + end + item + AutoSize = True + Caption = 'project' + Width = 49 end> GridLines = True HideSelection = False diff --git a/src/ce_libmaneditor.pas b/src/ce_libmaneditor.pas index 4933a427..ae105213 100644 --- a/src/ce_libmaneditor.pas +++ b/src/ce_libmaneditor.pas @@ -24,6 +24,7 @@ type btnEditAlias: TBitBtn; btnSelfoldOfFiles: TBitBtn; btnSelRoot: TBitBtn; + btnSelProj: TBitBtn; List: TListView; Panel1: TPanel; procedure btnAddLibClick(Sender: TObject); @@ -33,6 +34,7 @@ type procedure btnRemLibClick(Sender: TObject); procedure btnSelFileClick(Sender: TObject); procedure btnSelfoldOfFilesClick(Sender: TObject); + procedure btnSelProjClick(Sender: TObject); procedure btnSelRootClick(Sender: TObject); procedure btnMoveUpClick(Sender: TObject); procedure btnMoveDownClick(Sender: TObject); @@ -77,6 +79,7 @@ begin AssignPng(btnSelRoot, 'folder_add'); AssignPng(btnReg, 'book_link'); AssignPng(btnDubFetch, 'dub_small'); + AssignPng(btnSelProj, 'script_bricks'); end; procedure TCELibManEditorWidget.updateRegistrable; @@ -258,6 +261,7 @@ begin cdy := ExtractFileDir(cdy); end; SubItems.Add(cdy); + SubItems.Add(prj.filename); Selected:=true; end; finally @@ -331,6 +335,7 @@ begin else SubItems.add(fname); SubItems.add(root); + SubItems.add(fProj.filename); if not FileExists(SubItems[0]) then dlgOkInfo('the library file does not exist, maybe the project not been already compiled ?'); Selected:= true; @@ -350,6 +355,25 @@ begin gridToData; end; +procedure TCELibManEditorWidget.btnSelProjClick(Sender: TObject); +var + ini: string = ''; +begin + if List.Selected = nil then + exit; + if List.Selected.SubItems.Count > 2 then + ini := List.Selected.SubItems[2] + else while List.Selected.SubItems.Count < 3 do + List.Selected.SubItems.Add(ini); + with TOpenDialog.Create(nil) do try + if Execute then + List.Selected.SubItems[2] := FileName; + finally + free; + end; + gridToData; +end; + procedure TCELibManEditorWidget.btnSelFileClick(Sender: TObject); var ini: string = ''; @@ -462,6 +486,7 @@ begin row.Caption := itm.libAlias; row.SubItems.Add(itm.libFile); row.SubItems.Add(itm.libSourcePath); + row.SubItems.Add(itm.projectFile); end; List.EndUpdate; end; @@ -481,6 +506,7 @@ begin itm.libAlias := row.Caption; itm.libFile := row.SubItems.Strings[0]; itm.libSourcePath := row.SubItems.Strings[1]; + itm.projectFile:= row.SubItems.Strings[2]; end; LibMan.libraries.EndUpdate; LibMan.updateDCD;