- enhancement: reduce startup time by about 1 second.

- enhancement: add option "mouse selection/drag scroll speed" in the options dialog's "Editor" / "general" tab.
  - fix: scroll speed of mouse selection/drag is too fast.
This commit is contained in:
Roy Qu 2022-03-04 19:04:45 +08:00
parent 96de964484
commit 82ecab9c90
11 changed files with 283 additions and 197 deletions

View File

@ -13,6 +13,9 @@ Red Panda C++ Version 0.14.5
- enhancement: better processing of symbol completion
- enhancement: better support of ligatures
- enhancement: use the expression evaluation logic to handle "goto declaration"/"goto definition"
- enhancement: reduce startup time by about 1 second.
- enhancement: add option "mouse selection/drag scroll speed" in the options dialog's "Editor" / "general" tab.
- fix: scroll speed of mouse selection/drag is too fast
Red Panda C++ Version 0.14.4
- enhancement: git - log

View File

@ -1309,45 +1309,43 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="editor.cpp" line="2550"/>
<location filename="editor.cpp" line="2582"/>
<source>Print Document</source>
<translation></translation>
</message>
<message>
<location filename="editor.cpp" line="3147"/>
<location filename="editor.cpp" line="3186"/>
<location filename="editor.cpp" line="3240"/>
<location filename="editor.cpp" line="3179"/>
<location filename="editor.cpp" line="3218"/>
<location filename="editor.cpp" line="3272"/>
<source>Ctrl+click for more info</source>
<translation>Ctrl+</translation>
</message>
<message>
<location filename="editor.cpp" line="3638"/>
<location filename="editor.cpp" line="3668"/>
<source>Symbol &apos;%1&apos; not found!</source>
<translation>&apos;%1&apos;!</translation>
<translation type="vanished">&apos;%1&apos;!</translation>
</message>
<message>
<location filename="editor.cpp" line="3961"/>
<location filename="editor.cpp" line="4000"/>
<source>astyle not found</source>
<translation>astyle程序</translation>
</message>
<message>
<location filename="editor.cpp" line="3962"/>
<location filename="editor.cpp" line="4001"/>
<source>Can&apos;t find astyle in &quot;%1&quot;.</source>
<translation>astyle程序&quot;%1&quot;.</translation>
</message>
<message>
<location filename="editor.cpp" line="4111"/>
<location filename="editor.cpp" line="4151"/>
<source>Break point condition</source>
<translation></translation>
</message>
<message>
<location filename="editor.cpp" line="4112"/>
<location filename="editor.cpp" line="4152"/>
<source>Enter the condition of the breakpoint:</source>
<translation>:</translation>
</message>
<message>
<location filename="editor.cpp" line="4326"/>
<location filename="editor.cpp" line="4367"/>
<source>Readonly</source>
<translation></translation>
</message>
@ -3774,11 +3772,11 @@ Are you really want to continue?</oldsource>
<message>
<location filename="mainwindow.ui" line="560"/>
<location filename="mainwindow.ui" line="2637"/>
<location filename="mainwindow.cpp" line="4302"/>
<location filename="mainwindow.cpp" line="4305"/>
<location filename="mainwindow.cpp" line="4309"/>
<location filename="mainwindow.cpp" line="4312"/>
<location filename="mainwindow.cpp" line="5954"/>
<location filename="mainwindow.cpp" line="4303"/>
<location filename="mainwindow.cpp" line="4306"/>
<location filename="mainwindow.cpp" line="4310"/>
<location filename="mainwindow.cpp" line="4313"/>
<location filename="mainwindow.cpp" line="5955"/>
<source>Issues</source>
<translation></translation>
</message>
@ -4201,7 +4199,7 @@ Are you really want to continue?</oldsource>
<message>
<location filename="mainwindow.ui" line="359"/>
<location filename="mainwindow.ui" line="362"/>
<location filename="mainwindow.cpp" line="6268"/>
<location filename="mainwindow.cpp" line="6269"/>
<source>New Problem Set</source>
<translation></translation>
</message>
@ -4220,14 +4218,14 @@ Are you really want to continue?</oldsource>
<message>
<location filename="mainwindow.ui" line="401"/>
<location filename="mainwindow.ui" line="404"/>
<location filename="mainwindow.cpp" line="6311"/>
<location filename="mainwindow.cpp" line="6312"/>
<source>Save Problem Set</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="415"/>
<location filename="mainwindow.ui" line="418"/>
<location filename="mainwindow.cpp" line="6335"/>
<location filename="mainwindow.cpp" line="6336"/>
<source>Load Problem Set</source>
<translation></translation>
</message>
@ -4566,7 +4564,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.ui" line="2312"/>
<location filename="mainwindow.cpp" line="5171"/>
<location filename="mainwindow.cpp" line="5172"/>
<source>Clear all breakpoints</source>
<translation></translation>
</message>
@ -4667,7 +4665,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.ui" line="2466"/>
<location filename="mainwindow.cpp" line="5895"/>
<location filename="mainwindow.cpp" line="5896"/>
<source>Rename Symbol</source>
<translation></translation>
</message>
@ -4688,13 +4686,13 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.ui" line="2486"/>
<location filename="mainwindow.cpp" line="6083"/>
<location filename="mainwindow.cpp" line="6084"/>
<source>Export As RTF</source>
<translation>RTF</translation>
</message>
<message>
<location filename="mainwindow.ui" line="2491"/>
<location filename="mainwindow.cpp" line="6105"/>
<location filename="mainwindow.cpp" line="6106"/>
<source>Export As HTML</source>
<translation>HTML</translation>
</message>
@ -5174,7 +5172,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.cpp" line="277"/>
<location filename="mainwindow.cpp" line="6277"/>
<location filename="mainwindow.cpp" line="6278"/>
<source>Problem Set %1</source>
<translation>%1</translation>
</message>
@ -5248,15 +5246,15 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.cpp" line="2339"/>
<location filename="mainwindow.cpp" line="6164"/>
<location filename="mainwindow.cpp" line="6204"/>
<location filename="mainwindow.cpp" line="6165"/>
<location filename="mainwindow.cpp" line="6205"/>
<source>Bookmark Description</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2340"/>
<location filename="mainwindow.cpp" line="6165"/>
<location filename="mainwindow.cpp" line="6205"/>
<location filename="mainwindow.cpp" line="6166"/>
<location filename="mainwindow.cpp" line="6206"/>
<source>Description:</source>
<translation></translation>
</message>
@ -5377,7 +5375,7 @@ Are you really want to continue?</oldsource>
<location filename="mainwindow.cpp" line="2737"/>
<location filename="mainwindow.cpp" line="3589"/>
<location filename="mainwindow.cpp" line="3595"/>
<location filename="mainwindow.cpp" line="5756"/>
<location filename="mainwindow.cpp" line="5757"/>
<source>Delete</source>
<translation></translation>
</message>
@ -5454,7 +5452,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="mainwindow.cpp" line="3802"/>
<location filename="mainwindow.cpp" line="6271"/>
<location filename="mainwindow.cpp" line="6272"/>
<source>Do you want to save it?</source>
<translation></translation>
</message>
@ -5478,141 +5476,141 @@ Are you really want to continue?</oldsource>
<location filename="mainwindow.cpp" line="4049"/>
<location filename="mainwindow.cpp" line="4059"/>
<location filename="mainwindow.cpp" line="4071"/>
<location filename="mainwindow.cpp" line="6324"/>
<location filename="mainwindow.cpp" line="6325"/>
<source>Save Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4230"/>
<location filename="mainwindow.cpp" line="4231"/>
<source>Change Project Compiler Set</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4231"/>
<location filename="mainwindow.cpp" line="4232"/>
<source>Change the project&apos;s compiler set will lose all custom compiler set options.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4233"/>
<location filename="mainwindow.cpp" line="4234"/>
<source>Do you really want to do that?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5172"/>
<location filename="mainwindow.cpp" line="5173"/>
<source>Do you really want to clear all breakpoints in this file?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5370"/>
<location filename="mainwindow.cpp" line="5371"/>
<source>New project</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5371"/>
<location filename="mainwindow.cpp" line="5372"/>
<source>Close %1 and start new project?</source>
<translation>&apos;%1&apos;?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5384"/>
<location filename="mainwindow.cpp" line="5385"/>
<source>Folder not exist</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5385"/>
<location filename="mainwindow.cpp" line="5386"/>
<source>Folder &apos;%1&apos; doesn&apos;t exist. Create it now?</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5392"/>
<location filename="mainwindow.cpp" line="5393"/>
<source>Can&apos;t create folder</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5393"/>
<location filename="mainwindow.cpp" line="5394"/>
<source>Failed to create folder &apos;%1&apos;.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5408"/>
<location filename="mainwindow.cpp" line="5409"/>
<source>Save new project as</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5757"/>
<location filename="mainwindow.cpp" line="5758"/>
<source>Folder %1 is not empty.</source>
<translation>%1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5758"/>
<location filename="mainwindow.cpp" line="5759"/>
<source>Do you really want to delete it?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6849"/>
<location filename="mainwindow.cpp" line="6850"/>
<source>Can&apos;t Commit</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6850"/>
<location filename="mainwindow.cpp" line="6851"/>
<source>Git needs user info to commit.</source>
<translation>Git需要用信息进行提交</translation>
</message>
<message>
<location filename="mainwindow.ui" line="2556"/>
<location filename="mainwindow.ui" line="2559"/>
<location filename="mainwindow.cpp" line="6247"/>
<location filename="mainwindow.cpp" line="6248"/>
<source>Choose Working Folder</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6617"/>
<location filename="mainwindow.cpp" line="6669"/>
<location filename="mainwindow.cpp" line="6618"/>
<location filename="mainwindow.cpp" line="6670"/>
<source>Header Exists</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6618"/>
<location filename="mainwindow.cpp" line="6670"/>
<location filename="mainwindow.cpp" line="6619"/>
<location filename="mainwindow.cpp" line="6671"/>
<source>Header file &quot;%1&quot; already exists!</source>
<translation>&quot;%1&quot;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6675"/>
<location filename="mainwindow.cpp" line="6676"/>
<source>Source Exists</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6676"/>
<location filename="mainwindow.cpp" line="6677"/>
<source>Source file &quot;%1&quot; already exists!</source>
<translation>&quot;%1&quot;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6828"/>
<location filename="mainwindow.cpp" line="6829"/>
<source>Can&apos;t commit!</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6829"/>
<location filename="mainwindow.cpp" line="6830"/>
<source>The following files are in conflicting:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6834"/>
<location filename="mainwindow.cpp" line="6835"/>
<source>Commit Message</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6834"/>
<location filename="mainwindow.cpp" line="6835"/>
<source>Commit Message:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6837"/>
<location filename="mainwindow.cpp" line="6838"/>
<source>Commit Failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6838"/>
<location filename="mainwindow.cpp" line="6839"/>
<source>Commit message shouldn&apos;t be empty!</source>
<translation></translation>
</message>
@ -5621,125 +5619,125 @@ Are you really want to continue?</oldsource>
<translation type="vanished">Dev-C++ (*.dev)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5421"/>
<location filename="mainwindow.cpp" line="5422"/>
<source>New project fail</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5422"/>
<location filename="mainwindow.cpp" line="5423"/>
<source>Can&apos;t assign project template</source>
<translation>使</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5517"/>
<location filename="mainwindow.cpp" line="5518"/>
<source>Remove file</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5518"/>
<location filename="mainwindow.cpp" line="5519"/>
<source>Remove the file from disk?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5707"/>
<location filename="mainwindow.cpp" line="5708"/>
<source>untitled</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5717"/>
<location filename="mainwindow.cpp" line="5718"/>
<source>New Project File Name</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5718"/>
<location filename="mainwindow.cpp" line="5719"/>
<source>File Name:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5724"/>
<location filename="mainwindow.cpp" line="5725"/>
<source>File Already Exists!</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5725"/>
<location filename="mainwindow.cpp" line="5726"/>
<source>File &apos;%1&apos; already exists!</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5466"/>
<location filename="mainwindow.cpp" line="5467"/>
<source>Add to project</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5410"/>
<location filename="mainwindow.cpp" line="5411"/>
<source>Red Panda C++ project file (*.dev)</source>
<translation>C++(*.dev)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5881"/>
<location filename="mainwindow.cpp" line="5882"/>
<source>Rename Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5882"/>
<location filename="mainwindow.cpp" line="5883"/>
<source>Symbol &apos;%1&apos; is defined in system header.</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="5896"/>
<location filename="mainwindow.cpp" line="5897"/>
<source>New Name</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6028"/>
<location filename="mainwindow.cpp" line="6038"/>
<location filename="mainwindow.cpp" line="6029"/>
<location filename="mainwindow.cpp" line="6039"/>
<source>Replace Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6029"/>
<location filename="mainwindow.cpp" line="6030"/>
<source>Can&apos;t open file &apos;%1&apos; for replace!</source>
<translation>&apos;%1&apos;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6039"/>
<location filename="mainwindow.cpp" line="6040"/>
<source>Contents has changed since last search!</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6085"/>
<location filename="mainwindow.cpp" line="6086"/>
<source>Rich Text Format Files (*.rtf)</source>
<translation>RTF格式文件 (*.rtf)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6107"/>
<location filename="mainwindow.cpp" line="6108"/>
<source>HTML Files (*.html)</source>
<translation>HTML文件 (*.html)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6269"/>
<location filename="mainwindow.cpp" line="6270"/>
<source>The current problem set is not empty.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6287"/>
<location filename="mainwindow.cpp" line="6288"/>
<source>Problem %1</source>
<translation>%1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6313"/>
<location filename="mainwindow.cpp" line="6337"/>
<location filename="mainwindow.cpp" line="6314"/>
<location filename="mainwindow.cpp" line="6338"/>
<source>Problem Set Files (*.pbs)</source>
<translation> (*.pbs)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6343"/>
<location filename="mainwindow.cpp" line="6344"/>
<source>Load Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3478"/>
<location filename="mainwindow.cpp" line="6357"/>
<location filename="mainwindow.cpp" line="6358"/>
<source>Problem Case %1</source>
<translation>%1</translation>
</message>
@ -5755,10 +5753,10 @@ Are you really want to continue?</oldsource>
<location filename="mainwindow.cpp" line="2876"/>
<location filename="mainwindow.cpp" line="3896"/>
<location filename="mainwindow.cpp" line="4007"/>
<location filename="mainwindow.cpp" line="4199"/>
<location filename="mainwindow.cpp" line="4211"/>
<location filename="mainwindow.cpp" line="4619"/>
<location filename="mainwindow.cpp" line="4631"/>
<location filename="mainwindow.cpp" line="4200"/>
<location filename="mainwindow.cpp" line="4212"/>
<location filename="mainwindow.cpp" line="4620"/>
<location filename="mainwindow.cpp" line="4632"/>
<source>Error</source>
<translation></translation>
</message>
@ -5810,50 +5808,50 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4395"/>
<location filename="mainwindow.cpp" line="4396"/>
<source>Compile Failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4401"/>
<location filename="mainwindow.cpp" line="4402"/>
<source>Run Failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4648"/>
<location filename="mainwindow.cpp" line="4662"/>
<location filename="mainwindow.cpp" line="4649"/>
<location filename="mainwindow.cpp" line="4663"/>
<source>Confirm Convertion</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4649"/>
<location filename="mainwindow.cpp" line="4663"/>
<location filename="mainwindow.cpp" line="4650"/>
<location filename="mainwindow.cpp" line="4664"/>
<source>The editing file will be saved using %1 encoding. &lt;br /&gt;This operation can&apos;t be reverted. &lt;br /&gt;Are you sure to continue?</source>
<translation>使%1&lt;br /&gt;&lt;br /&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4813"/>
<location filename="mainwindow.cpp" line="4814"/>
<source>New Watch Expression</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4814"/>
<location filename="mainwindow.cpp" line="4815"/>
<source>Enter Watch Expression (it is recommended to use &apos;this-&gt;&apos; for class members):</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4867"/>
<location filename="mainwindow.cpp" line="4868"/>
<source>Parsing file %1 of %2: &quot;%3&quot;</source>
<translation>%1/%2&quot;%3&quot;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4889"/>
<location filename="mainwindow.cpp" line="4895"/>
<location filename="mainwindow.cpp" line="4890"/>
<location filename="mainwindow.cpp" line="4896"/>
<source>Done parsing %1 files in %2 seconds</source>
<translation>%1,%2</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4892"/>
<location filename="mainwindow.cpp" line="4893"/>
<source>(%1 files per second)</source>
<translation>(%1</translation>
</message>
@ -6832,7 +6830,7 @@ Are you really want to continue?</oldsource>
<context>
<name>QApplication</name>
<message>
<location filename="main.cpp" line="392"/>
<location filename="main.cpp" line="396"/>
<source>Error</source>
<translation></translation>
</message>
@ -6902,205 +6900,205 @@ Are you really want to continue?</oldsource>
<translation>&quot;%1&quot;</translation>
</message>
<message>
<location filename="main.cpp" line="346"/>
<location filename="main.cpp" line="350"/>
<source>Can&apos;t load autolink settings</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="1559"/>
<location filename="settings.cpp" line="1578"/>
<location filename="settings.cpp" line="1571"/>
<location filename="settings.cpp" line="1590"/>
<location filename="settings.cpp" line="1602"/>
<location filename="settings.cpp" line="1614"/>
<source>The following %1 directories don&apos;t exist:</source>
<translation>%1</translation>
</message>
<message>
<location filename="settings.cpp" line="1560"/>
<location filename="settings.cpp" line="1570"/>
<location filename="settings.cpp" line="1572"/>
<location filename="settings.cpp" line="1582"/>
<source>binary</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="1569"/>
<location filename="settings.cpp" line="1581"/>
<source>No %1 directories have been specified.</source>
<translation>%1</translation>
</message>
<message>
<location filename="settings.cpp" line="1579"/>
<location filename="settings.cpp" line="1591"/>
<source>C include</source>
<translation>C包含</translation>
</message>
<message>
<location filename="settings.cpp" line="1591"/>
<location filename="settings.cpp" line="1603"/>
<location filename="settings.cpp" line="1615"/>
<source>C++ include</source>
<translation>C++</translation>
</message>
<message>
<location filename="settings.cpp" line="1622"/>
<location filename="settings.cpp" line="1627"/>
<location filename="settings.cpp" line="1632"/>
<location filename="settings.cpp" line="1637"/>
<location filename="settings.cpp" line="1634"/>
<location filename="settings.cpp" line="1639"/>
<location filename="settings.cpp" line="1644"/>
<location filename="settings.cpp" line="1649"/>
<source>Cannot find the %1 &quot;%2&quot;</source>
<translation>%1&quot;%2&quot;</translation>
</message>
<message>
<location filename="settings.cpp" line="1623"/>
<location filename="settings.cpp" line="1635"/>
<source>C Compiler</source>
<translation>C编译器</translation>
</message>
<message>
<location filename="settings.cpp" line="1628"/>
<location filename="settings.cpp" line="1640"/>
<source>C++ Compiler</source>
<translation>C++</translation>
</message>
<message>
<location filename="settings.cpp" line="1633"/>
<location filename="settings.cpp" line="1645"/>
<source>Maker</source>
<translation>(Make)</translation>
</message>
<message>
<location filename="settings.cpp" line="1638"/>
<location filename="settings.cpp" line="1650"/>
<source>Debugger</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2166"/>
<location filename="settings.cpp" line="2178"/>
<source>C options</source>
<translation>C语言选项</translation>
</message>
<message>
<location filename="settings.cpp" line="2167"/>
<location filename="settings.cpp" line="2179"/>
<source>Support all ANSI standard C programs (-ansi)</source>
<translation>ANSI标准C程序(-ansi)</translation>
</message>
<message>
<location filename="settings.cpp" line="2168"/>
<location filename="settings.cpp" line="2180"/>
<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="2169"/>
<location filename="settings.cpp" line="2181"/>
<source>Imitate traditional C preprocessors (-traditional-cpp)</source>
<translation>仿C预处理器行为(-traditional-cpp)</translation>
</message>
<message>
<location filename="settings.cpp" line="2172"/>
<location filename="settings.cpp" line="2184"/>
<source>Code Generation</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2201"/>
<location filename="settings.cpp" line="2213"/>
<source>Optimize for the following machine (-march)</source>
<translation>(-march)</translation>
</message>
<message>
<location filename="settings.cpp" line="2202"/>
<location filename="settings.cpp" line="2214"/>
<source>Optimize less, while maintaining full compatibility (-tune)</source>
<translation>(-tune)</translation>
</message>
<message>
<location filename="settings.cpp" line="2222"/>
<location filename="settings.cpp" line="2234"/>
<source>Enable use of specific instructions (-mx)</source>
<translation>(-mx)</translation>
</message>
<message>
<location filename="settings.cpp" line="2233"/>
<location filename="settings.cpp" line="2245"/>
<source>Optimization level (-Ox)</source>
<translation>(-Ox)</translation>
</message>
<message>
<location filename="settings.cpp" line="2240"/>
<location filename="settings.cpp" line="2252"/>
<source>Compile with the following pointer size (-mx)</source>
<translation>使(-mx)</translation>
</message>
<message>
<location filename="settings.cpp" line="2263"/>
<location filename="settings.cpp" line="2275"/>
<source>Language standard (-std)</source>
<translation>(-std)</translation>
</message>
<message>
<location filename="settings.cpp" line="2276"/>
<location filename="settings.cpp" line="2288"/>
<source>Profile</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2285"/>
<location filename="settings.cpp" line="2297"/>
<source>Generate debugging information (-g3)</source>
<translation>(-g3)</translation>
</message>
<message>
<location filename="settings.cpp" line="2672"/>
<location filename="settings.cpp" line="2684"/>
<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="2277"/>
<location filename="settings.cpp" line="2289"/>
<source>Generate profiling info for analysis (-pg)</source>
<translation>(-pg)</translation>
</message>
<message>
<location filename="settings.cpp" line="2266"/>
<location filename="settings.cpp" line="2278"/>
<source>Warnings</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2267"/>
<location filename="settings.cpp" line="2279"/>
<source>Inhibit all warning messages (-w)</source>
<translation>(-w)</translation>
</message>
<message>
<location filename="settings.cpp" line="2268"/>
<location filename="settings.cpp" line="2280"/>
<source>Show most warnings (-Wall)</source>
<translation>(-Wall)</translation>
</message>
<message>
<location filename="settings.cpp" line="2269"/>
<location filename="settings.cpp" line="2281"/>
<source>Show some more warnings (-Wextra)</source>
<translation>(-Wextra)</translation>
</message>
<message>
<location filename="settings.cpp" line="2270"/>
<location filename="settings.cpp" line="2282"/>
<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="2271"/>
<location filename="settings.cpp" line="2283"/>
<source>Only check the code for syntax errors (-fsyntax-only)</source>
<translation>(-fsyntax-only)</translation>
</message>
<message>
<location filename="settings.cpp" line="2272"/>
<location filename="settings.cpp" line="2284"/>
<source>Make all warnings into errors (-Werror)</source>
<translation>(-Werror)</translation>
</message>
<message>
<location filename="settings.cpp" line="2273"/>
<location filename="settings.cpp" line="2285"/>
<source>Abort compilation on first error (-Wfatal-errors)</source>
<translation>(-Wfatal-errors)</translation>
</message>
<message>
<location filename="settings.cpp" line="2280"/>
<location filename="settings.cpp" line="2292"/>
<source>Linker</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2281"/>
<location filename="settings.cpp" line="2293"/>
<source>Link an Objective C program (-lobjc)</source>
<translation>Objective-C程序 (-lobjc)</translation>
</message>
<message>
<location filename="settings.cpp" line="2282"/>
<location filename="settings.cpp" line="2294"/>
<source>Do not use standard system libraries (-nostdlib)</source>
<translation>使(-nostdlib)</translation>
</message>
<message>
<location filename="settings.cpp" line="2283"/>
<location filename="settings.cpp" line="2295"/>
<source>Do not create a console window (-mwindows)</source>
<translation>(-mwindows)</translation>
</message>
<message>
<location filename="settings.cpp" line="2284"/>
<location filename="settings.cpp" line="2296"/>
<source>Strip executable (-s)</source>
<translation>(-s)</translation>
</message>
@ -7109,54 +7107,54 @@ Are you really want to continue?</oldsource>
<translation type="vanished">Ojbective C程序(-lobjc)</translation>
</message>
<message>
<location filename="settings.cpp" line="2288"/>
<location filename="settings.cpp" line="2300"/>
<source>Output</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2289"/>
<location filename="settings.cpp" line="2301"/>
<source>Put comments in generated assembly code (-fverbose-asm)</source>
<translation>(-fverbose-asm)</translation>
</message>
<message>
<location filename="settings.cpp" line="2291"/>
<location filename="settings.cpp" line="2303"/>
<source>Use pipes instead of temporary files during compilation (-pipe)</source>
<translation>使(-pipe)</translation>
</message>
<message>
<location filename="settings.cpp" line="2290"/>
<location filename="settings.cpp" line="2302"/>
<source>Do not assemble, compile and generate the assemble code (-S)</source>
<translation>(-S)</translation>
</message>
<message>
<location filename="settings.cpp" line="2634"/>
<location filename="settings.cpp" line="2674"/>
<location filename="settings.cpp" line="2646"/>
<location filename="settings.cpp" line="2686"/>
<source>Confirm</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2635"/>
<location filename="settings.cpp" line="2647"/>
<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="2639"/>
<location filename="settings.cpp" line="2651"/>
<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="2641"/>
<location filename="settings.cpp" line="2653"/>
<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="2664"/>
<location filename="settings.cpp" line="2670"/>
<location filename="settings.cpp" line="2676"/>
<location filename="settings.cpp" line="2682"/>
<source>Compiler set not configuared.</source>
<translation></translation>
</message>
<message>
<location filename="settings.cpp" line="2666"/>
<location filename="settings.cpp" line="2678"/>
<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>
@ -7996,7 +7994,7 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6258"/>
<location filename="mainwindow.cpp" line="6259"/>
<location filename="settingsdialog/settingsdialog.cpp" line="170"/>
<location filename="settingsdialog/settingsdialog.cpp" line="203"/>
<location filename="settingsdialog/settingsdialog.cpp" line="209"/>
@ -8072,15 +8070,15 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6259"/>
<location filename="mainwindow.cpp" line="6572"/>
<location filename="mainwindow.cpp" line="6260"/>
<location filename="mainwindow.cpp" line="6573"/>
<location filename="settingsdialog/settingsdialog.cpp" line="203"/>
<location filename="settingsdialog/settingsdialog.cpp" line="206"/>
<source>Program Runner</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="6571"/>
<location filename="mainwindow.cpp" line="6572"/>
<location filename="settingsdialog/settingsdialog.cpp" line="206"/>
<source>Problem Set</source>
<translation></translation>
@ -8329,8 +8327,8 @@ Are you really want to continue?</oldsource>
<context>
<name>SynEdit</name>
<message>
<location filename="qsynedit/TextPainter.cpp" line="1008"/>
<location filename="qsynedit/TextPainter.cpp" line="1009"/>
<location filename="qsynedit/TextPainter.cpp" line="994"/>
<location filename="qsynedit/TextPainter.cpp" line="995"/>
<source>The highlighter seems to be in an infinite loop</source>
<translation></translation>
</message>
@ -8725,17 +8723,23 @@ Are you really want to continue?</oldsource>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/editorgeneralwidget.ui" line="349"/>
<location filename="settingsdialog/editorgeneralwidget.ui" line="361"/>
<source>Mouse Selection/Dragging Scroll Speed</source>
<oldsource>Mouse Selection/Dragging Speed</oldsource>
<translation>/</translation>
</message>
<message>
<location filename="settingsdialog/editorgeneralwidget.ui" line="397"/>
<source>Show right edge line</source>
<translation>线</translation>
</message>
<message>
<location filename="settingsdialog/editorgeneralwidget.ui" line="361"/>
<location filename="settingsdialog/editorgeneralwidget.ui" line="409"/>
<source>Right egde width</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/editorgeneralwidget.ui" line="413"/>
<location filename="settingsdialog/editorgeneralwidget.ui" line="461"/>
<source>Right edge line color</source>
<translation></translation>
</message>

View File

@ -4253,6 +4253,7 @@ void Editor::applySettings()
}
setMouseWheelScrollSpeed(pSettings->editor().mouseWheelScrollSpeed());
setMouseSelectionScrollSpeed(pSettings->editor().mouseSelectionScrollSpeed());
invalidate();
}

