From dd724e64c2e8b1ab612480750be4e51c5e5560fe Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sun, 6 Aug 2023 00:05:58 +0800 Subject: [PATCH] - enhancement: Show progress dialog if the time for searching compilers is too long. --- NEWS.md | 3 +- .../compilersetoptionwidget.cpp | 14 + RedPandaIDE/translations/RedPandaIDE_pt_BR.ts | 24 +- RedPandaIDE/translations/RedPandaIDE_zh_CN.ts | 713 +++++++++--------- RedPandaIDE/translations/RedPandaIDE_zh_TW.ts | 12 + 5 files changed, 406 insertions(+), 360 deletions(-) diff --git a/NEWS.md b/NEWS.md index e72ca32f..e1f06391 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,11 +4,12 @@ Red Panda C++ Version 2.24 - fix: memory view's cell size is too wide in linux. - fix: Code completion doesn't work if "min id length to show completion" is not 1. - fix: english typos. (thanks for sangiye0@github) - - fix: Goto definition/declaration may choose wrong symbol is multiple files are opened and symbols have the same name. + - fix: Goto definition/declaration may choose wrong symbol when multiple files are opened and symbols have the same name. - fix: "UTF-8 BOM" can't be correctly loaded as project file's encoding. - fix: Project file's encoding is not correctly updated after converted manually. - enhancement: Press left/right arrow will move caret to the begin/end of the selection. - enhancement: Press up/down arrow will move caret up/down from the begin/end of the selection. + - enhancement: Show progress dialog if the time for searching compilers is too long. Red Panda C++ Version 2.23 diff --git a/RedPandaIDE/settingsdialog/compilersetoptionwidget.cpp b/RedPandaIDE/settingsdialog/compilersetoptionwidget.cpp index a55c5808..4a24db38 100644 --- a/RedPandaIDE/settingsdialog/compilersetoptionwidget.cpp +++ b/RedPandaIDE/settingsdialog/compilersetoptionwidget.cpp @@ -20,6 +20,7 @@ #include "../mainwindow.h" #include "compilersetdirectorieswidget.h" #include +#include #include "../utils.h" #include "../iconsmanager.h" #include @@ -258,9 +259,22 @@ void CompilerSetOptionWidget::on_btnFindCompilers_clicked() if (QMessageBox::warning(this,tr("Confirm"),msg, QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok ) return; + QProgressDialog progressDlg( + tr("Searching for compilers..."), + tr("Abort"), + 0, + 1, + pMainWindow); + + progressDlg.setWindowModality(Qt::WindowModal); + progressDlg.setMaximum(3); + progressDlg.setLabelText(tr("Searching...")); pSettings->compilerSets().clearSets(); + progressDlg.setValue(1); pSettings->compilerSets().findSets(); + progressDlg.setValue(2); doLoad(); + progressDlg.setValue(3); setSettingsChanged(); if (pSettings->compilerSets().size()==0) { QMessageBox::warning(this,tr("Failed"),tr("Can't find any compiler.")); diff --git a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts index 29adc49e..e7538cc3 100644 --- a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts +++ b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts @@ -767,6 +767,18 @@ MB MB + + Searching for compilers... + + + + Abort + + + + Searching... + + CppRefacter @@ -1819,7 +1831,7 @@ Independent Red Panda C++ applications - Aplicativos independentes do Red Panda C++ + Aplicativos independentes do Red Panda C++ The same Red Panda C++ application @@ -1833,10 +1845,6 @@ Just check or uncheck for which file types Red Panda C++ wil be registered as the default application to open them ... Basta marcar ou desmarcar quais tipos de arquivos o Red Panda C++ irá registrar como aplicativos padrões para abrí-los ... - - Independent Red Panda C++ applications - - EnvironmentFoldersWidget @@ -2500,7 +2508,7 @@ Don't break multiple statements residing on one line - Não separar instruções múltiplas que estejam em uma mesma linha + Não separar instruções múltiplas que estejam em uma mesma linha Break return type from the function name in its declaration @@ -2538,10 +2546,6 @@ Insert empty lines arround unrelated blocks - - Don't break multiple statements residing on one line - - No minimal indent diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts index 4a431dd0..42b69fee 100644 --- a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts +++ b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts @@ -989,12 +989,12 @@ p, li { white-space: pre-wrap; } 选择性能分析器 - + Confirm 确认 - + Red Panda C++ will clear current compiler list and search for compilers in the following locations:<br /> '%1'<br /> '%2'<br />Are you really want to continue? Red Panda C++ will clear current compiler list and search for compilers in the following locations: '%1' @@ -1003,90 +1003,105 @@ Are you really want to continue? 小熊猫C++ 将会清除现有的编译器配置列表,然后在下列文件夹中搜索编译器:<br/> '%1'<br/> '%2'<br />你确定要继续吗? - + ANSI ANSI - + UTF-8 UTF-8 - + Red Panda C++ will clear current compiler list and search for compilers in the the PATH. <br />Are you really want to continue? 小熊猫C++ 将会清除现有的编译器配置列表,然后在PATH路径中搜索gcc编译器.<br />你确定要继续吗? - - + + Searching for compilers... + 正在搜索编译器…… + + + + Abort + 中止 + + + + Searching... + 正在查找... + + + + Failed 失败 - - + + Can't find any compiler. 找不到编译器 - - + + Compiler Set Name 编译器配置名称 - + Name 名称 - + Compiler Set Folder 编译器所在文件夹 - + New name 新名称 - + Locate C Compiler 定位C编译器 - - - - - - + + + + + + Executable files (*.exe) 可执行文件 (*.exe) - + Locate C++ Compiler 定位C++编译器 - + Locate Make 定位make程序 - + Locate GDB 定位gdb程序 - + Locate GDB Server 定位gdb server程序 - + Locate windres 定位windres程序 @@ -1467,13 +1482,13 @@ Are you really want to continue? 失败 - - - - - - - + + + + + + + Error 错误 @@ -1482,8 +1497,8 @@ Are you really want to continue? 无法写入文件"%1" - - + + Error Load File 载入文件错误 @@ -1512,54 +1527,54 @@ Are you really want to continue? 继续保存? - + Save As 另存为 - + File %1 already opened! 文件%1已经被打开! - + The text to be copied exceeds count limit! 要复制的内容超过了行数限制! - + The text to be copied exceeds character limit! 要复制的内容超过了字符数限制! - + The text to be cut exceeds count limit! 要剪切的内容超过了行数限制! - + The text to be cut exceeds character limit! 要剪切的内容超过了字符数限制! - + hex: %1 16进制: %1 - + dec: %1 十进制: %1 - + Print Document 打印文档 - - - + + + Ctrl+click for more info Ctrl+单击以获取更多信息 @@ -1568,27 +1583,27 @@ Are you really want to continue? 未找到符号'%1'! - + astyle not found 找不到astyle程序 - + Can't find astyle in "%1". 找不到astyle程序"%1". - + Break point condition 断点条件 - + Enter the condition of the breakpoint: 输入当前断点的生效条件: - + Readonly 只读 @@ -4348,7 +4363,7 @@ Are you really want to continue? - + @@ -4372,8 +4387,8 @@ Are you really want to continue? 工具 - + Run 运行 @@ -4385,25 +4400,25 @@ Are you really want to continue? - + Project 项目 - + Watch 监视 - + Structure 结构 - + Files 文件 @@ -4414,9 +4429,9 @@ Are you really want to continue? - - + + Debug 调试 @@ -4448,33 +4463,33 @@ Are you really want to continue? - - + + Search 查找 - + History: 历史: - + Search Again 重新查找 - + Replace with: 替换为: - + Replace 替换 - + Close 关闭 @@ -4508,71 +4523,71 @@ Are you really want to continue? 新建 - + Ctrl+N Ctrl+N - + Open... 打开... - + Ctrl+O Ctrl+O - + Save 保存 - + Ctrl+S Ctrl+S - + Save As... 另存为... - + Save As 另存为 - + Save All 全部保存 - + Ctrl+Shift+S Ctrl+Shift+S - + Options 选项 - + Compile 编译 - + Tools Output 工具输出 - + Choose Input File 选择输入文件 @@ -4596,7 +4611,7 @@ Are you really want to continue? 选择 - + F9 F9 @@ -4605,37 +4620,37 @@ Are you really want to continue? F10 - + Undo 撤销 - + Ctrl+Z Ctrl+Z - + Redo 重做 - + Ctrl+Y Ctrl+Y - + Cut 剪切 - + Ctrl+X Ctrl+X - + @@ -4643,85 +4658,85 @@ Are you really want to continue? 复制 - + Ctrl+C Ctrl+C - + Paste 粘贴 - + Ctrl+V Ctrl+V - + Select All 选择全部 - + Ctrl+A Ctrl+A - + Indent 缩进 - + UnIndent 取消缩进 - + Toggle Comment 切换注释 - + Ctrl+/ Ctrl+/ - + Collapse All 全部收起 - + Uncollapse All 全部展开 - + Encode in ANSI 使用ANSI编码 - + Encode in UTF-8 使用UTF-8编码 - + Auto Detect 自动检测 - + Convert to ANSI 转换为ANSI编码 - + Convert to UTF-8 转换为UTF-8编码 @@ -4730,55 +4745,55 @@ Are you really want to continue? 编译运行 - + F11 F11 - + Rebuild All 全部重编译 - + F12 F12 - + Stop Execution 停止执行 - + F6 F6 - + F5 F5 - + Step Over 单步跨过 - + F7 F7 - + Step Into 单步进入 - + Problem Set 试题集 @@ -4832,81 +4847,81 @@ Are you really want to continue? 地址表达式: - + Cancel 取消 - - + + TODO TODO - - + + Bookmark 书签 - - - + + + Problem 试题 - + Add Probem Case 添加试题案例 - + Remove Problem Case Remove Problem Set 删除试题集 - + Open Anwser Source File 打开答案源代码文件 - + Run All Cases Run Current Case 运行所有案例 - + Problem Cases Validation Options 测试案例验证选项 - + %v/%m %v/%m - + Output 输出 - + Input 输入 - + Expected 期望输出 @@ -4964,460 +4979,460 @@ Are you really want to continue? 消息 - + Open file in editors 在编辑器中打开文件 - + Choose Expected Output File 选择期望输出文件 - + Ignore Spaces 忽略空格 - + New C/C++ File 新建C/C++文件 - + New Source File 新建源代码文件 - + Ctrl+K, Ctrl+S - + Tab Tab - + Shift+Tab Shift+Tab - + F8 F8 - + Step Out 单步跳出 - + Ctrl+F8 Ctrl+F8 - + Run To Cursor 执行到光标处 - + Ctrl+F5 Ctrl+F5 - + Continue 继续执行 - + F4 F4 - + Add Watch... 添加监视 - + View CPU Window... 打开CPU信息窗口... - + Exit 退出 - + Find... 查找... - + Ctrl+F Ctrl+F - + Find in Files... 在文件中查找... - + Ctrl+Shift+F Ctrl+Shift+F - + Replace... 替换 - + Ctrl+R Ctrl+R - + Find Next 查找下一个 - + F3 F3 - + Find Previous 查找前一个 - + Shift+F3 Shift+F3 - + Remove Watch 删除监视值 - + Remove All Watches Remove All 删除全部监视值 - + Modify Watch... 修改监视值 - + Reformat Code 对代码重新排版 - + Ctrl+Shift+A Ctrl+Shift+A - + Go back 前一次编辑位置 - + Ctrl+Alt+Left Ctrl+Alt+Left - + Forward 后一次编辑位置 - + Ctrl+Alt+Right Ctrl+Alt+Right - + Ctrl+W Ctrl+W - + Close All 全部关闭 - + Ctrl+Shift+W Ctrl+Shift+W - + Maximize Editor 最大化编辑器 - + Ctrl+F11 Ctrl+F11 - + Next 下一窗口 - + Ctrl+Tab Ctrl+Tab - + Previous 前一窗口 - + Ctrl+Shift+Tab Ctrl+Shift+Tab - + Toggle breakpoint 切换断点 - + Ctrl+F4 Ctrl+F4 - + Clear all breakpoints 删除所有断点 - + Breakpoint property... 设置断点条件... - + Goto Declaration 跳转到声明处 - + Ctrl+Shift+G Ctrl+Shift+G - + Goto Definition 跳转到定义处 - + Ctrl+G Ctrl+G - + Find references 查找符号的引用 - + Open containing folder 打开所在的文件夹 - + Ctrl+B Ctrl+B - + Open a terminal here 打开命令行窗口 - + File Properties... 文件属性... - + Close Project 关闭项目 - + Project options 项目属性 - + New Project... 新建项目... - + New Project File 新建项目文件 - + Ctrl+F12 Ctrl+F12 - + F1 F1 - + New GAS File 新建GNU汇编文件 - + GNU Assembler Manual GNU汇编器手册 - + x86 Assembly Language Reference Manual X86汇编语言参考手册 - + IA-32 Assembly Language Reference Manual IA32汇编语言参考手册 - + Add Watchpoint... 添加变量断点... - + Add a watchpoint that's triggered when it's modified. 添加一个变量断点。当该变量的值被改动时程序暂停。 - + New Text File 新建文本文件 - + Page Up 向上翻页 - + Page Down 向下翻页 - + Goto Line Start 跳转到行首 - + Goto Line End 跳转到行尾 - + Goto File Start 跳转倒文件开头 - + Goto File End 跳转到文件结尾 - + Page Up and Select 向上翻页并选中 - + Page Down and Select 向下翻页并选中 - + Goto Page Start 跳转到页首 - + Goto Page End 跳转到页尾 - + Goto Page Start and Select 跳转到行首并选中 - + Goto Page End and Select 跳转到页尾并选中 - + Goto Line Start and Select 跳转到行首并选中 - + Goto Line End and Select 跳转到行尾并选中 - + Goto File Start and Select 跳转到文件开头并选中 - + Goto File End and Select 跳转到文件结尾并选中 - + Close Others 关闭其他窗口 - + OI Wiki OI Wiki - + Turtle Graphics Tutorial 海龟作图教程 @@ -5426,7 +5441,7 @@ Are you really want to continue? 关闭其他窗口 - + Move Selection Up 向上移动选中的行 @@ -5436,132 +5451,132 @@ Are you really want to continue? 移动光标 - + Ctrl+Shift+Up Ctrl+Shift+Up - + Move Selection Down 向下移动选中的行 - + Ctrl+Shift+Down Ctrl+Shift+Down - + Convert to UTF-8 BOM 转换为UTF-8 BOM编码 - + Encode in UTF-8 BOM 使用UTF-8 BOM编码 - + Compiler Options... 编译器选项... - + Toggle Explorer Panel 切换管理器面板 - + Ctrl+F9 Ctrl+F9 - + Toggle Messages Panel 切换消息面板 - + Ctrl+F10 Ctrl+F10 - + Raylib Manual Raylib教程 - + Select Word 选中当前单词 - + Go to Line... 跳转到行... - + New Template... 新建模板... - + New Template from Project 从项目创建模板 - + Goto block start 跳转到代码段开始 - + Ctrl+Alt+Up Ctrl+Alt+Up - + Goto block end 跳转到代码段结束 - + Ctrl+Alt+Down Ctrl+Alt+Down - + Switch header/source 切换头文件/源文件 - + Switch Header/Source 切换头文件/源文件 - + Generate Assembly 生成汇编 - + Trim trailing spaces 删除行尾空格 - + Toggle Readonly 切换只读模式 - + Submit Issues 反馈与建议 - + Document 使用说明 @@ -5575,194 +5590,194 @@ Are you really want to continue? 新建文件 - + Add to project... 添加到项目... - + Remove from project 从项目删除 - + View Makefile 查看Makefile - + Clean 清理构建文件 - + Open Folder in Explorer 在浏览器中打开 - + Open In Terminal 在终端中打开 - + About 关于 - + Rename Symbol 重命名符号 - + Shift+F6 Shift+F6 - + Print... 打印... - + Ctrl+P Ctrl+P - + Export As RTF 导出为RTF - + Export As HTML 导出为HTML - + Move To Other View 移动到其他视图 - + Ctrl+M Ctrl+M - + C++ Reference C++参考手册 - + C Reference C参考手册 - + Show Tool Panels 显示全部工具面板 - + Create Git Repository Create Repository 创建Git仓库 - + Commit 提交(Commit) - + Revert 撤销(Revert) - + Reset 回滚(Reset) - + Add Files 添加文件 - + Restore 还原(Restore) - + Website 官方网站 - + Branch/Switch 分支切换(Switch) - + Merge 合并(Merge) - + Show Log Log 显示日志(Log) - + Remotes... 远程仓库... - + Fetch 取回(Fetch) - + Pull 拉取(Pull) - + Push 推送(Push) - + Hide Non Support Files 隐藏不支持的文件 - + Toggle Block Comment 切换块注释 - + Alt+Shift+A Alt+Shift+A - + Match Bracket 匹配当前括号 - + Ctrl+] Ctrl+] @@ -5771,50 +5786,50 @@ Are you really want to continue? 工具窗口栏 - + Status Bar 状态栏 - + Ctrl+Backspace Ctrl+Backspace - + Interrupt 中断 - + Delete To Word Begin 删除到单词开头 - + Ctrl+Shift+B Ctrl+Shift+B - + Delete to Word End 删除到单词结尾 - + Ctrl+Shift+E Ctrl+Shift+E - + New Class... Add Class... 新建类... - + New Header... New Header 新建头文件... @@ -5824,47 +5839,47 @@ Are you really want to continue? 插入行 - + Delete Line 删除当前行 - + Ctrl+D Ctrl+D - + Duplicate Line 复制当前行 - + Ctrl+E Ctrl+E - + Delete Word 删除当前单词 - + Ctrl+Shift+D Ctrl+Shift+D - + Delete to EOL 删除到行尾 - + Ctrl+Del Ctrl+Del - + Delete to BOL 删除到行首 @@ -5873,27 +5888,27 @@ Are you really want to continue? C/C++参考 - + EGE Manual EGE图形库手册 - + Add Bookmark 添加书签 - + Remove Bookmark 删除书签 - + Modify Bookmark Description 修改书签说明 - + Locate in Files View 在文件视图中定位 @@ -5902,7 +5917,7 @@ Are you really want to continue? 打开文件夹 - + Running Parameters... 运行参数... @@ -6216,9 +6231,9 @@ Are you really want to continue? 模板%1已存在。是否覆盖? - - + + @@ -6900,8 +6915,8 @@ Are you really want to continue? 第%1行 - + Choose Working Folder 选择工作文件夹 @@ -7715,105 +7730,105 @@ Are you really want to continue? 无法保存文件'%1'. - + Error Load File 载入文件错误 - - + + Error 错误 - + Can't create folder %1 无法创建文件夹%1 - + Warning 警告 - - + + Can't save file %1 无法保存文件%1 - + File Exists 文件已存在 - + File '%1' is already in the project 文件'%1'已在项目中 - + Project Updated 项目已升级 - + Your project was succesfully updated to a newer file format! 已成功将项目升级到新的格式 - + If something has gone wrong, we kept a backup-file: '%1'... 旧项目文件备份在'%1'。 - + Headers 头文件 - + Sources 源文件 - + Others 其他文件 - + Settings need update 设置需要更新 - + The compiler settings format of Red Panda C++ has changed. The compiler settings format of Dev-C++ has changed. 小熊猫C++的编译器设置格式已发生改变。 - + Please update your settings at Project >> Project Options >> Compiler and save your project. 请在项目 >> 项目属性 >> 编译器设置中修改您的设置并保存您的项目 - + Compiler not found 未找到编译器 - + The compiler set you have selected for this project, no longer exists. 您为该项目设置的编译器不存在。 - + It will be substituted by the global compiler set. 它将会被全局编译器设置代替。 - + Developed using the Red Panda C++ IDE Developed using the Red Panda Dev-C++ IDE 使用小熊猫C++编辑器开发 @@ -8335,32 +8350,32 @@ Are you really want to continue? ProjectModel - + File exists 文件已存在 - + File '%1' already exists. Delete it now? 文件'%1'已存在。是否删除? - + Remove failed 删除失败 - + Failed to remove file '%1' 无法删除文件'%1' - + Rename failed 改名失败 - + Failed to rename file '%1' to '%2' 无法将文件'%1'改名为'%2' @@ -8961,32 +8976,32 @@ Are you really want to continue? 您需要小熊猫C++在下列位置搜索编译器吗:<br />%1<br />%2 - + Binaries 二进制文件 - + Libraries 库文件 - + C Includes C包含文件 - + C++ Includes C++包含文件 - + Remove 删除 - + Do you really want to remove "%1"? 您确定要删除"%1"吗? @@ -9312,12 +9327,12 @@ Are you really want to continue? 无标题 - + constructor 构造函数 - + destructor 析构函数 diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts index d81861c8..f4080cdc 100644 --- a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts +++ b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts @@ -656,6 +656,18 @@ Locate windres + + Searching for compilers... + + + + Abort + + + + Searching... + + CppRefacter