- enhancement: support ligatures in fonts like fira code ( disabled by default, can be turned on in options dialog's editor font page)

This commit is contained in:
Roy Qu 2022-01-10 20:16:26 +08:00
parent 0e0f954bec
commit 3d9edcad57
10 changed files with 264 additions and 210 deletions

View File

@ -3,6 +3,7 @@ Red Panda C++ Version 0.13.2
- fix: crash when closing the options dialog under Ubuntu 20.04 LTS ( no memory leak now)
- enhancement: can add non-code file in templates
- enhancement: if there's no selection when copy/cut, select currect line by default
- enhancement: support ligatures in fonts like fira code ( disabled by default, can be turned on in options dialog's editor font page)
Red Panda C++ Version 0.13.1
- enhancement: suppoort localization info in project templates

Binary file not shown.

View File

@ -81,25 +81,17 @@ p, li { white-space: pre-wrap; }
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;: &lt;a href=&quot;Homepage: https://sourceforge.net/projects/dev-cpp-2020/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://sourceforge.net/projects/dev-cpp-2020/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="widgets/aboutdialog.ui" line="88"/>
<source>Red Panda Dev-C++ (&lt;=6.7.5):</source>
<oldsource>Red Panda Dev-C++:</oldsource>
<translation>Dev-C++ (&lt;=6.7.5):</translation>
<translation type="vanished">Dev-C++ (&lt;=6.7.5):</translation>
</message>
<message>
<location filename="widgets/aboutdialog.ui" line="101"/>
<source>Copyright (c) 2004 Bloodshed Software
Copyright (c) 2011-2015 orwell devcpp
Copyright (c) 2020-2021 royqh1979@gmail.com</source>
<translation></translation>
</message>
<message>
<location filename="widgets/aboutdialog.ui" line="116"/>
<location filename="widgets/aboutdialog.ui" line="88"/>
<source>GNU General Public License</source>
<translation>GNU通用公共许可</translation>
</message>
<message>
<location filename="widgets/aboutdialog.ui" line="125"/>
<location filename="widgets/aboutdialog.ui" line="97"/>
<source> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@ -124,12 +116,12 @@ Copyright (c) 2020-2021 royqh1979@gmail.com</source>
GNU通用公共许可协议的副本GNU网站&lt;http://www.gnu.org/licenses/&gt;获取。</translation>
</message>
<message>
<location filename="widgets/aboutdialog.cpp" line="26"/>
<location filename="widgets/aboutdialog.cpp" line="28"/>
<source>Version: </source>
<translation></translation>
</message>
<message>
<location filename="widgets/aboutdialog.cpp" line="37"/>
<location filename="widgets/aboutdialog.cpp" line="39"/>
<source>Non-GCC Compiler</source>
<translation>GCC编译器</translation>
</message>
@ -580,7 +572,7 @@ Copyright (c) 2020-2021 royqh1979@gmail.com</source>
<translation>[]</translation>
</message>
<message>
<location filename="compiler/compiler.cpp" line="595"/>
<location filename="compiler/compiler.cpp" line="601"/>
<source>The compiler process for &apos;%1&apos; failed to start.</source>
<translation>&apos;%1&apos;</translation>
</message>
@ -589,27 +581,27 @@ Copyright (c) 2020-2021 royqh1979@gmail.com</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="compiler/compiler.cpp" line="599"/>
<location filename="compiler/compiler.cpp" line="605"/>
<source>The compiler process crashed after starting successfully.</source>
<translation></translation>
</message>
<message>
<location filename="compiler/compiler.cpp" line="602"/>
<location filename="compiler/compiler.cpp" line="608"/>
<source>The last waitFor...() function timed out.</source>
<translation>waitFor()</translation>
</message>
<message>
<location filename="compiler/compiler.cpp" line="605"/>
<location filename="compiler/compiler.cpp" line="611"/>
<source>An error occurred when attempting to write to the compiler process.</source>
<translation></translation>
</message>
<message>
<location filename="compiler/compiler.cpp" line="608"/>
<location filename="compiler/compiler.cpp" line="614"/>
<source>An error occurred when attempting to read from the compiler process.</source>
<translation></translation>
</message>
<message>
<location filename="compiler/compiler.cpp" line="611"/>
<location filename="compiler/compiler.cpp" line="617"/>
<source>An unknown error occurred.</source>
<translation></translation>
</message>
@ -1288,7 +1280,7 @@ Are you really want to continue?</oldsource>
<translation>:</translation>
</message>
<message>
<location filename="editor.cpp" line="4228"/>
<location filename="editor.cpp" line="4231"/>
<source>Readonly</source>
<translation></translation>
</message>
@ -1667,70 +1659,75 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="29"/>
<location filename="settingsdialog/editorfontwidget.ui" line="310"/>
<location filename="settingsdialog/editorfontwidget.ui" line="132"/>
<location filename="settingsdialog/editorfontwidget.ui" line="317"/>
<source>Size:</source>
<translation>:</translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="74"/>
<location filename="settingsdialog/editorfontwidget.ui" line="303"/>
<location filename="settingsdialog/editorfontwidget.ui" line="29"/>
<location filename="settingsdialog/editorfontwidget.ui" line="310"/>
<source>Font:</source>
<translation>:</translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="109"/>
<location filename="settingsdialog/editorfontwidget.ui" line="398"/>
<location filename="settingsdialog/editorfontwidget.ui" line="102"/>
<location filename="settingsdialog/editorfontwidget.ui" line="405"/>
<source>Show only monospaced fonts</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="135"/>
<location filename="settingsdialog/editorfontwidget.ui" line="125"/>
<source>Enable Ligatures Support</source>
<translation>Fira Code等字体</translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="142"/>
<source>Gutter</source>
<translation>线</translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="141"/>
<location filename="settingsdialog/editorfontwidget.ui" line="148"/>
<source>Gutter is visible</source>
<translation>线</translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="163"/>
<location filename="settingsdialog/editorfontwidget.ui" line="170"/>
<source>Left Offset</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="180"/>
<location filename="settingsdialog/editorfontwidget.ui" line="187"/>
<source>Right Offset</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="213"/>
<location filename="settingsdialog/editorfontwidget.ui" line="220"/>
<source>Show Line Numbers</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="222"/>
<location filename="settingsdialog/editorfontwidget.ui" line="229"/>
<source>Add leading zeros to line numbers</source>
<translation>0</translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="229"/>
<location filename="settingsdialog/editorfontwidget.ui" line="236"/>
<source>Line numbers starts at zero</source>
<translation>0</translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="236"/>
<location filename="settingsdialog/editorfontwidget.ui" line="243"/>
<source>Auto calculate the digit count of line number</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="258"/>
<location filename="settingsdialog/editorfontwidget.ui" line="265"/>
<source>Digit count</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/editorfontwidget.ui" line="294"/>
<location filename="settingsdialog/editorfontwidget.ui" line="301"/>
<source>Use Custom Font</source>
<translation>使</translation>
</message>
@ -5015,32 +5012,32 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="widgets/newprojectdialog.ui" line="88"/>
<location filename="widgets/newprojectdialog.ui" line="91"/>
<source>Make default language</source>
<translation></translation>
</message>
<message>
<location filename="widgets/newprojectdialog.ui" line="95"/>
<location filename="widgets/newprojectdialog.ui" line="98"/>
<source>C Project</source>
<translation>C语言项目</translation>
</message>
<message>
<location filename="widgets/newprojectdialog.ui" line="105"/>
<location filename="widgets/newprojectdialog.ui" line="108"/>
<source>C++ Project</source>
<translation>C++</translation>
</message>
<message>
<location filename="widgets/newprojectdialog.ui" line="142"/>
<location filename="widgets/newprojectdialog.ui" line="145"/>
<source>Name:</source>
<translation></translation>
</message>
<message>
<location filename="widgets/newprojectdialog.ui" line="161"/>
<location filename="widgets/newprojectdialog.ui" line="164"/>
<source>Create in</source>
<translation></translation>
</message>
<message>
<location filename="widgets/newprojectdialog.ui" line="168"/>
<location filename="widgets/newprojectdialog.ui" line="171"/>
<source>Use as the default project location</source>
<translation></translation>
</message>
@ -5049,7 +5046,7 @@ Are you really want to continue?</oldsource>
<translation type="vanished"></translation>
</message>
<message>
<location filename="widgets/newprojectdialog.ui" line="149"/>
<location filename="widgets/newprojectdialog.ui" line="152"/>
<source>...</source>
<translation>...</translation>
</message>
@ -5149,68 +5146,68 @@ Are you really want to continue?</oldsource>
<translation>&apos;%1&apos;.</translation>
</message>
<message>
<location filename="project.cpp" line="673"/>
<location filename="project.cpp" line="683"/>
<source>Error Load File</source>
<translation></translation>
</message>
<message>
<location filename="project.cpp" line="782"/>
<location filename="project.cpp" line="793"/>
<source>File Exists</source>
<translation></translation>
</message>
<message>
<location filename="project.cpp" line="783"/>
<location filename="project.cpp" line="794"/>
<source>File &apos;%1&apos; is already in the project</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="project.cpp" line="1156"/>
<location filename="project.cpp" line="1167"/>
<source>Project Updated</source>
<translation></translation>
</message>
<message>
<location filename="project.cpp" line="1157"/>
<location filename="project.cpp" line="1168"/>
<source>Your project was succesfully updated to a newer file format!</source>
<translation></translation>
</message>
<message>
<location filename="project.cpp" line="1159"/>
<location filename="project.cpp" line="1170"/>
<source>If something has gone wrong, we kept a backup-file: &apos;%1&apos;...</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="project.cpp" line="1335"/>
<location filename="project.cpp" line="1346"/>
<source>Settings need update</source>
<translation></translation>
</message>
<message>
<location filename="project.cpp" line="1336"/>
<location filename="project.cpp" line="1347"/>
<source>The compiler settings format of Red Panda C++ has changed.</source>
<oldsource>The compiler settings format of Dev-C++ has changed.</oldsource>
<translation>C++</translation>
</message>
<message>
<location filename="project.cpp" line="1338"/>
<location filename="project.cpp" line="1349"/>
<source>Please update your settings at Project &gt;&gt; Project Options &gt;&gt; Compiler and save your project.</source>
<translation> &gt;&gt; &gt;&gt; </translation>
</message>
<message>
<location filename="project.cpp" line="1374"/>
<location filename="project.cpp" line="1385"/>
<source>Compiler not found</source>
<translation></translation>
</message>
<message>
<location filename="project.cpp" line="1375"/>
<location filename="project.cpp" line="1386"/>
<source>The compiler set you have selected for this project, no longer exists.</source>
<translation></translation>
</message>
<message>
<location filename="project.cpp" line="1377"/>
<location filename="project.cpp" line="1388"/>
<source>It will be substituted by the global compiler set.</source>
<translation></translation>
</message>
<message>
<location filename="project.cpp" line="1416"/>
<location filename="project.cpp" line="1427"/>
<source>Developed using the Red Panda C++ IDE</source>
<oldsource>Developed using the Red Panda Dev-C++ IDE</oldsource>
<translation>使C++</translation>
@ -5617,24 +5614,24 @@ Are you really want to continue?</oldsource>
<context>
<name>ProjectModel</name>
<message>
<location filename="project.cpp" line="1933"/>
<location filename="project.cpp" line="1944"/>
<source>File exists</source>
<translation></translation>
</message>
<message>
<location filename="project.cpp" line="1934"/>
<location filename="project.cpp" line="1945"/>
<source>File &apos;%1&apos; already exists. Delete it now?</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="project.cpp" line="1952"/>
<location filename="project.cpp" line="1972"/>
<location filename="project.cpp" line="1963"/>
<location filename="project.cpp" line="1983"/>
<source>Remove failed</source>
<translation></translation>
</message>
<message>
<location filename="project.cpp" line="1953"/>
<location filename="project.cpp" line="1973"/>
<location filename="project.cpp" line="1964"/>
<location filename="project.cpp" line="1984"/>
<source>Failed to remove file &apos;%1&apos;</source>
<translation>&apos;%1&apos;</translation>
</message>
@ -5732,32 +5729,32 @@ Are you really want to continue?</oldsource>
<context>
<name>ProjectTemplate</name>
<message>
<location filename="projecttemplate.cpp" line="85"/>
<location filename="projecttemplate.cpp" line="89"/>
<source>Read failed.</source>
<translation>.</translation>
</message>
<message>
<location filename="projecttemplate.cpp" line="86"/>
<location filename="projecttemplate.cpp" line="90"/>
<source>Can&apos;t read template file &apos;%1&apos;.</source>
<translation>&apos;%1&apos;.</translation>
</message>
<message>
<location filename="projecttemplate.cpp" line="92"/>
<location filename="projecttemplate.cpp" line="96"/>
<source>Template not exist</source>
<translation></translation>
</message>
<message>
<location filename="projecttemplate.cpp" line="93"/>
<location filename="projecttemplate.cpp" line="97"/>
<source>Template file &apos;%1&apos; doesn&apos;t exist.</source>
<translation>&apos;%1&apos;.</translation>
</message>
<message>
<location filename="projecttemplate.cpp" line="101"/>
<location filename="projecttemplate.cpp" line="105"/>
<source>Old version template</source>
<translation></translation>
</message>
<message>
<location filename="projecttemplate.cpp" line="102"/>
<location filename="projecttemplate.cpp" line="106"/>
<source>Template file &apos;%1&apos; has version &apos;%2&apos;, which is unsupported.</source>
<translation>&apos;%1&apos;(%2)</translation>
</message>
@ -5933,180 +5930,180 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="1517"/>
<location filename="settings.cpp" line="1536"/>
<location filename="settings.cpp" line="1529"/>
<location filename="settings.cpp" line="1548"/>
<location filename="settings.cpp" line="1560"/>
<location filename="settings.cpp" line="1572"/>
<source>The following %1 directories don&apos;t exist:</source>
<translation>%1</translation>
</message>
<message>
<location filename="settings.cpp" line="1518"/>
<location filename="settings.cpp" line="1528"/>
<location filename="settings.cpp" line="1530"/>
<location filename="settings.cpp" line="1540"/>
<source>binary</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="1527"/>
<location filename="settings.cpp" line="1539"/>
<source>No %1 directories have been specified.</source>
<translation>%1</translation>
</message>
<message>
<location filename="settings.cpp" line="1537"/>
<location filename="settings.cpp" line="1549"/>
<source>C include</source>
<translation>C包含</translation>
</message>
<message>
<location filename="settings.cpp" line="1549"/>
<location filename="settings.cpp" line="1561"/>
<location filename="settings.cpp" line="1573"/>
<source>C++ include</source>
<translation>C++</translation>
</message>
<message>
<location filename="settings.cpp" line="1580"/>
<location filename="settings.cpp" line="1585"/>
<location filename="settings.cpp" line="1590"/>
<location filename="settings.cpp" line="1595"/>
<location filename="settings.cpp" line="1592"/>
<location filename="settings.cpp" line="1597"/>
<location filename="settings.cpp" line="1602"/>
<location filename="settings.cpp" line="1607"/>
<source>Cannot find the %1 &quot;%2&quot;</source>
<translation>%1&quot;%2&quot;</translation>
</message>
<message>
<location filename="settings.cpp" line="2124"/>
<location filename="settings.cpp" line="2136"/>
<source>C options</source>
<translation>C语言选项</translation>
</message>
<message>
<location filename="settings.cpp" line="2125"/>
<location filename="settings.cpp" line="2137"/>
<source>Support all ANSI standard C programs (-ansi)</source>
<translation>ANSI标准C程序(-ansi)</translation>
</message>
<message>
<location filename="settings.cpp" line="2126"/>
<location filename="settings.cpp" line="2138"/>
<source>Do not recognize asm,inline or typeof as a keyword (-fno-asm)</source>
<translation>asminline和typeof作为关键字(-fno-asm)</translation>
</message>
<message>
<location filename="settings.cpp" line="2127"/>
<location filename="settings.cpp" line="2139"/>
<source>Imitate traditional C preprocessors (-traditional-cpp)</source>
<translation>仿C预处理器行为(-traditional-cpp)</translation>
</message>
<message>
<location filename="settings.cpp" line="2130"/>
<location filename="settings.cpp" line="2142"/>
<source>Code Generation</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2159"/>
<location filename="settings.cpp" line="2171"/>
<source>Optimize for the following machine (-march)</source>
<translation>(-march)</translation>
</message>
<message>
<location filename="settings.cpp" line="2160"/>
<location filename="settings.cpp" line="2172"/>
<source>Optimize less, while maintaining full compatibility (-tune)</source>
<translation>(-tune)</translation>
</message>
<message>
<location filename="settings.cpp" line="2180"/>
<location filename="settings.cpp" line="2192"/>
<source>Enable use of specific instructions (-mx)</source>
<translation>(-mx)</translation>
</message>
<message>
<location filename="settings.cpp" line="2191"/>
<location filename="settings.cpp" line="2203"/>
<source>Optimization level (-Ox)</source>
<translation>(-Ox)</translation>
</message>
<message>
<location filename="settings.cpp" line="2198"/>
<location filename="settings.cpp" line="2210"/>
<source>Compile with the following pointer size (-mx)</source>
<translation>使(-mx)</translation>
</message>
<message>
<location filename="settings.cpp" line="2221"/>
<location filename="settings.cpp" line="2233"/>
<source>Language standard (-std)</source>
<translation>(-std)</translation>
</message>
<message>
<location filename="settings.cpp" line="2234"/>
<location filename="settings.cpp" line="2246"/>
<source>Profile</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2243"/>
<location filename="settings.cpp" line="2255"/>
<source>Generate debugging information (-g3)</source>
<translation>(-g3)</translation>
</message>
<message>
<location filename="settings.cpp" line="2606"/>
<location filename="settings.cpp" line="2618"/>
<source>Would you like Red Panda C++ to search for compilers in PATH?</source>
<translation>C++PATH路径中寻找gcc编译器吗</translation>
</message>
<message>
<location filename="settings.cpp" line="2235"/>
<location filename="settings.cpp" line="2247"/>
<source>Generate profiling info for analysis (-pg)</source>
<translation>(-pg)</translation>
</message>
<message>
<location filename="settings.cpp" line="2224"/>
<location filename="settings.cpp" line="2236"/>
<source>Warnings</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2225"/>
<location filename="settings.cpp" line="2237"/>
<source>Inhibit all warning messages (-w)</source>
<translation>(-w)</translation>
</message>
<message>
<location filename="settings.cpp" line="2226"/>
<location filename="settings.cpp" line="2238"/>
<source>Show most warnings (-Wall)</source>
<translation>(-Wall)</translation>
</message>
<message>
<location filename="settings.cpp" line="2227"/>
<location filename="settings.cpp" line="2239"/>
<source>Show some more warnings (-Wextra)</source>
<translation>(-Wextra)</translation>
</message>
<message>
<location filename="settings.cpp" line="2228"/>
<location filename="settings.cpp" line="2240"/>
<source>Check ISO C/C++/C++0x conformance (-pedantic)</source>
<translation>ISO C/C++/C++0x(-pedantic)</translation>
</message>
<message>
<location filename="settings.cpp" line="2229"/>
<location filename="settings.cpp" line="2241"/>
<source>Only check the code for syntax errors (-fsyntax-only)</source>
<translation>(-fsyntax-only)</translation>
</message>
<message>
<location filename="settings.cpp" line="2230"/>
<location filename="settings.cpp" line="2242"/>
<source>Make all warnings into errors (-Werror)</source>
<translation>(-Werror)</translation>
</message>
<message>
<location filename="settings.cpp" line="2231"/>
<location filename="settings.cpp" line="2243"/>
<source>Abort compilation on first error (-Wfatal-errors)</source>
<translation>(-Wfatal-errors)</translation>
</message>
<message>
<location filename="settings.cpp" line="2238"/>
<location filename="settings.cpp" line="2250"/>
<source>Linker</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2239"/>
<location filename="settings.cpp" line="2251"/>
<source>Link an Objective C program (-lobjc)</source>
<translation>Objective-C程序 (-lobjc)</translation>
</message>
<message>
<location filename="settings.cpp" line="2240"/>
<location filename="settings.cpp" line="2252"/>
<source>Do not use standard system libraries (-nostdlib)</source>
<translation>使(-nostdlib)</translation>
</message>
<message>
<location filename="settings.cpp" line="2241"/>
<location filename="settings.cpp" line="2253"/>
<source>Do not create a console window (-mwindows)</source>
<translation>(-mwindows)</translation>
</message>
<message>
<location filename="settings.cpp" line="2242"/>
<location filename="settings.cpp" line="2254"/>
<source>Strip executable (-s)</source>
<translation>(-s)</translation>
</message>
@ -6115,54 +6112,54 @@ Are you really want to continue?</oldsource>
<translation type="vanished">Ojbective C程序(-lobjc)</translation>
</message>
<message>
<location filename="settings.cpp" line="2246"/>
<location filename="settings.cpp" line="2258"/>
<source>Output</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2247"/>
<location filename="settings.cpp" line="2259"/>
<source>Put comments in generated assembly code (-fverbose-asm)</source>
<translation>(-fverbose-asm)</translation>
</message>
<message>
<location filename="settings.cpp" line="2249"/>
<location filename="settings.cpp" line="2261"/>
<source>Use pipes instead of temporary files during compilation (-pipe)</source>
<translation>使(-pipe)</translation>
</message>
<message>
<location filename="settings.cpp" line="2248"/>
<location filename="settings.cpp" line="2260"/>
<source>Do not assemble, compile and generate the assemble code (-S)</source>
<translation>(-S)</translation>
</message>
<message>
<location filename="settings.cpp" line="2567"/>
<location filename="settings.cpp" line="2608"/>
<location filename="settings.cpp" line="2579"/>
<location filename="settings.cpp" line="2620"/>
<source>Confirm</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2568"/>
<location filename="settings.cpp" line="2580"/>
<source>The following problems were found during validation of compiler set &quot;%1&quot;:</source>
<translation>&quot;%1&quot;</translation>
</message>
<message>
<location filename="settings.cpp" line="2572"/>
<location filename="settings.cpp" line="2584"/>
<source>Would you like Red Panda C++ to remove them for you and add the default paths to the valid paths?</source>
<translation>C++</translation>
</message>
<message>
<location filename="settings.cpp" line="2574"/>
<location filename="settings.cpp" line="2586"/>
<source>Leaving those directories will lead to problems during compilation.&lt;br /&gt;&lt;br /&gt;Unless you know exactly what you&apos;re doing, it is recommended that you click Yes.</source>
<translation>&lt;br /&gt;&lt;br /&gt;</translation>
</message>
<message>
<location filename="settings.cpp" line="2598"/>
<location filename="settings.cpp" line="2604"/>
<location filename="settings.cpp" line="2610"/>
<location filename="settings.cpp" line="2616"/>
<source>Compiler set not configuared.</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2600"/>
<location filename="settings.cpp" line="2612"/>
<source>Would you like Red Panda C++ to search for compilers in the following locations: &lt;BR /&gt;&apos;%1&apos;&lt;BR /&gt;&apos;%2&apos;? </source>
<translation>C++&lt;br /&gt;%1&lt;br /&gt;%2</translation>
</message>
@ -6882,7 +6879,7 @@ Are you really want to continue?</oldsource>
<name>SettingsDialog</name>
<message>
<location filename="settingsdialog/settingsdialog.ui" line="14"/>
<location filename="settingsdialog/settingsdialog.cpp" line="139"/>
<location filename="settingsdialog/settingsdialog.cpp" line="133"/>
<source>Options</source>
<translation></translation>
</message>
@ -6908,243 +6905,239 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="141"/>
<location filename="settingsdialog/settingsdialog.cpp" line="136"/>
<source>Appearence</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="141"/>
<location filename="settingsdialog/settingsdialog.cpp" line="146"/>
<location filename="settingsdialog/settingsdialog.cpp" line="151"/>
<location filename="settingsdialog/settingsdialog.cpp" line="136"/>
<location filename="settingsdialog/settingsdialog.cpp" line="140"/>
<location filename="settingsdialog/settingsdialog.cpp" line="144"/>
<location filename="settingsdialog/settingsdialog.cpp" line="147"/>
<location filename="settingsdialog/settingsdialog.cpp" line="155"/>
<location filename="settingsdialog/settingsdialog.cpp" line="160"/>
<location filename="settingsdialog/settingsdialog.cpp" line="165"/>
<location filename="settingsdialog/settingsdialog.cpp" line="159"/>
<source>Environment</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="146"/>
<location filename="settingsdialog/settingsdialog.cpp" line="140"/>
<source>File Association</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="151"/>
<location filename="settingsdialog/settingsdialog.cpp" line="144"/>
<source>Shortcuts</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="155"/>
<location filename="settingsdialog/settingsdialog.cpp" line="147"/>
<source>Folders</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="160"/>
<location filename="settingsdialog/settingsdialog.cpp" line="155"/>
<source>Terminal</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="165"/>
<location filename="settingsdialog/settingsdialog.cpp" line="159"/>
<source>Performance</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="175"/>
<location filename="settingsdialog/settingsdialog.cpp" line="272"/>
<location filename="settingsdialog/settingsdialog.cpp" line="162"/>
<location filename="settingsdialog/settingsdialog.cpp" line="238"/>
<source>Compiler Set</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="175"/>
<location filename="settingsdialog/settingsdialog.cpp" line="179"/>
<location filename="settingsdialog/settingsdialog.cpp" line="162"/>
<location filename="settingsdialog/settingsdialog.cpp" line="165"/>
<source>Compiler</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="179"/>
<location filename="settingsdialog/settingsdialog.cpp" line="165"/>
<source>Auto Link</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5808"/>
<location filename="settingsdialog/settingsdialog.cpp" line="183"/>
<location filename="settingsdialog/settingsdialog.cpp" line="227"/>
<location filename="settingsdialog/settingsdialog.cpp" line="235"/>
<location filename="settingsdialog/settingsdialog.cpp" line="239"/>
<location filename="settingsdialog/settingsdialog.cpp" line="249"/>
<location filename="settingsdialog/settingsdialog.cpp" line="264"/>
<location filename="settingsdialog/settingsdialog.cpp" line="168"/>
<location filename="settingsdialog/settingsdialog.cpp" line="201"/>
<location filename="settingsdialog/settingsdialog.cpp" line="207"/>
<location filename="settingsdialog/settingsdialog.cpp" line="210"/>
<location filename="settingsdialog/settingsdialog.cpp" line="218"/>
<location filename="settingsdialog/settingsdialog.cpp" line="232"/>
<source>General</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="93"/>
<location filename="settingsdialog/settingsdialog.cpp" line="95"/>
<location filename="settingsdialog/settingsdialog.cpp" line="168"/>
<location filename="settingsdialog/settingsdialog.cpp" line="171"/>
<location filename="settingsdialog/settingsdialog.cpp" line="174"/>
<location filename="settingsdialog/settingsdialog.cpp" line="177"/>
<location filename="settingsdialog/settingsdialog.cpp" line="180"/>
<location filename="settingsdialog/settingsdialog.cpp" line="183"/>
<location filename="settingsdialog/settingsdialog.cpp" line="187"/>
<location filename="settingsdialog/settingsdialog.cpp" line="191"/>
<location filename="settingsdialog/settingsdialog.cpp" line="186"/>
<location filename="settingsdialog/settingsdialog.cpp" line="189"/>
<location filename="settingsdialog/settingsdialog.cpp" line="192"/>
<location filename="settingsdialog/settingsdialog.cpp" line="195"/>
<location filename="settingsdialog/settingsdialog.cpp" line="199"/>
<location filename="settingsdialog/settingsdialog.cpp" line="203"/>
<location filename="settingsdialog/settingsdialog.cpp" line="207"/>
<location filename="settingsdialog/settingsdialog.cpp" line="211"/>
<location filename="settingsdialog/settingsdialog.cpp" line="215"/>
<location filename="settingsdialog/settingsdialog.cpp" line="219"/>
<location filename="settingsdialog/settingsdialog.cpp" line="223"/>
<location filename="settingsdialog/settingsdialog.cpp" line="198"/>
<source>Editor</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="187"/>
<location filename="settingsdialog/settingsdialog.cpp" line="171"/>
<source>Font</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="191"/>
<location filename="settingsdialog/settingsdialog.cpp" line="174"/>
<source>Copy &amp; Export</source>
<translation>/</translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="93"/>
<location filename="settingsdialog/settingsdialog.cpp" line="195"/>
<location filename="settingsdialog/settingsdialog.cpp" line="177"/>
<source>Color</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="199"/>
<location filename="settingsdialog/settingsdialog.cpp" line="180"/>
<source>Code Completion</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="203"/>
<location filename="settingsdialog/settingsdialog.cpp" line="183"/>
<source>Symbol Completion</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="95"/>
<location filename="settingsdialog/settingsdialog.cpp" line="207"/>
<location filename="settingsdialog/settingsdialog.cpp" line="186"/>
<source>Snippet</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="211"/>
<location filename="settingsdialog/settingsdialog.cpp" line="189"/>
<source>Auto Syntax Checking</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="215"/>
<location filename="settingsdialog/settingsdialog.cpp" line="192"/>
<source>Tooltips</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="219"/>
<location filename="settingsdialog/settingsdialog.cpp" line="195"/>
<source>Auto save</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="223"/>
<location filename="settingsdialog/settingsdialog.cpp" line="198"/>
<source>Misc</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5809"/>
<location filename="mainwindow.cpp" line="6118"/>
<location filename="settingsdialog/settingsdialog.cpp" line="227"/>
<location filename="settingsdialog/settingsdialog.cpp" line="231"/>
<location filename="settingsdialog/settingsdialog.cpp" line="201"/>
<location filename="settingsdialog/settingsdialog.cpp" line="204"/>
<source>Program Runner</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6117"/>
<location filename="settingsdialog/settingsdialog.cpp" line="231"/>
<location filename="settingsdialog/settingsdialog.cpp" line="204"/>
<source>Problem Set</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="235"/>
<location filename="settingsdialog/settingsdialog.cpp" line="207"/>
<source>Debugger</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="239"/>
<location filename="settingsdialog/settingsdialog.cpp" line="244"/>
<location filename="settingsdialog/settingsdialog.cpp" line="210"/>
<location filename="settingsdialog/settingsdialog.cpp" line="214"/>
<source>Code Formatter</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="244"/>
<location filename="settingsdialog/settingsdialog.cpp" line="214"/>
<source>Program</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="249"/>
<location filename="settingsdialog/settingsdialog.cpp" line="218"/>
<source>Tools</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="262"/>
<location filename="settingsdialog/settingsdialog.cpp" line="230"/>
<source>Project Options</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="264"/>
<location filename="settingsdialog/settingsdialog.cpp" line="268"/>
<location filename="settingsdialog/settingsdialog.cpp" line="272"/>
<location filename="settingsdialog/settingsdialog.cpp" line="276"/>
<location filename="settingsdialog/settingsdialog.cpp" line="280"/>
<location filename="settingsdialog/settingsdialog.cpp" line="284"/>
<location filename="settingsdialog/settingsdialog.cpp" line="288"/>
<location filename="settingsdialog/settingsdialog.cpp" line="292"/>
<location filename="settingsdialog/settingsdialog.cpp" line="296"/>
<location filename="settingsdialog/settingsdialog.cpp" line="301"/>
<location filename="settingsdialog/settingsdialog.cpp" line="232"/>
<location filename="settingsdialog/settingsdialog.cpp" line="235"/>
<location filename="settingsdialog/settingsdialog.cpp" line="238"/>
<location filename="settingsdialog/settingsdialog.cpp" line="241"/>
<location filename="settingsdialog/settingsdialog.cpp" line="244"/>
<location filename="settingsdialog/settingsdialog.cpp" line="247"/>
<location filename="settingsdialog/settingsdialog.cpp" line="250"/>
<location filename="settingsdialog/settingsdialog.cpp" line="253"/>
<location filename="settingsdialog/settingsdialog.cpp" line="256"/>
<location filename="settingsdialog/settingsdialog.cpp" line="260"/>
<source>Project</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="268"/>
<location filename="settingsdialog/settingsdialog.cpp" line="235"/>
<source>Files</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="276"/>
<location filename="settingsdialog/settingsdialog.cpp" line="241"/>
<source>Custom Compile options</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="280"/>
<location filename="settingsdialog/settingsdialog.cpp" line="244"/>
<source>Directories</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="284"/>
<location filename="settingsdialog/settingsdialog.cpp" line="247"/>
<source>Precompiled Header</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="288"/>
<location filename="settingsdialog/settingsdialog.cpp" line="250"/>
<source>Makefile</source>
<translation>Makefile</translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="292"/>
<location filename="settingsdialog/settingsdialog.cpp" line="253"/>
<source>Output</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="296"/>
<location filename="settingsdialog/settingsdialog.cpp" line="256"/>
<source>DLL host</source>
<translation>DLL宿主</translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="301"/>
<location filename="settingsdialog/settingsdialog.cpp" line="260"/>
<source>Version info</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="381"/>
<location filename="settingsdialog/settingsdialog.cpp" line="339"/>
<source>Save Changes</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="382"/>
<location filename="settingsdialog/settingsdialog.cpp" line="340"/>
<source>There are changes in the settings, do you want to save them before swtich to other page?</source>
<translation></translation>
</message>
@ -7296,8 +7289,8 @@ Are you really want to continue?</oldsource>
<context>
<name>SynEdit</name>
<message>
<location filename="qsynedit/TextPainter.cpp" line="961"/>
<location filename="qsynedit/TextPainter.cpp" line="962"/>
<location filename="qsynedit/TextPainter.cpp" line="993"/>
<location filename="qsynedit/TextPainter.cpp" line="994"/>
<source>The highlighter seems to be in an infinite loop</source>
<translation></translation>
</message>

View File

@ -4055,6 +4055,8 @@ void Editor::applySettings()
options.setFlag(eoAutoIndent,pSettings->editor().autoIndent());
options.setFlag(eoTabsToSpaces,pSettings->editor().tabToSpaces());
options.setFlag(eoLigatureSupport, pSettings->editor().enableLigaturesSupport());
options.setFlag(eoKeepCaretX,pSettings->editor().keepCaretX());
options.setFlag(eoEnhanceHomeKey,pSettings->editor().enhanceHomeKey());
options.setFlag(eoEnhanceEndKey,pSettings->editor().enhanceEndKey());
@ -4116,6 +4118,7 @@ void Editor::applySettings()
}
setMouseWheelScrollSpeed(pSettings->editor().mouseWheelScrollSpeed());
invalidate();
}
static PSynHighlighterAttribute createRainbowAttribute(const QString& attrName, const QString& schemeName, const QString& schemeItemName) {

View File

@ -83,7 +83,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(SynStateFlags)
enum SynEditorOption {
eoAltSetsColumnMode = 0x00000001, //Holding down the Alt Key will put the selection mode into columnar format
eoAutoIndent = 0x00000002, //Will auto calculate the indent when input
// eoAddIndent = 0x00000004, //Will add one tab width of indent when typing { and :, and remove the same amount when typing }
eoLigatureSupport = 0x00000004, //Support ligaures in fonts like fira code
eoDragDropEditing = 0x00000008, //Allows you to select a block of text and drag it within the document to another location
eoDropFiles = 0x00000010, //Allows the editor accept OLE file drops
eoEnhanceHomeKey = 0x00000020, //enhances home key positioning, similar to visual studio

View File

@ -415,7 +415,39 @@ void SynEditTextPainter::PaintToken(const QString &Token, int TokenCols, int Col
break;
//painter->drawText(nX,rcToken.bottom()-painter->fontMetrics().descent()*edit->dpiFactor() , Token[i]);
if (startPaint) {
bool drawed = false;
if (edit->mOptions.testFlag(eoLigatureSupport) && i+1<Token.length()) {
if ((Token[i]=='+' && Token[i+1]=='+')
|| (Token[i]=='-' && Token[i+1]=='-')
|| (Token[i]=='/' && Token[i+1]=='=')
|| (Token[i]=='&' && Token[i+1]=='&')
|| (Token[i]=='|' && Token[i+1]=='|')
|| (Token[i]=='-' && Token[i+1]=='>')
|| (Token[i]=='=' && Token[i+1]=='>')
|| (Token[i]==':' && Token[i+1]==':')
|| (Token[i]=='_' && Token[i+1]=='_')
|| (Token[i]=='=' && Token[i+1]=='=')
|| (Token[i]=='!' && Token[i+1]=='=')
|| (Token[i]=='<' && Token[i+1]=='=')
|| (Token[i]=='>' && Token[i+1]=='=')
|| (Token[i]=='>' && Token[i+1]=='>')
|| (Token[i]=='<' && Token[i+1]=='<')
|| (Token[i]=='-' && Token[i+1]=='>')
|| (Token[i]=='<' && Token[i+1]=='-')
|| (Token[i]=='/' && Token[i+1]=='*')
|| (Token[i]=='*' && Token[i+1]=='/')
|| (Token[i]=='/' && Token[i+1]=='/')
){
painter->drawText(nX,rcToken.bottom()-painter->fontMetrics().descent() , Token.mid(i,2));
charCols += edit->charColumns(Token[i+1]);
i+=1;
drawed = true;
}
}
if (!drawed) {
painter->drawText(nX,rcToken.bottom()-painter->fontMetrics().descent() , Token[i]);
drawed = true;
}
nX += charCols * edit->mCharWidth;
}

View File

@ -578,6 +578,16 @@ void Settings::Editor::setHighlightMathingBraces(bool newHighlightMathingBraces)
mHighlightMathingBraces = newHighlightMathingBraces;
}
bool Settings::Editor::enableLigaturesSupport() const
{
return mEnableLigaturesSupport;
}
void Settings::Editor::setEnableLigaturesSupport(bool newEnableLigaturesSupport)
{
mEnableLigaturesSupport = newEnableLigaturesSupport;
}
bool Settings::Editor::highlightCurrentWord() const
{
return mHighlightCurrentWord;
@ -1090,6 +1100,7 @@ void Settings::Editor::doSave()
saveValue("font_name",mFontName);
saveValue("font_size", mFontSize);
saveValue("font_only_monospaced",mFontOnlyMonospaced);
saveValue("enable_ligatures_support", mEnableLigaturesSupport);
//gutter
saveValue("gutter_visible", mGutterVisible);
@ -1209,6 +1220,7 @@ void Settings::Editor::doLoad()
#endif
mFontSize = intValue("font_size",14);
mFontOnlyMonospaced = boolValue("font_only_monospaced",true);
mEnableLigaturesSupport = boolValue("enable_ligatures_support", false);
//gutter
mGutterVisible = boolValue("gutter_visible",true);

View File

@ -363,6 +363,9 @@ public:
bool highlightMathingBraces() const;
void setHighlightMathingBraces(bool newHighlightMathingBraces);
bool enableLigaturesSupport() const;
void setEnableLigaturesSupport(bool newEnableLigaturesSupport);
private:
//General
// indents
@ -397,6 +400,7 @@ public:
bool mShowRightEdgeLine;
int mRightEdgeWidth;
QColor mRightEdgeLineColor;
bool mEnableLigaturesSupport;
//Font
//font

View File

@ -57,6 +57,7 @@ void EditorFontWidget::doLoad()
ui->chkOnlyMonospacedFonts->setChecked(pSettings->editor().fontOnlyMonospaced());
ui->cbFont->setCurrentFont(QFont(pSettings->editor().fontName()));
ui->spinFontSize->setValue(pSettings->editor().fontSize());
ui->chkLigature->setChecked(pSettings->editor().enableLigaturesSupport());
//gutter
ui->chkGutterVisible->setChecked(pSettings->editor().gutterVisible());
@ -79,6 +80,7 @@ void EditorFontWidget::doSave()
pSettings->editor().setFontOnlyMonospaced(ui->chkOnlyMonospacedFonts->isChecked());
pSettings->editor().setFontName(ui->cbFont->currentFont().family());
pSettings->editor().setFontSize(ui->spinFontSize->value());
pSettings->editor().setEnableLigaturesSupport(ui->chkLigature->isChecked());
//gutter
pSettings->editor().setGutterVisible(ui->chkGutterVisible->isChecked());

View File

@ -23,14 +23,14 @@
<property name="rightMargin">
<number>11</number>
</property>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Size:</string>
<string>Font:</string>
</property>
</widget>
</item>
<item row="2" column="3">
<item row="2" column="1">
<widget class="QWidget" name="widget_3" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
@ -68,14 +68,7 @@
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Font:</string>
</property>
</widget>
</item>
<item row="0" column="3">
<item row="0" column="1">
<widget class="QWidget" name="widget_2" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
@ -126,6 +119,20 @@
</layout>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="chkLigature">
<property name="text">
<string>Enable Ligatures Support</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Size:</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>