- fix: add unit to project not correctly set new unit file's encoding
- fix: correctly set encoding for the new added project unit file - fix: if there's a project openned, new file should ask user if he want to add the new file to the project - fix: when adding a file openned in the editor to the project, properties of it are not correctly setted. - enhancement: when remove a file from the project, also ask if user want to remove it from disk - fix: double click a project's .dev file in the Files panel should load the project
This commit is contained in:
parent
0f130291aa
commit
284a8ed695
5
NEWS.md
5
NEWS.md
|
@ -1,6 +1,11 @@
|
|||
Version 0.8.10 For Dev-C++ 7 Beta
|
||||
- fix: Shouldn't update auto link settings, if the header name to be modified is unchanged
|
||||
- fix: add unit to project not correctly set new unit file's encoding
|
||||
- fix: correctly set encoding for the new added project unit file
|
||||
- fix: if there's a project openned, new file should ask user if he want to add the new file to the project
|
||||
- fix: when adding a file openned in the editor to the project, properties of it are not correctly setted.
|
||||
- enhancement: when remove a file from the project, also ask if user want to remove it from disk
|
||||
- fix: double click a project's .dev file in the Files panel should load the project
|
||||
|
||||
Version 0.8.9 For Dev-C++ 7 Beta
|
||||
- fix: text color of labels in statusbar not correctly updated when change theme
|
||||
|
|
Binary file not shown.
|
@ -82,12 +82,12 @@
|
|||
<translation>链接参数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/compilerautolinkwidget.cpp" line="115"/>
|
||||
<location filename="settingsdialog/compilerautolinkwidget.cpp" line="117"/>
|
||||
<source>Header exists</source>
|
||||
<translation>头文件已存在</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/compilerautolinkwidget.cpp" line="116"/>
|
||||
<location filename="settingsdialog/compilerautolinkwidget.cpp" line="118"/>
|
||||
<source>Header already exists.</source>
|
||||
<translation>头文件已存在。</translation>
|
||||
</message>
|
||||
|
@ -2857,11 +2857,11 @@ Are you really want to continue?</source>
|
|||
<message>
|
||||
<location filename="mainwindow.ui" line="524"/>
|
||||
<location filename="mainwindow.ui" line="2555"/>
|
||||
<location filename="mainwindow.cpp" line="3512"/>
|
||||
<location filename="mainwindow.cpp" line="3515"/>
|
||||
<location filename="mainwindow.cpp" line="3519"/>
|
||||
<location filename="mainwindow.cpp" line="3522"/>
|
||||
<location filename="mainwindow.cpp" line="5099"/>
|
||||
<location filename="mainwindow.cpp" line="3521"/>
|
||||
<location filename="mainwindow.cpp" line="3524"/>
|
||||
<location filename="mainwindow.cpp" line="3528"/>
|
||||
<location filename="mainwindow.cpp" line="3531"/>
|
||||
<location filename="mainwindow.cpp" line="5119"/>
|
||||
<source>Issues</source>
|
||||
<translation>编译器</translation>
|
||||
</message>
|
||||
|
@ -3269,7 +3269,7 @@ Are you really want to continue?</source>
|
|||
<message>
|
||||
<location filename="mainwindow.ui" line="323"/>
|
||||
<location filename="mainwindow.ui" line="326"/>
|
||||
<location filename="mainwindow.cpp" line="5417"/>
|
||||
<location filename="mainwindow.cpp" line="5438"/>
|
||||
<source>New Problem Set</source>
|
||||
<translation>新建试题集</translation>
|
||||
</message>
|
||||
|
@ -3288,14 +3288,14 @@ Are you really want to continue?</source>
|
|||
<message>
|
||||
<location filename="mainwindow.ui" line="365"/>
|
||||
<location filename="mainwindow.ui" line="368"/>
|
||||
<location filename="mainwindow.cpp" line="5460"/>
|
||||
<location filename="mainwindow.cpp" line="5481"/>
|
||||
<source>Save Problem Set</source>
|
||||
<translation>保存试题集</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="379"/>
|
||||
<location filename="mainwindow.ui" line="382"/>
|
||||
<location filename="mainwindow.cpp" line="5480"/>
|
||||
<location filename="mainwindow.cpp" line="5501"/>
|
||||
<source>Load Problem Set</source>
|
||||
<translation>载入试题集</translation>
|
||||
</message>
|
||||
|
@ -3630,7 +3630,7 @@ Are you really want to continue?</source>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="2239"/>
|
||||
<location filename="mainwindow.cpp" line="4391"/>
|
||||
<location filename="mainwindow.cpp" line="4400"/>
|
||||
<source>Clear all breakpoints</source>
|
||||
<translation>删除所有断点</translation>
|
||||
</message>
|
||||
|
@ -3731,7 +3731,7 @@ Are you really want to continue?</source>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="2390"/>
|
||||
<location filename="mainwindow.cpp" line="5056"/>
|
||||
<location filename="mainwindow.cpp" line="5076"/>
|
||||
<source>Rename Symbol</source>
|
||||
<translation>重命名符号</translation>
|
||||
</message>
|
||||
|
@ -3752,13 +3752,13 @@ Are you really want to continue?</source>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="2410"/>
|
||||
<location filename="mainwindow.cpp" line="5236"/>
|
||||
<location filename="mainwindow.cpp" line="5256"/>
|
||||
<source>Export As RTF</source>
|
||||
<translation>导出为RTF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="2415"/>
|
||||
<location filename="mainwindow.cpp" line="5258"/>
|
||||
<location filename="mainwindow.cpp" line="5278"/>
|
||||
<source>Export As HTML</source>
|
||||
<translation>导出为HTML</translation>
|
||||
</message>
|
||||
|
@ -3824,7 +3824,7 @@ Are you really want to continue?</source>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="2477"/>
|
||||
<location filename="mainwindow.cpp" line="5396"/>
|
||||
<location filename="mainwindow.cpp" line="5417"/>
|
||||
<source>Open Folder</source>
|
||||
<translation>打开文件夹</translation>
|
||||
</message>
|
||||
|
@ -4055,7 +4055,7 @@ Are you really want to continue?</source>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="222"/>
|
||||
<location filename="mainwindow.cpp" line="5426"/>
|
||||
<location filename="mainwindow.cpp" line="5447"/>
|
||||
<source>Problem Set %1</source>
|
||||
<translation>试题集%1</translation>
|
||||
</message>
|
||||
|
@ -4122,15 +4122,15 @@ Are you really want to continue?</source>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1894"/>
|
||||
<location filename="mainwindow.cpp" line="5316"/>
|
||||
<location filename="mainwindow.cpp" line="5356"/>
|
||||
<location filename="mainwindow.cpp" line="5336"/>
|
||||
<location filename="mainwindow.cpp" line="5376"/>
|
||||
<source>Bookmark Description</source>
|
||||
<translation>书签描述</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1895"/>
|
||||
<location filename="mainwindow.cpp" line="5317"/>
|
||||
<location filename="mainwindow.cpp" line="5357"/>
|
||||
<location filename="mainwindow.cpp" line="5337"/>
|
||||
<location filename="mainwindow.cpp" line="5377"/>
|
||||
<source>Description:</source>
|
||||
<translation>描述:</translation>
|
||||
</message>
|
||||
|
@ -4294,183 +4294,203 @@ Are you really want to continue?</source>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3069"/>
|
||||
<location filename="mainwindow.cpp" line="5420"/>
|
||||
<location filename="mainwindow.cpp" line="5441"/>
|
||||
<source>Do you want to save it?</source>
|
||||
<translation>需要保存吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3284"/>
|
||||
<location filename="mainwindow.cpp" line="3294"/>
|
||||
<location filename="mainwindow.cpp" line="3306"/>
|
||||
<location filename="mainwindow.cpp" line="5469"/>
|
||||
<location filename="mainwindow.cpp" line="3216"/>
|
||||
<source>New Project File?</source>
|
||||
<translation>新建项目文件?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3217"/>
|
||||
<source>Do you want to add the new file to the project?</source>
|
||||
<translation>您是否要将新建的文件加入项目?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3293"/>
|
||||
<location filename="mainwindow.cpp" line="3303"/>
|
||||
<location filename="mainwindow.cpp" line="3315"/>
|
||||
<location filename="mainwindow.cpp" line="5490"/>
|
||||
<source>Save Error</source>
|
||||
<translation>保存失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3445"/>
|
||||
<location filename="mainwindow.cpp" line="3454"/>
|
||||
<source>Change Project Compiler Set</source>
|
||||
<translation>改变项目编译器配置集</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3446"/>
|
||||
<location filename="mainwindow.cpp" line="3455"/>
|
||||
<source>Change the project's compiler set will lose all custom compiler set options.</source>
|
||||
<translation>改变项目的编译器配置集会导致所有的自定义编译器选项被重置。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3448"/>
|
||||
<location filename="mainwindow.cpp" line="3457"/>
|
||||
<source>Do you really want to do that?</source>
|
||||
<translation>你真的想要做那些吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4392"/>
|
||||
<location filename="mainwindow.cpp" line="4401"/>
|
||||
<source>Do you really want to clear all breakpoints in this file?</source>
|
||||
<translation>您真的要清除该文件的所有断点吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4571"/>
|
||||
<location filename="mainwindow.cpp" line="4580"/>
|
||||
<source>New project</source>
|
||||
<translation>新建项目</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4572"/>
|
||||
<location filename="mainwindow.cpp" line="4581"/>
|
||||
<source>Close %1 and start new project?</source>
|
||||
<translation>关闭'%1'以打开新项目?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4584"/>
|
||||
<location filename="mainwindow.cpp" line="4593"/>
|
||||
<source>Folder not exist</source>
|
||||
<translation>文件夹不存在</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4585"/>
|
||||
<location filename="mainwindow.cpp" line="4594"/>
|
||||
<source>Folder '%1' doesn't exist. Create it now?</source>
|
||||
<translation>文件夹'%1'不存在。是否创建?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4592"/>
|
||||
<location filename="mainwindow.cpp" line="4601"/>
|
||||
<source>Can't create folder</source>
|
||||
<translation>无法创建文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4593"/>
|
||||
<location filename="mainwindow.cpp" line="4602"/>
|
||||
<source>Failed to create folder '%1'.</source>
|
||||
<translation>创建文件夹'%1'失败。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4608"/>
|
||||
<location filename="mainwindow.cpp" line="4617"/>
|
||||
<source>Save new project as</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4610"/>
|
||||
<location filename="mainwindow.cpp" line="4619"/>
|
||||
<source>Red panda Dev-C++ project file (*.dev)</source>
|
||||
<translation>小熊猫Dev-C++项目文件 (*.dev)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4621"/>
|
||||
<location filename="mainwindow.cpp" line="4630"/>
|
||||
<source>New project fail</source>
|
||||
<translation>新建项目失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4622"/>
|
||||
<location filename="mainwindow.cpp" line="4631"/>
|
||||
<source>Can't assign project template</source>
|
||||
<translation>无法使用模板创建项目</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4667"/>
|
||||
<location filename="mainwindow.cpp" line="4716"/>
|
||||
<source>Remove file</source>
|
||||
<translation>删除文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4717"/>
|
||||
<source>Remove the file from disk?</source>
|
||||
<translation>同时从硬盘上删除文件?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4944"/>
|
||||
<source>untitled</source>
|
||||
<translation>无标题</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4677"/>
|
||||
<location filename="mainwindow.cpp" line="4954"/>
|
||||
<source>New Project File Name</source>
|
||||
<translation>新的项目文件名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4678"/>
|
||||
<location filename="mainwindow.cpp" line="4955"/>
|
||||
<source>File Name:</source>
|
||||
<translation>文件名:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4684"/>
|
||||
<location filename="mainwindow.cpp" line="4961"/>
|
||||
<source>File Already Exists!</source>
|
||||
<translation>文件已存在!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4685"/>
|
||||
<location filename="mainwindow.cpp" line="4962"/>
|
||||
<source>File '%1' already exists!</source>
|
||||
<translation>文件'%1'已经存在!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4704"/>
|
||||
<location filename="mainwindow.cpp" line="4674"/>
|
||||
<source>Add to project</source>
|
||||
<translation>添加到项目</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5042"/>
|
||||
<location filename="mainwindow.cpp" line="5062"/>
|
||||
<source>Rename Error</source>
|
||||
<translation>重命名出错</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5043"/>
|
||||
<location filename="mainwindow.cpp" line="5063"/>
|
||||
<source>Symbol '%1' is defined in system header.</source>
|
||||
<translation>符号'%1'在系统头文件中定义,无法修改。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5057"/>
|
||||
<location filename="mainwindow.cpp" line="5077"/>
|
||||
<source>New Name</source>
|
||||
<translation>新名称</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5181"/>
|
||||
<location filename="mainwindow.cpp" line="5191"/>
|
||||
<location filename="mainwindow.cpp" line="5201"/>
|
||||
<location filename="mainwindow.cpp" line="5211"/>
|
||||
<source>Replace Error</source>
|
||||
<translation>替换出错</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5182"/>
|
||||
<location filename="mainwindow.cpp" line="5202"/>
|
||||
<source>Can't open file '%1' for replace!</source>
|
||||
<translation>无法打开文件'%1'进行替换!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5192"/>
|
||||
<location filename="mainwindow.cpp" line="5212"/>
|
||||
<source>Contents has changed since last search!</source>
|
||||
<translation>内容和上次查找时不一致。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5238"/>
|
||||
<location filename="mainwindow.cpp" line="5258"/>
|
||||
<source>Rich Text Format Files (*.rtf)</source>
|
||||
<translation>RTF格式文件 (*.rtf)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5260"/>
|
||||
<location filename="mainwindow.cpp" line="5280"/>
|
||||
<source>HTML Files (*.html)</source>
|
||||
<translation>HTML文件 (*.html)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5418"/>
|
||||
<location filename="mainwindow.cpp" line="5439"/>
|
||||
<source>The current problem set is not empty.</source>
|
||||
<translation>当前的试题集不是空的。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5436"/>
|
||||
<location filename="mainwindow.cpp" line="5457"/>
|
||||
<source>Problem %1</source>
|
||||
<translation>试题%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5462"/>
|
||||
<location filename="mainwindow.cpp" line="5482"/>
|
||||
<location filename="mainwindow.cpp" line="5483"/>
|
||||
<location filename="mainwindow.cpp" line="5503"/>
|
||||
<source>Problem Set Files (*.pbs)</source>
|
||||
<translation>试题集文件 (*.pbs)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5488"/>
|
||||
<location filename="mainwindow.cpp" line="5509"/>
|
||||
<source>Load Error</source>
|
||||
<translation>载入失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2817"/>
|
||||
<location filename="mainwindow.cpp" line="5502"/>
|
||||
<location filename="mainwindow.cpp" line="5523"/>
|
||||
<source>Problem Case %1</source>
|
||||
<translation>试题案例%1</translation>
|
||||
</message>
|
||||
|
@ -4485,11 +4505,11 @@ Are you really want to continue?</source>
|
|||
<location filename="mainwindow.cpp" line="1793"/>
|
||||
<location filename="mainwindow.cpp" line="2369"/>
|
||||
<location filename="mainwindow.cpp" line="3153"/>
|
||||
<location filename="mainwindow.cpp" line="3242"/>
|
||||
<location filename="mainwindow.cpp" line="3414"/>
|
||||
<location filename="mainwindow.cpp" line="3426"/>
|
||||
<location filename="mainwindow.cpp" line="3816"/>
|
||||
<location filename="mainwindow.cpp" line="3828"/>
|
||||
<location filename="mainwindow.cpp" line="3251"/>
|
||||
<location filename="mainwindow.cpp" line="3423"/>
|
||||
<location filename="mainwindow.cpp" line="3435"/>
|
||||
<location filename="mainwindow.cpp" line="3825"/>
|
||||
<location filename="mainwindow.cpp" line="3837"/>
|
||||
<source>Error</source>
|
||||
<translation>错误</translation>
|
||||
</message>
|
||||
|
@ -4519,55 +4539,55 @@ Are you really want to continue?</source>
|
|||
<translation>是否保持它在小熊猫C++中打开的编辑窗口?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3235"/>
|
||||
<location filename="mainwindow.cpp" line="3244"/>
|
||||
<source>Open</source>
|
||||
<translation>打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3605"/>
|
||||
<location filename="mainwindow.cpp" line="3614"/>
|
||||
<source>Compile Failed</source>
|
||||
<translation>编译失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3611"/>
|
||||
<location filename="mainwindow.cpp" line="3620"/>
|
||||
<source>Run Failed</source>
|
||||
<translation>运行失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3845"/>
|
||||
<location filename="mainwindow.cpp" line="3859"/>
|
||||
<location filename="mainwindow.cpp" line="3854"/>
|
||||
<location filename="mainwindow.cpp" line="3868"/>
|
||||
<source>Confirm Convertion</source>
|
||||
<translation>确认转换</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3846"/>
|
||||
<location filename="mainwindow.cpp" line="3860"/>
|
||||
<location filename="mainwindow.cpp" line="3855"/>
|
||||
<location filename="mainwindow.cpp" line="3869"/>
|
||||
<source>The editing file will be saved using %1 encoding. <br />This operation can't be reverted. <br />Are you sure to continue?</source>
|
||||
<translation>当前编辑器中的文件将会使用%1编码保存。<br />这项操作无法被撤回。<br />你确定要继续吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4024"/>
|
||||
<location filename="mainwindow.cpp" line="4033"/>
|
||||
<source>New Watch Expression</source>
|
||||
<translation>新监视表达式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4025"/>
|
||||
<location filename="mainwindow.cpp" line="4034"/>
|
||||
<source>Enter Watch Expression (it is recommended to use 'this->' for class members):</source>
|
||||
<translation>输入监视表达式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4081"/>
|
||||
<location filename="mainwindow.cpp" line="4090"/>
|
||||
<source>Parsing file %1 of %2: "%3"</source>
|
||||
<translation>(%1/%2)正在解析文件"%3"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4103"/>
|
||||
<location filename="mainwindow.cpp" line="4109"/>
|
||||
<location filename="mainwindow.cpp" line="4112"/>
|
||||
<location filename="mainwindow.cpp" line="4118"/>
|
||||
<source>Done parsing %1 files in %2 seconds</source>
|
||||
<translation>完成%1个文件的解析,用时%2秒</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4106"/>
|
||||
<location filename="mainwindow.cpp" line="4115"/>
|
||||
<source>(%1 files per second)</source>
|
||||
<translation>(每秒%1个文件)</translation>
|
||||
</message>
|
||||
|
@ -4695,77 +4715,77 @@ Are you really want to continue?</source>
|
|||
<translation>无标题</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="521"/>
|
||||
<location filename="project.cpp" line="525"/>
|
||||
<source>Can't save file</source>
|
||||
<translation>无法保存文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="522"/>
|
||||
<location filename="project.cpp" line="526"/>
|
||||
<source>Can't save file '%1'</source>
|
||||
<translation>无法保存文件'%1'.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="674"/>
|
||||
<location filename="project.cpp" line="678"/>
|
||||
<source>Error Load File</source>
|
||||
<translation>载入文件错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="783"/>
|
||||
<location filename="project.cpp" line="787"/>
|
||||
<source>File Exists</source>
|
||||
<translation>文件已存在</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="784"/>
|
||||
<location filename="project.cpp" line="788"/>
|
||||
<source>File '%1' is already in the project</source>
|
||||
<translation>文件'%1'已在项目中</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1149"/>
|
||||
<location filename="project.cpp" line="1161"/>
|
||||
<source>Project Updated</source>
|
||||
<translation>项目已升级</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1150"/>
|
||||
<location filename="project.cpp" line="1162"/>
|
||||
<source>Your project was succesfully updated to a newer file format!</source>
|
||||
<translation>已成功将项目升级到新的格式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1152"/>
|
||||
<location filename="project.cpp" line="1164"/>
|
||||
<source>If something has gone wrong, we kept a backup-file: '%1'...</source>
|
||||
<translation>旧项目文件备份在'%1'。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1328"/>
|
||||
<location filename="project.cpp" line="1340"/>
|
||||
<source>Settings need update</source>
|
||||
<translation>设置需要更新</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1329"/>
|
||||
<location filename="project.cpp" line="1341"/>
|
||||
<source>The compiler settings format of Dev-C++ has changed.</source>
|
||||
<translation>Dev-C++的编译器设置格式已发生改变。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1331"/>
|
||||
<location filename="project.cpp" line="1343"/>
|
||||
<source>Please update your settings at Project >> Project Options >> Compiler and save your project.</source>
|
||||
<translation>请在项目 >> 项目属性 >> 编译器设置中修改您的设置并保存您的项目</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1367"/>
|
||||
<location filename="project.cpp" line="1379"/>
|
||||
<source>Compiler not found</source>
|
||||
<translation>未找到编译器</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1368"/>
|
||||
<location filename="project.cpp" line="1380"/>
|
||||
<source>The compiler set you have selected for this project, no longer exists.</source>
|
||||
<translation>您为该项目设置的编译器不存在。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1370"/>
|
||||
<location filename="project.cpp" line="1382"/>
|
||||
<source>It will be substituted by the global compiler set.</source>
|
||||
<translation>它将会被全局编译器设置代替。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1409"/>
|
||||
<location filename="project.cpp" line="1421"/>
|
||||
<source>Developed using the Red Panda Dev-C++ IDE</source>
|
||||
<translation>使用小熊猫Dev-C++编辑器开发</translation>
|
||||
</message>
|
||||
|
@ -5156,24 +5176,24 @@ Are you really want to continue?</source>
|
|||
<context>
|
||||
<name>ProjectModel</name>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1909"/>
|
||||
<location filename="project.cpp" line="1921"/>
|
||||
<source>File exists</source>
|
||||
<translation>文件已存在</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1910"/>
|
||||
<location filename="project.cpp" line="1922"/>
|
||||
<source>File '%1' already exists. Delete it now?</source>
|
||||
<translation>文件'%1'已存在。是否删除?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1928"/>
|
||||
<location filename="project.cpp" line="1948"/>
|
||||
<location filename="project.cpp" line="1940"/>
|
||||
<location filename="project.cpp" line="1960"/>
|
||||
<source>Remove failed</source>
|
||||
<translation>删除失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="project.cpp" line="1929"/>
|
||||
<location filename="project.cpp" line="1949"/>
|
||||
<location filename="project.cpp" line="1941"/>
|
||||
<location filename="project.cpp" line="1961"/>
|
||||
<source>Failed to remove file '%1'</source>
|
||||
<translation>无法删除文件'%1'</translation>
|
||||
</message>
|
||||
|
@ -6483,7 +6503,7 @@ Are you really want to continue?</source>
|
|||
<translation>自动链接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5407"/>
|
||||
<location filename="mainwindow.cpp" line="5428"/>
|
||||
<location filename="settingsdialog/settingsdialog.cpp" line="138"/>
|
||||
<location filename="settingsdialog/settingsdialog.cpp" line="182"/>
|
||||
<location filename="settingsdialog/settingsdialog.cpp" line="190"/>
|
||||
|
@ -6559,7 +6579,7 @@ Are you really want to continue?</source>
|
|||
<translation>杂项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5408"/>
|
||||
<location filename="mainwindow.cpp" line="5429"/>
|
||||
<location filename="settingsdialog/settingsdialog.cpp" line="182"/>
|
||||
<location filename="settingsdialog/settingsdialog.cpp" line="186"/>
|
||||
<source>Program Runner</source>
|
||||
|
|
|
@ -3211,6 +3211,15 @@ CPUDialog *MainWindow::cpuDialog() const
|
|||
|
||||
void MainWindow::on_actionNew_triggered()
|
||||
{
|
||||
if (mProject) {
|
||||
if (QMessageBox::question(this,
|
||||
tr("New Project File?"),
|
||||
tr("Do you want to add the new file to the project?"),
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
||||
newProjectUnitFile();
|
||||
return;
|
||||
}
|
||||
}
|
||||
newEditor();
|
||||
}
|
||||
|
||||
|
@ -4654,46 +4663,7 @@ void MainWindow::on_actionSaveAll_triggered()
|
|||
|
||||
void MainWindow::on_actionProject_New_File_triggered()
|
||||
{
|
||||
int idx = -1;
|
||||
if (!mProject)
|
||||
return;
|
||||
QModelIndex current = ui->projectView->currentIndex();
|
||||
FolderNode * node = nullptr;
|
||||
if (current.isValid()) {
|
||||
node = static_cast<FolderNode*>(current.internalPointer());
|
||||
}
|
||||
QString newFileName;
|
||||
do {
|
||||
newFileName = tr("untitled")+QString("%1").arg(getNewFileNumber());
|
||||
if (mProject->options().useGPP) {
|
||||
newFileName+=".cpp";
|
||||
} else {
|
||||
newFileName+=".c";
|
||||
}
|
||||
} while (fileExists(QDir(mProject->directory()).absoluteFilePath(newFileName)));
|
||||
|
||||
newFileName = QInputDialog::getText(
|
||||
this,
|
||||
tr("New Project File Name"),
|
||||
tr("File Name:"),
|
||||
QLineEdit::Normal,
|
||||
newFileName);
|
||||
if (newFileName.isEmpty())
|
||||
return;
|
||||
if (fileExists(QDir(mProject->directory()).absoluteFilePath(newFileName))) {
|
||||
QMessageBox::critical(this,tr("File Already Exists!"),
|
||||
tr("File '%1' already exists!").arg(newFileName));
|
||||
return;
|
||||
}
|
||||
PProjectUnit newUnit = mProject->newUnit(
|
||||
mProject->pointerToNode(node),newFileName);
|
||||
idx = mProject->units().count()-1;
|
||||
mProject->saveUnits();
|
||||
updateProjectView();
|
||||
Editor * editor = mProject->openUnit(idx);
|
||||
//editor->setUseCppSyntax(mProject->options().useGPP);
|
||||
//editor->setModified(true);
|
||||
editor->activate();
|
||||
newProjectUnitFile();
|
||||
}
|
||||
|
||||
|
||||
|
@ -4742,9 +4712,14 @@ void MainWindow::on_actionRemove_from_project_triggered()
|
|||
continue;
|
||||
selected.insert(folderNode->unitIndex);
|
||||
};
|
||||
|
||||
bool removeFile = (QMessageBox::question(this,tr("Remove file"),
|
||||
tr("Remove the file from disk?"),
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes);
|
||||
|
||||
for (int i=mProject->units().count()-1;i>=0;i--) {
|
||||
if (selected.contains(i)) {
|
||||
mProject->removeEditor(i,true);
|
||||
mProject->removeUnit(i,true,removeFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4952,6 +4927,50 @@ void MainWindow::prepareTabMessagesData()
|
|||
mTabMessagesData[widget]=info;
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::newProjectUnitFile()
|
||||
{
|
||||
if (!mProject)
|
||||
return;
|
||||
int idx = -1;
|
||||
QModelIndex current = ui->projectView->currentIndex();
|
||||
FolderNode * node = nullptr;
|
||||
if (current.isValid()) {
|
||||
node = static_cast<FolderNode*>(current.internalPointer());
|
||||
}
|
||||
QString newFileName;
|
||||
do {
|
||||
newFileName = tr("untitled")+QString("%1").arg(getNewFileNumber());
|
||||
if (mProject->options().useGPP) {
|
||||
newFileName+=".cpp";
|
||||
} else {
|
||||
newFileName+=".c";
|
||||
}
|
||||
} while (fileExists(QDir(mProject->directory()).absoluteFilePath(newFileName)));
|
||||
|
||||
newFileName = QInputDialog::getText(
|
||||
this,
|
||||
tr("New Project File Name"),
|
||||
tr("File Name:"),
|
||||
QLineEdit::Normal,
|
||||
newFileName);
|
||||
if (newFileName.isEmpty())
|
||||
return;
|
||||
if (fileExists(QDir(mProject->directory()).absoluteFilePath(newFileName))) {
|
||||
QMessageBox::critical(this,tr("File Already Exists!"),
|
||||
tr("File '%1' already exists!").arg(newFileName));
|
||||
return;
|
||||
}
|
||||
PProjectUnit newUnit = mProject->newUnit(
|
||||
mProject->pointerToNode(node),newFileName);
|
||||
idx = mProject->units().count()-1;
|
||||
mProject->saveUnits();
|
||||
updateProjectView();
|
||||
Editor * editor = mProject->openUnit(idx);
|
||||
//editor->setUseCppSyntax(mProject->options().useGPP);
|
||||
//editor->setModified(true);
|
||||
editor->activate();
|
||||
}
|
||||
void MainWindow::on_EditorTabsLeft_currentChanged(int)
|
||||
{
|
||||
Editor * editor = mEditorList->getEditor(-1,ui->EditorTabsLeft);
|
||||
|
@ -5383,9 +5402,10 @@ void MainWindow::on_treeFiles_doubleClicked(const QModelIndex &index)
|
|||
QString filepath = mFileSystemModel.filePath(index);
|
||||
QFileInfo file(filepath);
|
||||
if (file.isFile()) {
|
||||
Editor * editor = mEditorList->getEditorByFilename(filepath);
|
||||
if (editor) {
|
||||
editor->activate();
|
||||
if (getFileType(filepath)==FileType::Project) {
|
||||
openProject(filepath);
|
||||
} else {
|
||||
openFile(filepath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -226,6 +226,7 @@ private:
|
|||
void showHideMessagesTab(QWidget *widget, bool show);
|
||||
void prepareTabInfosData();
|
||||
void prepareTabMessagesData();
|
||||
void newProjectUnitFile();
|
||||
|
||||
private slots:
|
||||
void onAutoSaveTimeout();
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
<enum>QTabWidget::West</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="usesScrollButtons">
|
||||
<bool>true</bool>
|
||||
|
|
|
@ -340,7 +340,7 @@ void Project::rebuildNodes()
|
|||
emit nodesChanged();
|
||||
}
|
||||
|
||||
bool Project::removeEditor(int index, bool doClose)
|
||||
bool Project::removeUnit(int index, bool doClose , bool removeFile)
|
||||
{
|
||||
mModel.beginUpdate();
|
||||
auto action = finally([this]{
|
||||
|
@ -357,6 +357,10 @@ bool Project::removeEditor(int index, bool doClose)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (removeFile) {
|
||||
QFile::remove(unit->fileName());
|
||||
}
|
||||
|
||||
//if not fUnits.GetItem(index).fNew then
|
||||
PFolderNode node = unit->node();
|
||||
PFolderNode parent = node->parent.lock();
|
||||
|
@ -788,10 +792,17 @@ PProjectUnit Project::addUnit(const QString &inFileName, PFolderNode parentNode,
|
|||
newUnit = std::make_shared<ProjectUnit>(this);
|
||||
|
||||
// Set all properties
|
||||
newUnit->setEncoding(toByteArray(mOptions.encoding));
|
||||
newUnit->setFileName(QDir(directory()).filePath(inFileName));
|
||||
newUnit->setNew(false);
|
||||
newUnit->setEditor(nullptr);
|
||||
Editor * e= pMainWindow->editorList()->getOpenedEditorByFilename(newUnit->fileName());
|
||||
if (e) {
|
||||
newUnit->setEditor(e);
|
||||
newUnit->setEncoding(e->encodingOption());
|
||||
e->setInProject(true);
|
||||
} else {
|
||||
newUnit->setEditor(nullptr);
|
||||
newUnit->setEncoding(ENCODING_AUTO_DETECT);
|
||||
}
|
||||
newUnit->setFolder(getFolderPath(parentNode));
|
||||
newUnit->setNode(makeNewFileNode(extractFileName(newUnit->fileName()), false, parentNode));
|
||||
newUnit->node()->unitIndex = mUnits.count();
|
||||
|
@ -1515,7 +1526,7 @@ void Project::removeFolderRecurse(PFolderNode node)
|
|||
} else if (childNode->unitIndex >= 0 && childNode->level > 0) {
|
||||
// Remove editor in folder from project
|
||||
int editorIndex = childNode->unitIndex;
|
||||
if (!removeEditor(editorIndex,true))
|
||||
if (!removeUnit(editorIndex,true))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1920,7 +1931,7 @@ bool ProjectModel::setData(const QModelIndex &index, const QVariant &value, int
|
|||
// Remove it from the current project...
|
||||
int projindex = mProject->indexInUnits(newName);
|
||||
if (projindex>=0) {
|
||||
mProject->removeEditor(projindex,false);
|
||||
mProject->removeUnit(projindex,false);
|
||||
}
|
||||
|
||||
// All references to the file are removed. Delete the file from disk
|
||||
|
|
|
@ -148,7 +148,7 @@ public:
|
|||
const QString& customFileName="");
|
||||
Editor* openUnit(int index);
|
||||
void rebuildNodes();
|
||||
bool removeEditor(int index, bool doClose);
|
||||
bool removeUnit(int index, bool doClose, bool removeFile = false);
|
||||
bool removeFolder(PFolderNode node);
|
||||
void resetParserProjectFiles();
|
||||
void saveAll(); // save [Project] and all [UnitX]
|
||||
|
|
Loading…
Reference in New Issue