View File

@ -255,9 +255,9 @@ int main(int argc, char *argv[])
QString settingFilename = getSettingFilename(QString(), firstRun);
bool openInSingleInstance = false;
if (!settingFilename.isEmpty() && !firstRun) {
Settings settings(settingFilename);
settings.load();
openInSingleInstance = settings.environment().openFilesInSingleInstance();
QSettings envSetting(settingFilename,QSettings::IniFormat);
envSetting.beginGroup(SETTING_ENVIRONMENT);
openInSingleInstance = envSetting.value("open_files_in_single_instance",false).toBool();
} else if (!settingFilename.isEmpty() && firstRun)
openInSingleInstance = false;
if (openInSingleInstance) {
@ -281,7 +281,6 @@ int main(int argc, char *argv[])
}
}
}
//Translation must be loaded first
QTranslator trans,transQt;
bool firstRun;
@ -293,7 +292,6 @@ int main(int argc, char *argv[])
tempFile.remove();
return -1;
}
{
QSettings languageSetting(settingFilename,QSettings::IniFormat);
languageSetting.beginGroup(SETTING_ENVIRONMENT);
@ -306,7 +304,6 @@ int main(int argc, char *argv[])
app.installTranslator(&transQt);
}
}
qRegisterMetaType<PCompileIssue>("PCompileIssue");
qRegisterMetaType<PCompileIssue>("PCompileIssue&");
qRegisterMetaType<QVector<int>>("QVector<int>");
@ -342,7 +339,6 @@ int main(int argc, char *argv[])
pSettings->vcs().detectGitInPath();
}
auto settings = std::unique_ptr<Settings>(pSettings);
//Color scheme settings must be loaded after translation
pColorManager = new ColorManager();
pIconsManager = new IconsManager();

