diff --git a/icons/link/link.png b/icons/link/link.png new file mode 100644 index 00000000..54e626d7 Binary files /dev/null and b/icons/link/link.png differ diff --git a/icons/link/link_break.png b/icons/link/link_break.png new file mode 100644 index 00000000..aa3c8ab2 Binary files /dev/null and b/icons/link/link_break.png differ diff --git a/icons/link/link_edit.png b/icons/link/link_edit.png new file mode 100644 index 00000000..d8dc44f9 Binary files /dev/null and b/icons/link/link_edit.png differ diff --git a/icons/other/link_edit.png b/icons/other/link_edit.png new file mode 100644 index 00000000..d8dc44f9 Binary files /dev/null and b/icons/other/link_edit.png differ diff --git a/src/ce_editor.lfm b/src/ce_editor.lfm index 03be8fa7..9d9f3799 100644 --- a/src/ce_editor.lfm +++ b/src/ce_editor.lfm @@ -24,7 +24,6 @@ inherited CEEditorWidget: TCEEditorWidget Width = 459 Align = alClient BorderSpacing.Around = 2 - Images = imgList TabOrder = 0 OnChange = PageControlChange Options = [nboShowCloseButtons, nboShowAddTabButton] @@ -51,50 +50,17 @@ inherited CEEditorWidget: TCEEditorWidget end end end + inherited contextMenu: TPopupMenu + left = 32 + top = 40 + end object macRecorder: TSynMacroRecorder[2] RecordShortCut = 24658 PlaybackShortCut = 24656 - left = 64 - end - object imgList: TImageList[3] left = 32 - Bitmap = { - 4C69010000001000000010000000CCCBC900CCCBC900CCCBC900CCCBC900CCCB - C900CCCBC900CCCBC900CDCCCA00D1D0CE00B0AFAD96817F7DFF7F7D7CFF7C7A - 78FFA4A2A1977674720078767400CCCBC900CCCBC900CBCAC800CCCBC900CCCB - C900CCCBC900CCCBC900CECDCB00D2D2D0A77B7876FFEEEDECFFD5D3D2FFC3C2 - C0FF73716EFF9B9997979C9A9800CCCBC900CCCBC900CDCCCA00D0CFCD00D2D1 - CF00D2D1CF00D2D1CF00D3D2D097797775FFF5F5F4FF7E7B79FF787878876C6A - 67FFB9B7B4FF6D6B6AFF706E6D00CCCBC900CDCCCA00D0CFCD007D7B7900817F - 7D0083817E0082807E007F7D7BFFEEEDECFF7F7D7AFF00000033000000158D8D - 8D98B2B0ADFF696865FF6E6C6900CCCBC900CDCCCA00D1D0CE00827F7D008381 - 7F0083818100838180007F7D7CFFD6D4D3FF797775FF6E6C69FF62605E005D5C - 58FFA9A9A2FF5F625AFF64675E00CCCBC900CDCCCA00D2D1CF0083807E008583 - 810083817E00807E7C007D7B79FF777572FFF4F4F5FF575554FF605F5CFFA9A9 - A2FFC78BDFFFC58CDCFFB47ED600CCCBC900CECDCB00D2D1CF00827F7D008482 - 800082807E007E7C7A007A7876FFF5F5F5FF565351FFB6B3B0FFABA7A4FF8687 - 81FFE3B3E3FFCC96C7FFAF7DCFFFCFCECC00CFCECC00D3D2D0967F7D7BFF807E - 7CFF7F7D7BFF7A7876FFF6F5F5FF5B5552FF413B36FF6E655DFF8E8680FFECEA - E6FF898C83FFBA7AB6FF9869CAFFAEADAB00D4D3D1A7787675FFEEEDECFFD7D5 - D5FF797775FFF6F6F6FF5B5652FF00000033000000332F80D1FFB2DEF3FF9289 - 80FFC1BFB8FF777C6EFF00000033B4B3B1AC7A7876FFEAEBEAFF848280FF7A78 - 76FFB9B8B7FF585553FF423B36FF3487D9003880CBFF47CAFFFF22ABFFFF84B1 - D8FF7F7971FF000000339D6BCF007F7D7AFFEEEDECFF83817FFF000000336D6A - 68FF595654FFB9B3AEFF76675AFF3680CEFF49CBFFFF2EACFFFF179DFFFF316B - A2FF000000337E8073009E6BCF007C7A78FFD5D3D2FF77777788A4A4A5000000 - 003375706CFFB4A69DFF2B7CCFFF43C8FFFF2CABFFFF1B9EFFFF3C6D9BFF0000 - 0033877F76007E8073009E6BCF00767472FFC1C1BEFF7F7D7BFFA3A4A474726F - 6CFFA19993FF45B6FCFF8CE8FFFF81D5FFFF159BFFFF3D6D9BFF000000333471 - AA00878076007E8073009E6BCF00A9A7A5AC6A6866FFB7B5B3FFB2B0AEFFAFAB - A8FF665F5BFF5C87A5FF81A8B7FF90D6FFFF376A9BFF000000333A73A6003472 - AB00878076007E8073009E6BCF000000001E9F9C9BAC676564FF676564FF6461 - 60FF7D7874B1566C7EFF4A6784FF5291D9FF000000333B72A5003A73A7003472 - AB00878076007E8073009E6BCF00000000000000001E00000033000000330000 - 00330000001F0000003300000033000000330000000000000000000000000000 - 0000000000000000000000000000 - } + top = 144 end - object completion: TSynCompletion[4] + object completion: TSynCompletion[3] OnExecute = completionExecute Position = 0 LinesInWindow = 8 @@ -106,6 +72,7 @@ inherited CEEditorWidget: TCEEditorWidget EndOfTokenChr = '()[].!+"''(-*/\$:;?<>' OnCodeCompletion = completionCodeCompletion ExecCommandID = ecSynCompletionExecute - left = 96 + left = 32 + top = 88 end end diff --git a/src/ce_editor.pas b/src/ce_editor.pas index c304fcca..42f9c753 100644 --- a/src/ce_editor.pas +++ b/src/ce_editor.pas @@ -20,7 +20,6 @@ type end; TCEEditorWidget = class(TCEWidget, ICEMultiDocObserver, ICEMultiDocHandler) - imgList: TImageList; PageControl: TExtendedNotebook; macRecorder: TSynMacroRecorder; editorStatus: TStatusBar; @@ -36,7 +35,6 @@ type fKeyChanged: boolean; fDoc: TCESynMemo; // TODO-cbugfix: syncro-edit partially broken, undetermined condition - // TODO-cbugfix: syncro-edit icon hidden after deletion, if doc is saved (as temp file, by the static explorer) fSyncEdit: TSynPluginSyncroEdit; tokLst: TLexTokenList; errLst: TLexErrorList; @@ -86,7 +84,7 @@ end; {$REGION Standard Comp/Obj------------------------------------------------------} constructor TCEEditorWidget.create(aOwner: TComponent); var - bmp: TBitmap; + png: TPortableNetworkGraphic; begin inherited; // @@ -97,12 +95,12 @@ begin fSyncEdit := TSynPluginSyncroEdit.Create(self); //TODO-cLCL&LAZ-specific: activate this after next Laz release //fSyncEdit.CaseSensitive:=true; - bmp := TBitmap.Create; + png := TPortableNetworkGraphic.Create; try - imgList.GetBitmap(0, bmp); - fSyncEdit.GutterGlyph.Assign(bmp); + png.LoadFromLazarusResource('link_edit'); + fSyncEdit.GutterGlyph.Assign(png); finally - bmp.Free; + png.Free; end; // {$IFDEF LINUX} @@ -422,6 +420,12 @@ begin // tokLst.Clear; errLst.Clear; + // when a widget saves a temp file & syncro mode is on: + // - editor is saved + // - gutter is updated (green bar indicating a saved block) + // - syncroedit icon is hidden + if fSyncEdit.Active then + fDoc.Refresh; end; {$ENDREGION} diff --git a/src/ce_icons.inc b/src/ce_icons.inc index 38b59cc4..feea574f 100644 --- a/src/ce_icons.inc +++ b/src/ce_icons.inc @@ -1018,6 +1018,80 @@ LazarusResources.Add('folder_star','PNG',[ +#250'U'''#200'ur'#141#220'o'#253'V'#228#131#127#4#24#0'E'''#18'h'#153#158#23 +#220#0#0#0#0'IEND'#174'B`'#130 ]); +LazarusResources.Add('link','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#0#219'IDATx'#218#236 + +#147'='#11#131'@'#12#134#147'z'#139#160#127#207'I\'#156#236#164#139#142#226 + +#168'88Huq'#17''''#127#156#224#7#8#130#156#189#208#131#182'h;'#184#149'f'#184 + +#4#158'7'#31#228#238#144's'#14'g'#236#2''''#237#7#10'0q'#212'u}'#187';'#231 + +#141#21#150'e]'#191'q,'#203#146#160'i'#154#176#174'+'#17'EQ'#160'i'#26#18'=' + +#196#135#28#211'4'#229#182'mCUU'#4'5M'#3'UUw'#199#157#231#25#166'i'#162'X' + +#230#176'a'#24#160#235':'#16'>'#138'"'#140#227#152'?w'#147'&'#186#230'y'#14 + +'A'#16'`'#24#134'\'#230#176#190#239#169#170#240#174#235#242'eY'#192#243#188 + +#253#133'1F'#26#17#203#28'1A'#145'e'#153#227#251'>'#232#186'N'#194'q'#28'!I' + +#146#151#29#28'q'#20'O'#217'0'#140#221'-'#183'mK'#183#240#137#227#255'/'#192 + +'&'#192#0'd'#173#130';*'#219#202#230#0#0#0#0'IEND'#174'B`'#130 +]); +LazarusResources.Add('link_break','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#1#159'IDATx'#218'|S' + +'=K'#3'A'#16#221'|`'#170#211#24'L'#254#132#141'U~'#128'`'#165'XD'#184'J'#175 + +#137#10'w('#4#14#210#134'TB'#4'9,r'#9'zM'#16#145#128#141#4#180#17',l-'#5#127 + +#131'J4'#151#131#152'B'#214'7'#155#156#172'k'#238#6'^ff'#223#220#203#236#238 + +','#227#156#179'('#244#10#218'~'#28'OH'#178#169']'#23#230'S'#192#3#176#18#174 + +'}q'#214#150#248'"pOuL'#178'_'#129#173'W'#255'{'#196#147''''#192#237'E>+D'#16 + +#11#14'y'#17'q'#15'8'#166':Y Am'#200'v'#182#180#184#9#231#0#203'So'#3'/'#192 + +#238#222#251#199#29'Sm'#214#190'Ns'#217#156#146'/D'#157#129#232#160#211#233 + +'4'#161'e*'#218#174'a'#24'V'#28''''#162'V'#171#213#4'x'#16#4'|0'#24#8'PLk$' + +#30#197#209'w'#196#167#177'`'#150#203'e*Tw'#231#210#15'x'#23#220#159#14#168 + +#222#243''#207'y'#158#247#188#135#211#233#251 + +#241#191#143#227'8H$'#18'X,'#22#181#201'd. '#129#0#252#162#136#164'E'#139#26 + +#204#3#3#5'<'#207'C'#242#183#152#16#18#4'L&'#224'y'#174'U'#167#211#167')'#21 + +#197#24#25#25#133#205'nC{'#199#237'|J'#194#242#5'!'#2#198#22#17#17#17'\'#195 + +#8#234#155#155'['#210'*'#202#203'p'#162#178#6'D'#244'V'#219#29#206'C'#169#169 + +#169#184#223#213#149'O'#235#127#19#176#147#24#184#173'M'#27#148#204'1'#18#170 + +'H'#20#197#252'R'#165#2#149#213'''Qu'#226#152'@K?'#212#214#214#206#244'x' + +#209#15#194','#254#235'W'#202'$'#131'i`'#201#0']GG'#199#224#243'zQP'#184#175 + +#223#229'trz'#163')/6>'#30'.'#175#27#18'"'#5#199#154#200#192'R'#169#20#29#29 + +'w'#168#18#30'"mV'#128'6'#139'* '#30#10'>^q'#4#153#217'9'#136#138#158#130#245 + +#155'6b'#213#135#4#136'\'#0'^'#135#157#11'Y'#248#219'H'#22'L~'#128#146'P'#2 + +#28'W'#149'#cW62'#179#178#224't'#186#240#230#237'+'#172'K^'#142#177#225'qD}' + +#247#17#158'yg'#4'4'#212#129#128'H'#252'~?a'''#179#181#226'H'#25'vf'#237#193 + +#167#177'/'#208'vv'#227#181'e'#24#185'9{pe'#168#5#246#143'6'#248#172#227#192 + +'-m;'#204#207'_'#180'*'#148#135#136#245#171#141#12#14#190'$'#138#210#195#196 + +#237'v'#147'm;'#210#169#28#200'X'#152'UK'#200#196#219'N'#162#170'9G'#186#31 + +'>&'#251#202'J'#131'9'#238#206#221#174#182#158#158'^yI'#241'~'#168#235'/'#128 + +#2#177'n'#237#26'h'#154'.cx'#228'3'#174'nqp'#14#143#132#8#155'b'#128#247#175 + +'0'#20#185#27#141'}>'#156#169':*'#24#247'6'#25'x'#221'3'#189'\'#169'(A'#157 + +#186#17#170#242'2'#193#225#152'@'#211#165'+H'#167#190#23'$'#11'pyx"l'#158'I/' + +'p'#20'p'#184#240#236#129'6'#8'.V'#149#27'h'#247#192#179'n'#179#9#251#233'v' + +#214'4_'#187'fhP'#159#23'f'#207#141#135'}'#194#7'E'#236'=,'#219'0'#13'x7L' + +#193'_'#161'1-'#196#174':'#163#160#172#168'2'#132#6#208'K'#175#201'j'#179'B' + +#18#25'EM'#145#146#194#162#131#253#137'I'#201#200#156'q'#22'K'#11#179#129'i' + +#171#129'o'#227#208#24#231'#'#247#252'S'#225#230#1#193#128#176#137#231'e2' + +#153#246'z'#235#13#164#164#164' zj'#204#169#149'+W'#161#175#183#7'7'#204'q' + +#232'~'#228#162'*c'#254#128#159#8'-'#197#203#13#147#158'K'#144'+'#225#162#230 + +#242'i'#157#174'O'#206'~'#248#253'"f'#197#205#233#140'v'#14'm'#141#244'9'#177 + +'}q'#20#18#139#218#133#230#131'+'#12''#207'y'#158#247#188#135#211#233#251 + +#241#191#143#227'8H$'#18'X,'#22#181#201'd. '#129#0#252#162#136#164'E'#139#26 + +#204#3#3#5'<'#207'C'#242#183#152#16#18#4'L&'#224'y'#174'U'#167#211#167')'#21 + +#197#24#25#25#133#205'nC{'#199#237'|J'#194#242#5'!'#2#198#22#17#17#17'\'#195 + +#8#234#155#155'['#210'*'#202#203'p'#162#178#6'D'#244'V'#219#29#206'C'#169#169 + +#169#184#223#213#149'O'#235#127#19#176#147#24#184#173'M'#27#148#204'1'#18#170 + +'H'#20#197#252'R'#165#2#149#213'''Qu'#226#152'@K?'#212#214#214#206#244'x' + +#209#15#194','#254#235'W'#202'$'#131'i`'#201#0']GG'#199#224#243'zQP'#184#175 + +#223#229'trz'#163')/6>'#30'.'#175#27#18'"'#5#199#154#200#192'R'#169#20#29#29 + +'w'#168#18#30'"mV'#128'6'#139'* '#30#10'>^q'#4#153#217'9'#136#138#158#130#245 + +#155'6b'#213#135#4#136'\'#0'^'#135#157#11'Y'#248#219'H'#22'L~'#128#146'P'#2 + +#28'W'#149'#cW62'#179#178#224't'#186#240#230#237'+'#172'K^'#142#177#225'qD}' + +#247#17#158'yg'#4'4'#212#129#128'H'#252'~?a'''#179#181#226'H'#25'vf'#237#193 + +#167#177'/'#208'vv'#227#181'e'#24#185'9{pe'#168#5#246#143'6'#248#172#227#192 + +'-m;'#204#207'_'#180'*'#148#135#136#245#171#141#12#14#190'$'#138#210#195#196 + +#237'v'#147'm;'#210#169#28#200'X'#152'UK'#200#196#219'N'#162#170'9G'#186#31 + +'>&'#251#202'J'#131'9'#238#206#221#174#182#158#158'^yI'#241'~'#168#235'/'#128 + +#2#177'n'#237#26'h'#154'.cx'#228'3'#174'nqp'#14#143#132#8#155'b'#128#247#175 + +'0'#20#185#27#141'}>'#156#169':*'#24#247'6'#25'x'#221'3'#189'\'#169'(A'#157 + +#186#17#170#242'2'#193#225#152'@'#211#165'+H'#167#190#23'$'#11'pyx"l'#158'I/' + +'p'#20'p'#184#240#236#129'6'#8'.V'#149#27'h'#247#192#179'n'#179#9#251#233'v' + +#214'4_'#187'fhP'#159#23'f'#207#141#135'}'#194#7'E'#236'=,'#219'0'#13'x7L' + +#193'_'#161'1-'#196#174':'#163#160#172#168'2'#132#6#208'K'#175#201'j'#179'B' + +#18#25'EM'#145#146#194#162#131#253#137'I'#201#200#156'q'#22'K'#11#179#129'i' + +#171#129'o'#227#208#24#231'#'#247#252'S'#225#230#1#193#128#176#137#231'e2' + +#153#246'z'#235#13#164#164#164' zj'#204#169#149'+W'#161#175#183#7'7'#204'q' + +#232'~'#228#162'*c'#254#128#159#8'-'#197#203#13#147#158'K'#144'+'#225#162#230 + +#242'i'#157#174'O'#206'~'#248#253'"f'#197#205#233#140'v'#14'm'#141#244'9'#177 + +'}q'#20#18#139#218#133#230#131'+'#12'