diff --git a/NEWS.md b/NEWS.md index a31c6efa..49547360 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,7 @@ Red Panda C++ Version 0.13.1 - enhancement: suppoort localization info in project templates - change: template / project files use utf-8 encoding instead of ANSI - + - fix: .rc file shouldn't be syntax checked Red Panda C++ Version 0.12.7 - change: make current build system follow FHS specifications diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index c56d9121..253c592e 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -478,9 +478,10 @@ void MainWindow::updateCompileActions() Editor * e = mEditorList->getEditor(); if (e) { FileType fileType = getFileType(e->filename()); + qDebug()<<(int)fileType<isNew(); if (fileType == FileType::CSource || fileType == FileType::CppSource || e->isNew()) - editorCanCompile = true; + editorCanCompile = true; } if (mCompilerManager->compiling() || mCompilerManager->running() || mDebugger->executing() || (!hasProject && !editorCanCompile) ) { @@ -1323,7 +1324,12 @@ void MainWindow::checkSyntaxInBack(Editor *e) // if not devEditor.AutoCheckSyntax then // Exit; //not c or cpp file - if (!e->highlighter() || e->highlighter()->getName()!=SYN_HIGHLIGHTER_CPP) + FileType fileType = getFileType(e->filename()); + if (fileType != FileType::CSource + && fileType != FileType::CppSource + && fileType != FileType::CHeader + && fileType != FileType::CppHeader + ) return; if (mCompilerManager->backgroundSyntaxChecking()) return; diff --git a/templates/1-WinApp.template b/templates/1-WinApp.template index 8934e79a..8b9dc2db 100644 --- a/templates/1-WinApp.template +++ b/templates/1-WinApp.template @@ -1,5 +1,5 @@ [Template] -ver=1 +ver=2 Name=Windows Application Name[zh_CN]=Windows应用程序 Icon=Windows.ico diff --git a/templates/2-ConsoleApp.template b/templates/2-ConsoleApp.template index 16af38da..d36ab83b 100644 --- a/templates/2-ConsoleApp.template +++ b/templates/2-ConsoleApp.template @@ -1,5 +1,5 @@ [Template] -ver=1 +ver=2 Name=Console Application Name[zh_CN]=控制台程序 Icon=ConsoleToo.ico diff --git a/templates/3-StaticLib.template b/templates/3-StaticLib.template index a2581c18..1912820f 100644 --- a/templates/3-StaticLib.template +++ b/templates/3-StaticLib.template @@ -1,9 +1,12 @@ [Template] -ver=1 +ver=2 Name=Static Library +Name[zh_CN]=静态链接库 Icon=StaticLib.ico Description=A static library (.a) +Description[zh_CN]=静态链接库(.a) Category=Basic +Category[zh_CN]=基础 [Unit0] CName= diff --git a/templates/4-DLL.template b/templates/4-DLL.template index 4e88c3ec..be9d32fa 100644 --- a/templates/4-DLL.template +++ b/templates/4-DLL.template @@ -1,9 +1,12 @@ [Template] -ver=1 +ver=2 Name=DLL +Name[zh_CN]=动态链接库 Icon=DLL.ico Description=A Dynamic Link Library (DLL) +Description[zh_CN]=动态链接库(DLL) Category=Basic +Category[zh_CN]=基础 [Unit0] CName=dllmain.c diff --git a/templates/5-Empty.template b/templates/5-Empty.template index e85cc803..7ff67157 100644 --- a/templates/5-Empty.template +++ b/templates/5-Empty.template @@ -1,9 +1,12 @@ [Template] -ver=1 +ver=2 Name=Empty Project +Name[zh_CN]=空项目 Icon=Empty.ico Description=An empty project +Description[zh_CN]=一个空项目 Category=Basic +Category[zh_CN]=基础 [Unit0] CName= diff --git a/templates/CL_GLUT.template b/templates/CL_GLUT.template index a21ae8d7..91ba4527 100644 --- a/templates/CL_GLUT.template +++ b/templates/CL_GLUT.template @@ -1,12 +1,16 @@ [Template] -ver=1 +ver=2 Name=GLUT Icon=CL_GLUT.ico Description=A simple GLUT program +Description[zh_CN]=一个简单的GLUT程序 Category=Multimedia +Category[zh_CN]=多媒体 + [Unit0] CppName=main.cpp C=CL_GLUT_cpp.txt + [Project] UnitCount=1 Type=0 diff --git a/templates/CL_Graphics.template b/templates/CL_Graphics.template index 63620c6a..c3fe249f 100644 --- a/templates/CL_Graphics.template +++ b/templates/CL_Graphics.template @@ -1,12 +1,16 @@ [Template] -ver=1 +ver=2 Name=Graphics.h Icon=CL_Graphics.ico Description=A simple program use Easy Graphics Engine +Description[zh_CN]=使用EGE库的简单绘图程序 Category=Multimedia +Category[zh_CN]=多媒体 + [Unit0] CppName=main.cpp Cpp=CL_Graphics_cpp.txt + [Project] UnitCount=1 Type=0 diff --git a/templates/CL_Turtle.template b/templates/CL_Turtle.template index 375babb0..5bf6697d 100644 --- a/templates/CL_Turtle.template +++ b/templates/CL_Turtle.template @@ -1,12 +1,17 @@ [Template] -ver=1 +ver=2 Name=Turtle Graphics +Name[zh_CN]=海龟作图 Icon=CL_Turtle.ico -Description=A simple program using Turtle Graphics (https://github.com/royqh1979/libturtle) +Description=A simple program using Turtle Graphics +Description[zh_CN]=简单的海龟作图程序 (https://github.com/royqh1979/libturtle) Category=Multimedia +Category[zh_CN]=多媒体 + [Unit0] CppName=main.cpp Cpp=CL_Turtle_cpp.txt + [Project] UnitCount=1 Type=0 diff --git a/templates/FileEditor.template b/templates/FileEditor.template index 5b5069a3..e7d5a136 100644 --- a/templates/FileEditor.template +++ b/templates/FileEditor.template @@ -1,8 +1,10 @@ [Template] -ver=1 +ver=2 Name=File Editor +Name[zh_CN]=文件编辑器 Icon=Editor.ico Description=A simple Win32 file editor +Description[zh_CN]=一个简单的Win32文件编辑器 Category=Win32 [Unit0] diff --git a/templates/GLFW.template b/templates/GLFW.template index 39db788a..12b9d6a8 100644 --- a/templates/GLFW.template +++ b/templates/GLFW.template @@ -2,20 +2,27 @@ ver=2 Name=GLFW Description=A simple GLFW program +Description[zh_CN]=一个简单的GLFW程序 Icon=GLFW.ico Category=Multimedia +Category[zh_CN]=多媒体 + [Unit0] CppName=main.cpp Cpp=GLFW_main.cpp.txt + [Unit1] CppName=shader.h Cpp=GLFW_shader.h.txt + [Unit2] CppName=shader.frag Cpp=GLFW_shader.frag.txt + [Unit3] CppName=shader.vs Cpp=GLFW_shader.vs.txt + [Project] UnitCount=4 Type=1 diff --git a/templates/Hello.template b/templates/Hello.template index 109c3e3d..904a6fb8 100644 --- a/templates/Hello.template +++ b/templates/Hello.template @@ -1,9 +1,12 @@ [Template] -ver=1 +ver=2 Name=Hello World +Name[zh_CN]=世界,你好! Icon=Communication.ico Description=A classic Hello World program +Description[zh_CN]=一个经典的“世界,你好!”程序 Category=Console +Category=控制台 [Unit0] CName=main.c diff --git a/templates/HelloInput.template b/templates/HelloInput.template index dee27449..200c3401 100644 --- a/templates/HelloInput.template +++ b/templates/HelloInput.template @@ -1,9 +1,12 @@ [Template] -ver=1 +ver=2 Name=Input Loop +Name[zh_CN]=输入循环 Icon=ConsoleToo.ico Description=A console with an input loop +Description[zh_CN]=一个带输入循环的控制台程序 Category=Console +Category[zh_CN]=控制台 [Unit0] CName=main.c diff --git a/templates/Jackpot.template b/templates/Jackpot.template index 13b23d70..cbf73766 100644 --- a/templates/Jackpot.template +++ b/templates/Jackpot.template @@ -1,9 +1,11 @@ [Template] -ver=1 +ver=2 Name=Jackpot Icon=Games.ico Description=A number guessing game +Description[zh_CN]=一个数字猜测游戏 Category=Console +Category[zh_CN]=控制台 [Unit0] CName=main.c diff --git a/templates/MDIEditor.template b/templates/MDIEditor.template index a8e01c64..605ace77 100644 --- a/templates/MDIEditor.template +++ b/templates/MDIEditor.template @@ -1,8 +1,10 @@ [Template] -ver=1 +ver=2 Name=MDI Editor +Name[zh_CN]=MDI编辑器 Icon=Windows.ico Description=A Win32 MDI file editor +Description[zh_CN]=一个Win32多文档界面(MDI)文件编辑器 Category=Win32 [Unit0] diff --git a/templates/OpenGL.template b/templates/OpenGL.template index babfc42d..3fb4dc52 100644 --- a/templates/OpenGL.template +++ b/templates/OpenGL.template @@ -1,9 +1,11 @@ [Template] -ver=1 +ver=2 Name=OpenGL Icon=Pizza.ico Description=A basic OpenGL program +Description[zh_CN]=一个基本的OpenGL程序 Category=Multimedia +Category[zh_CN]=多媒体 [Unit0] CName=main.c diff --git a/templates/OpenMP.template b/templates/OpenMP.template index 138623d0..590417cf 100644 --- a/templates/OpenMP.template +++ b/templates/OpenMP.template @@ -1,9 +1,11 @@ [Template] -ver=1 +ver=2 Name=OpenMP Icon=File Management.ico Description=A OpenMP multithreading example +Description[zh_CN]=一个OpenMP多线程示例 Category=Console +Category[zh_CN]=控制台 [Unit0] CName=main.c diff --git a/templates/Single Dialog Application.template b/templates/Single Dialog Application.template index 951798d5..5a622159 100644 --- a/templates/Single Dialog Application.template +++ b/templates/Single Dialog Application.template @@ -1,15 +1,20 @@ [Template] -ver=1 +ver=2 Name=Single Dialog Application +Name[zh_CN]=单对话框应用程序 Icon=Single Dialog Application.ico Description=An Appliction use a dialog as the main UI +Description[zh_CN]=使用一个对话框作为主用户界面简单程序 Category=Win32 + [Unit0] CName=main.c C=Single_Dialog_Application_main.c.txt + [Unit1] CName=resource.rc C=Single_Dialog_Application_resource.rc.txt + [Unit2] CName=resource.h C=Single_Dialog_Application_resource.h.txt diff --git a/templates/StdThread.template b/templates/StdThread.template index 6ff2eb2e..050e0a80 100644 --- a/templates/StdThread.template +++ b/templates/StdThread.template @@ -1,9 +1,11 @@ [Template] -ver=1 +ver=2 Name=std::thread Icon=Software.ico Description=A C++ multithreading example +Description[zh_CN]=一个C++多线程示例 Category=Console +Category[zh_CN]=控制台 [Unit0] CName=main.c diff --git a/templates/WinAnim.template b/templates/WinAnim.template index dc61d4ab..a3ef1cf7 100644 --- a/templates/WinAnim.template +++ b/templates/WinAnim.template @@ -1,8 +1,10 @@ [Template] -ver=1 +ver=2 Name=Animation Example +Name[zh_CN]=动画示例 Icon=Windows.ico Description=A Win32 painting example +Description[zh_CN]=一个Win32绘图示例 Category=Win32 [Unit0]