View File

@ -90,7 +90,8 @@ SynEdit::SynEdit(QWidget *parent) : QAbstractScrollArea(parent)
// fRightEdge has to be set before FontChanged is called for the first time
mRightEdge = 80;
mMouseWheelScrollSpeed = 1;
mMouseWheelScrollSpeed = 3;
mMouseSelectionScrollSpeed = 1;
mGutter.setRightOffset(21);
mGutter.connect(&mGutter, &SynGutter::changed, this, &SynEdit::onGutterChanged);
@ -1804,17 +1805,18 @@ void SynEdit::doMouseScroll(bool isDragging)
C = pixelsToRowColumn(iMousePos.x(), iMousePos.y());
C.Row = minMax(C.Row, 1, displayLineCount());
if (mScrollDeltaX != 0) {
setLeftChar(leftChar() + mScrollDeltaX);
setLeftChar(leftChar() + mScrollDeltaX * mMouseSelectionScrollSpeed);
X = leftChar();
if (mScrollDeltaX > 0) // scrolling right?
X+=charsInWindow();
C.Column = X;
}
if (mScrollDeltaY != 0) {
//qDebug()<<mScrollDeltaY;
if (QApplication::queryKeyboardModifiers().testFlag(Qt::ShiftModifier))
setTopLine(mTopLine + mScrollDeltaY * mLinesInWindow);
else
setTopLine(mTopLine + mScrollDeltaY);
setTopLine(mTopLine + mScrollDeltaY * mMouseSelectionScrollSpeed);
Y = mTopLine;
if (mScrollDeltaY > 0) // scrolling down?
Y+=mLinesInWindow - 1;
@ -2489,17 +2491,15 @@ void SynEdit::computeCaret(int X, int Y)
void SynEdit::computeScroll(int X, int Y, bool isDragging)
{
if (!isDragging) {
Qt::MouseButtons buttons = qApp->mouseButtons();
if (!buttons.testFlag(Qt::LeftButton))
return;
}
QRect iScrollBounds; // relative to the client area
int dispX=2,dispY = 2;
if (isDragging) {
dispX = mCharWidth / 2 -1;
dispY = mTextHeight/ 2 -1;
}
// if (isDragging) {
// dispX = mCharWidth / 2 -1;
// dispY = mTextHeight/ 2 -1;
// }
int left = mGutterWidth+frameWidth()+dispX;
int top = frameWidth()+dispY;
iScrollBounds = QRect(left,
@ -2529,13 +2529,13 @@ void SynEdit::computeScroll(int X, int Y, bool isDragging)
mScrollDeltaY = 0;
}
if (mScrollDeltaX!=0 || mScrollDeltaY!=0) {
// if (mScrollDeltaX!=0 || mScrollDeltaY!=0) {
if (isDragging) {
mScrollTimer->singleShot(100,this,&SynEdit::onDraggingScrollTimeout);
} else {
mScrollTimer->singleShot(100,this,&SynEdit::onScrollTimeout);
}
}
// }
}
void SynEdit::doBlockIndent()
@ -3780,6 +3780,16 @@ void SynEdit::onScrolled(int)
invalidate();
}
int SynEdit::mouseSelectionScrollSpeed() const
{
return mMouseSelectionScrollSpeed;
}
void SynEdit::setMouseSelectionScrollSpeed(int newMouseSelectionScrollSpeed)
{
mMouseSelectionScrollSpeed = newMouseSelectionScrollSpeed;
}
const QFont &SynEdit::fontForNonAscii() const
{
return mFontForNonAscii;
@ -5912,6 +5922,7 @@ void SynEdit::mousePressEvent(QMouseEvent *event)
//Selection mode must be set before calling SetBlockBegin
setBlockBegin(caretXY());
}
computeScroll(X,Y,false);
}
}
}
@ -5964,7 +5975,7 @@ void SynEdit::mouseMoveEvent(QMouseEvent *event)
}
} else if ((buttons == Qt::LeftButton)) {
// should we begin scrolling?
computeScroll(X, Y,false);
//computeScroll(X, Y,false);
DisplayCoord P = pixelsToNearestRowColumn(X, Y);
P.Row = minMax(P.Row, 1, displayLineCount());
if (mScrollDeltaX != 0)
@ -6076,6 +6087,8 @@ void SynEdit::dragEnterEvent(QDragEnterEvent *event)
setBlockBegin(mDragSelBeginSave);
setBlockEnd(mDragSelEndSave);
showCaret();
computeScroll(event->pos().x(),
event->pos().y(),true);
}
}
@ -6146,8 +6159,8 @@ void SynEdit::dragMoveEvent(QDragMoveEvent *event)
event->setDropAction(Qt::MoveAction);
}
// should we begin scrolling?
computeScroll(event->pos().x(),
event->pos().y(),true);
// computeScroll(event->pos().x(),
// event->pos().y(),true);
BufferCoord coord = displayToBufferPos(pixelsToNearestRowColumn(event->pos().x(),
event->pos().y()));

