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

View File

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

View File

@ -23,6 +23,8 @@ int main(int argc, char *argv[])
#endif #endif
translator.load(QString("PineapplePictures_%1").arg(QLocale::system().name()), qmDir); translator.load(QString("PineapplePictures_%1").arg(QLocale::system().name()), qmDir);
a.installTranslator(&translator); a.installTranslator(&translator);
a.setApplicationName("Pineapple Pictures");
a.setApplicationDisplayName(QCoreApplication::translate("main", "Pineapple Pictures"));
// parse commandline arguments // parse commandline arguments
QCommandLineParser parser; QCommandLineParser parser;

View File

@ -1 +1,17 @@
IDI_ICON1 ICON DISCARDABLE "icons/app-icon.ico" 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