feat: add version info datat for windows, and application display name

This commit is contained in:
Gary Wang 2020-07-21 20:47:06 +08:00
parent cd942b4fcc
commit 92ded932ec
4 changed files with 71 additions and 43 deletions

View File

@ -12,22 +12,22 @@
<context>
<name>GraphicsView</name>
<message>
<location filename="../graphicsview.cpp" line="239"/>
<location filename="../graphicsview.cpp" line="243"/>
<source>File url list is empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../graphicsview.cpp" line="44"/>
<location filename="../graphicsview.cpp" line="46"/>
<source>File is not a valid image</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../graphicsview.cpp" line="247"/>
<location filename="../graphicsview.cpp" line="251"/>
<source>Image data is invalid</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../graphicsview.cpp" line="254"/>
<location filename="../graphicsview.cpp" line="258"/>
<source>Not supported mimedata: %1</source>
<translation type="unfinished"></translation>
</message>
@ -35,74 +35,74 @@
<context>
<name>MainWindow</name>
<message>
<location filename="../mainwindow.cpp" line="143"/>
<location filename="../mainwindow.cpp" line="173"/>
<source>File url list is empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="322"/>
<location filename="../mainwindow.cpp" line="382"/>
<source>&amp;Copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="343"/>
<location filename="../mainwindow.cpp" line="403"/>
<source>Copy P&amp;ixmap</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="348"/>
<location filename="../mainwindow.cpp" line="408"/>
<source>Copy &amp;File Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="358"/>
<location filename="../mainwindow.cpp" line="418"/>
<source>&amp;Paste Image</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="363"/>
<location filename="../mainwindow.cpp" line="424"/>
<source>&amp;Paste Image File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="368"/>
<location filename="../mainwindow.cpp" line="387"/>
<location filename="../mainwindow.cpp" line="429"/>
<location filename="../mainwindow.cpp" line="448"/>
<source>Stay on top</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="374"/>
<location filename="../mainwindow.cpp" line="388"/>
<location filename="../mainwindow.cpp" line="435"/>
<location filename="../mainwindow.cpp" line="449"/>
<source>Protected mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="380"/>
<location filename="../mainwindow.cpp" line="441"/>
<source>Help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="383"/>
<location filename="../mainwindow.cpp" line="444"/>
<source>Launch application with image file path as argument to load the file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="384"/>
<location filename="../mainwindow.cpp" line="445"/>
<source>Drag and drop image file onto the window is also supported.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="386"/>
<location filename="../mainwindow.cpp" line="447"/>
<source>Context menu option explanation:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="387"/>
<location filename="../mainwindow.cpp" line="448"/>
<source>Make window stay on top of all other windows.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="388"/>
<location filename="../mainwindow.cpp" line="449"/>
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
<translation type="unfinished"></translation>
</message>
@ -110,7 +110,12 @@
<context>
<name>main</name>
<message>
<location filename="../main.cpp" line="24"/>
<location filename="../main.cpp" line="27"/>
<source>Pineapple Pictures</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="31"/>
<source>File list.</source>
<translation type="unfinished"></translation>
</message>

View File

@ -12,22 +12,22 @@
<context>
<name>GraphicsView</name>
<message>
<location filename="../graphicsview.cpp" line="239"/>
<location filename="../graphicsview.cpp" line="243"/>
<source>File url list is empty</source>
<translation> URL </translation>
</message>
<message>
<location filename="../graphicsview.cpp" line="44"/>
<location filename="../graphicsview.cpp" line="46"/>
<source>File is not a valid image</source>
<translation></translation>
</message>
<message>
<location filename="../graphicsview.cpp" line="247"/>
<location filename="../graphicsview.cpp" line="251"/>
<source>Image data is invalid</source>
<translation></translation>
</message>
<message>
<location filename="../graphicsview.cpp" line="254"/>
<location filename="../graphicsview.cpp" line="258"/>
<source>Not supported mimedata: %1</source>
<translation> MimeData %1</translation>
</message>
@ -35,12 +35,12 @@
<context>
<name>MainWindow</name>
<message>
<location filename="../mainwindow.cpp" line="143"/>
<location filename="../mainwindow.cpp" line="173"/>
<source>File url list is empty</source>
<translation> URL </translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="322"/>
<location filename="../mainwindow.cpp" line="382"/>
<source>&amp;Copy</source>
<translation>(&amp;C)</translation>
</message>
@ -49,64 +49,64 @@
<translation type="vanished">(&amp;P)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="343"/>
<location filename="../mainwindow.cpp" line="403"/>
<source>Copy P&amp;ixmap</source>
<translation>(&amp;I)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="348"/>
<location filename="../mainwindow.cpp" line="408"/>
<source>Copy &amp;File Path</source>
<translation>(&amp;F)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="358"/>
<location filename="../mainwindow.cpp" line="418"/>
<source>&amp;Paste Image</source>
<translation>(&amp;P)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="363"/>
<location filename="../mainwindow.cpp" line="424"/>
<source>&amp;Paste Image File</source>
<translation>(&amp;P)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="368"/>
<location filename="../mainwindow.cpp" line="387"/>
<location filename="../mainwindow.cpp" line="429"/>
<location filename="../mainwindow.cpp" line="448"/>
<source>Stay on top</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="374"/>
<location filename="../mainwindow.cpp" line="388"/>
<location filename="../mainwindow.cpp" line="435"/>
<location filename="../mainwindow.cpp" line="449"/>
<source>Protected mode</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="380"/>
<location filename="../mainwindow.cpp" line="441"/>
<source>Help</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="383"/>
<location filename="../mainwindow.cpp" line="444"/>
<source>Launch application with image file path as argument to load the file.</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="384"/>
<location filename="../mainwindow.cpp" line="445"/>
<source>Drag and drop image file onto the window is also supported.</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="386"/>
<location filename="../mainwindow.cpp" line="447"/>
<source>Context menu option explanation:</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="387"/>
<location filename="../mainwindow.cpp" line="448"/>
<source>Make window stay on top of all other windows.</source>
<translation>使</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="388"/>
<location filename="../mainwindow.cpp" line="449"/>
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
<translation></translation>
</message>
@ -114,7 +114,12 @@
<context>
<name>main</name>
<message>
<location filename="../main.cpp" line="24"/>
<location filename="../main.cpp" line="27"/>
<source>Pineapple Pictures</source>
<translation></translation>
</message>
<message>
<location filename="../main.cpp" line="31"/>
<source>File list.</source>
<translation></translation>
</message>

View File

@ -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;

View File

@ -1 +1,17 @@
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