View File

@ -723,6 +723,7 @@ private:
QString mInputPreeditString;
int mMouseWheelScrollSpeed;
int mMouseSelectionScrollSpeed;
BufferCoord mDragCaretSave;
BufferCoord mDragSelBeginSave;
@ -760,6 +761,9 @@ QVariant inputMethodQuery(Qt::InputMethodQuery property) const override;
const QFont &fontForNonAscii() const;
void setFontForNonAscii(const QFont &newFontForNonAscii);
int mouseSelectionScrollSpeed() const;
void setMouseSelectionScrollSpeed(int newMouseSelectionScrollSpeed);
protected:
void dragEnterEvent(QDragEnterEvent *event) override;
void dropEvent(QDropEvent *event) override;

View File

@ -431,7 +431,6 @@ void SynEditTextPainter::PaintToken(const QString &Token, int TokenCols, int Col
textToPaint+=Token[i];
}
painter->drawText(nX,rcToken.bottom()-painter->fontMetrics().descent() , textToPaint);
qDebug()<<textToPaint;
drawed = true;
}
if (!drawed) {

View File

@ -614,6 +614,16 @@ void Settings::Editor::setNonAsciiFontName(const QString &newNonAsciiFontName)
mNonAsciiFontName = newNonAsciiFontName;
}
int Settings::Editor::mouseSelectionScrollSpeed() const
{
return mMouseSelectionScrollSpeed;
}
void Settings::Editor::setMouseSelectionScrollSpeed(int newMouseSelectionScrollSpeed)
{
mMouseSelectionScrollSpeed = newMouseSelectionScrollSpeed;
}
bool Settings::Editor::highlightCurrentWord() const
{
return mHighlightCurrentWord;
@ -1115,6 +1125,7 @@ void Settings::Editor::doSave()
saveValue("scroll_by_one_less", mScrollByOneLess);
saveValue("half_page_scroll", mHalfPageScroll);
saveValue("mouse_wheel_scroll_speed", mMouseWheelScrollSpeed);
saveValue("mouse_selection_scroll_speed",mMouseSelectionScrollSpeed);
//right edge
saveValue("show_right_edge_line",mShowRightEdgeLine);
@ -1232,6 +1243,7 @@ void Settings::Editor::doLoad()
mScrollByOneLess = boolValue("scroll_by_one_less", false);
mHalfPageScroll = boolValue("half_page_scroll",false);
mMouseWheelScrollSpeed = intValue("mouse_wheel_scroll_speed", 3);
mMouseSelectionScrollSpeed = intValue("mouse_selection_scroll_speed",1);
//right edge

View File

@ -372,6 +372,9 @@ public:
const QString &nonAsciiFontName() const;
void setNonAsciiFontName(const QString &newNonAsciiFontName);
int mouseSelectionScrollSpeed() const;
void setMouseSelectionScrollSpeed(int newMouseSelectionScrollSpeed);
private:
//General
// indents
@ -401,6 +404,7 @@ public:
bool mScrollByOneLess;
bool mHalfPageScroll;
int mMouseWheelScrollSpeed;
int mMouseSelectionScrollSpeed;
//right margin
bool mShowRightEdgeLine;

View File

@ -78,6 +78,7 @@ void EditorGeneralWidget::doLoad()
ui->chkScrollHalfPage->setChecked(pSettings->editor().halfPageScroll());
ui->chkScrollByOneLess->setChecked(pSettings->editor().scrollByOneLess());
ui->spinMouseWheelScrollSpeed->setValue(pSettings->editor().mouseWheelScrollSpeed());
ui->spinMouseSelectionScrollSpeed->setValue(pSettings->editor().mouseSelectionScrollSpeed());
//right margin line;
ui->grpRightEdge->setChecked(pSettings->editor().showRightEdgeLine());
@ -114,6 +115,7 @@ void EditorGeneralWidget::doSave()
pSettings->editor().setScrollByOneLess(ui->chkScrollByOneLess->isChecked());
pSettings->editor().setHalfPageScroll(ui->chkScrollHalfPage->isChecked());
pSettings->editor().setMouseWheelScrollSpeed(ui->spinMouseWheelScrollSpeed->value());
pSettings->editor().setMouseSelectionScrollSpeed(ui->spinMouseSelectionScrollSpeed->value());
//right margin line;
pSettings->editor().setShowRightEdgeLine(ui->grpRightEdge->isChecked());

View File

@ -340,6 +340,54 @@
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="widget_7" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Mouse Selection/Dragging Scroll Speed</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinMouseSelectionScrollSpeed">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>