From 92ded932eca787c636413268f7282f173806c31c Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Tue, 21 Jul 2020 20:47:06 +0800 Subject: [PATCH] feat: add version info datat for windows, and application display name --- languages/PineapplePictures.ts | 47 +++++++++++++++------------- languages/PineapplePictures_zh_CN.ts | 47 +++++++++++++++------------- main.cpp | 2 ++ pineapple-pictures.rc | 18 ++++++++++- 4 files changed, 71 insertions(+), 43 deletions(-) diff --git a/languages/PineapplePictures.ts b/languages/PineapplePictures.ts index 3ca203e..bb76b77 100644 --- a/languages/PineapplePictures.ts +++ b/languages/PineapplePictures.ts @@ -12,22 +12,22 @@ GraphicsView - + File url list is empty - + File is not a valid image - + Image data is invalid - + Not supported mimedata: %1 @@ -35,74 +35,74 @@ MainWindow - + File url list is empty - + &Copy - + Copy P&ixmap - + Copy &File Path - + &Paste Image - + &Paste Image File - - + + Stay on top - - + + Protected mode - + Help - + Launch application with image file path as argument to load the file. - + Drag and drop image file onto the window is also supported. - + Context menu option explanation: - + Make window stay on top of all other windows. - + Avoid close window accidentally. (eg. by double clicking the window) @@ -110,7 +110,12 @@ main - + + Pineapple Pictures + + + + File list. diff --git a/languages/PineapplePictures_zh_CN.ts b/languages/PineapplePictures_zh_CN.ts index 869e85e..d37f278 100644 --- a/languages/PineapplePictures_zh_CN.ts +++ b/languages/PineapplePictures_zh_CN.ts @@ -12,22 +12,22 @@ GraphicsView - + File url list is empty 文件 URL 列表为空 - + File is not a valid image 文件不是有效的图片文件 - + Image data is invalid 图片数据无效 - + Not supported mimedata: %1 不受支持的 MimeData 格式:%1 @@ -35,12 +35,12 @@ MainWindow - + File url list is empty 文件 URL 列表为空 - + &Copy 复制(&C) @@ -49,64 +49,64 @@ 复制位图(&P) - + Copy P&ixmap 复制位图(&I) - + Copy &File Path 复制文件路径(&F) - + &Paste Image 粘贴图像(&P) - + &Paste Image File 粘贴图像文件(&P) - - + + Stay on top 总在最前 - - + + Protected mode 保护模式 - + Help 帮助 - + Launch application with image file path as argument to load the file. 以图片文件的路径作为参数运行程序即可直接打开图片文件。 - + Drag and drop image file onto the window is also supported. 也支持拖放图片文件到窗口内来加载图片。 - + Context menu option explanation: 菜单项说明: - + Make window stay on top of all other windows. 使窗口始终至于其它非置顶窗口上方。 - + Avoid close window accidentally. (eg. by double clicking the window) 避免窗口意外关闭。(如:不小心双击了窗口触发了关闭窗口行为) @@ -114,7 +114,12 @@ main - + + Pineapple Pictures + 菠萝看图 + + + File list. 文件列表。 diff --git a/main.cpp b/main.cpp index 1e0f95e..71da5e0 100644 --- a/main.cpp +++ b/main.cpp @@ -23,6 +23,8 @@ int main(int argc, char *argv[]) #endif translator.load(QString("PineapplePictures_%1").arg(QLocale::system().name()), qmDir); a.installTranslator(&translator); + a.setApplicationName("Pineapple Pictures"); + a.setApplicationDisplayName(QCoreApplication::translate("main", "Pineapple Pictures")); // parse commandline arguments QCommandLineParser parser; diff --git a/pineapple-pictures.rc b/pineapple-pictures.rc index e7dcd50..27ed133 100644 --- a/pineapple-pictures.rc +++ b/pineapple-pictures.rc @@ -1 +1,17 @@ -IDI_ICON1 ICON DISCARDABLE "icons/app-icon.ico" \ No newline at end of file +IDI_ICON1 ICON DISCARDABLE "icons/app-icon.ico" +1 VERSIONINFO +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "FileDescription", "Pineapple Pictures - Image Viewer" + VALUE "LegalCopyright", "MIT/Expat License - Copyright (C) 2020 Gary Wang" + VALUE "ProductName", "Pineapple Pictures" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END \ No newline at end of file