Skip to content

Commit 92ded93

Browse files
committed
feat: add version info datat for windows, and application display name
1 parent cd942b4 commit 92ded93

File tree

4 files changed

+71
-43
lines changed

4 files changed

+71
-43
lines changed

languages/PineapplePictures.ts

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,105 +12,110 @@
1212
<context>
1313
<name>GraphicsView</name>
1414
<message>
15-
<location filename="../graphicsview.cpp" line="239"/>
15+
<location filename="../graphicsview.cpp" line="243"/>
1616
<source>File url list is empty</source>
1717
<translation type="unfinished"></translation>
1818
</message>
1919
<message>
20-
<location filename="../graphicsview.cpp" line="44"/>
20+
<location filename="../graphicsview.cpp" line="46"/>
2121
<source>File is not a valid image</source>
2222
<translation type="unfinished"></translation>
2323
</message>
2424
<message>
25-
<location filename="../graphicsview.cpp" line="247"/>
25+
<location filename="../graphicsview.cpp" line="251"/>
2626
<source>Image data is invalid</source>
2727
<translation type="unfinished"></translation>
2828
</message>
2929
<message>
30-
<location filename="../graphicsview.cpp" line="254"/>
30+
<location filename="../graphicsview.cpp" line="258"/>
3131
<source>Not supported mimedata: %1</source>
3232
<translation type="unfinished"></translation>
3333
</message>
3434
</context>
3535
<context>
3636
<name>MainWindow</name>
3737
<message>
38-
<location filename="../mainwindow.cpp" line="143"/>
38+
<location filename="../mainwindow.cpp" line="173"/>
3939
<source>File url list is empty</source>
4040
<translation type="unfinished"></translation>
4141
</message>
4242
<message>
43-
<location filename="../mainwindow.cpp" line="322"/>
43+
<location filename="../mainwindow.cpp" line="382"/>
4444
<source>&amp;Copy</source>
4545
<translation type="unfinished"></translation>
4646
</message>
4747
<message>
48-
<location filename="../mainwindow.cpp" line="343"/>
48+
<location filename="../mainwindow.cpp" line="403"/>
4949
<source>Copy P&amp;ixmap</source>
5050
<translation type="unfinished"></translation>
5151
</message>
5252
<message>
53-
<location filename="../mainwindow.cpp" line="348"/>
53+
<location filename="../mainwindow.cpp" line="408"/>
5454
<source>Copy &amp;File Path</source>
5555
<translation type="unfinished"></translation>
5656
</message>
5757
<message>
58-
<location filename="../mainwindow.cpp" line="358"/>
58+
<location filename="../mainwindow.cpp" line="418"/>
5959
<source>&amp;Paste Image</source>
6060
<translation type="unfinished"></translation>
6161
</message>
6262
<message>
63-
<location filename="../mainwindow.cpp" line="363"/>
63+
<location filename="../mainwindow.cpp" line="424"/>
6464
<source>&amp;Paste Image File</source>
6565
<translation type="unfinished"></translation>
6666
</message>
6767
<message>
68-
<location filename="../mainwindow.cpp" line="368"/>
69-
<location filename="../mainwindow.cpp" line="387"/>
68+
<location filename="../mainwindow.cpp" line="429"/>
69+
<location filename="../mainwindow.cpp" line="448"/>
7070
<source>Stay on top</source>
7171
<translation type="unfinished"></translation>
7272
</message>
7373
<message>
74-
<location filename="../mainwindow.cpp" line="374"/>
75-
<location filename="../mainwindow.cpp" line="388"/>
74+
<location filename="../mainwindow.cpp" line="435"/>
75+
<location filename="../mainwindow.cpp" line="449"/>
7676
<source>Protected mode</source>
7777
<translation type="unfinished"></translation>
7878
</message>
7979
<message>
80-
<location filename="../mainwindow.cpp" line="380"/>
80+
<location filename="../mainwindow.cpp" line="441"/>
8181
<source>Help</source>
8282
<translation type="unfinished"></translation>
8383
</message>
8484
<message>
85-
<location filename="../mainwindow.cpp" line="383"/>
85+
<location filename="../mainwindow.cpp" line="444"/>
8686
<source>Launch application with image file path as argument to load the file.</source>
8787
<translation type="unfinished"></translation>
8888
</message>
8989
<message>
90-
<location filename="../mainwindow.cpp" line="384"/>
90+
<location filename="../mainwindow.cpp" line="445"/>
9191
<source>Drag and drop image file onto the window is also supported.</source>
9292
<translation type="unfinished"></translation>
9393
</message>
9494
<message>
95-
<location filename="../mainwindow.cpp" line="386"/>
95+
<location filename="../mainwindow.cpp" line="447"/>
9696
<source>Context menu option explanation:</source>
9797
<translation type="unfinished"></translation>
9898
</message>
9999
<message>
100-
<location filename="../mainwindow.cpp" line="387"/>
100+
<location filename="../mainwindow.cpp" line="448"/>
101101
<source>Make window stay on top of all other windows.</source>
102102
<translation type="unfinished"></translation>
103103
</message>
104104
<message>
105-
<location filename="../mainwindow.cpp" line="388"/>
105+
<location filename="../mainwindow.cpp" line="449"/>
106106
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
107107
<translation type="unfinished"></translation>
108108
</message>
109109
</context>
110110
<context>
111111
<name>main</name>
112112
<message>
113-
<location filename="../main.cpp" line="24"/>
113+
<location filename="../main.cpp" line="27"/>
114+
<source>Pineapple Pictures</source>
115+
<translation type="unfinished"></translation>
116+
</message>
117+
<message>
118+
<location filename="../main.cpp" line="31"/>
114119
<source>File list.</source>
115120
<translation type="unfinished"></translation>
116121
</message>

languages/PineapplePictures_zh_CN.ts

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,35 @@
1212
<context>
1313
<name>GraphicsView</name>
1414
<message>
15-
<location filename="../graphicsview.cpp" line="239"/>
15+
<location filename="../graphicsview.cpp" line="243"/>
1616
<source>File url list is empty</source>
1717
<translation>文件 URL 列表为空</translation>
1818
</message>
1919
<message>
20-
<location filename="../graphicsview.cpp" line="44"/>
20+
<location filename="../graphicsview.cpp" line="46"/>
2121
<source>File is not a valid image</source>
2222
<translation>文件不是有效的图片文件</translation>
2323
</message>
2424
<message>
25-
<location filename="../graphicsview.cpp" line="247"/>
25+
<location filename="../graphicsview.cpp" line="251"/>
2626
<source>Image data is invalid</source>
2727
<translation>图片数据无效</translation>
2828
</message>
2929
<message>
30-
<location filename="../graphicsview.cpp" line="254"/>
30+
<location filename="../graphicsview.cpp" line="258"/>
3131
<source>Not supported mimedata: %1</source>
3232
<translation>不受支持的 MimeData 格式:%1</translation>
3333
</message>
3434
</context>
3535
<context>
3636
<name>MainWindow</name>
3737
<message>
38-
<location filename="../mainwindow.cpp" line="143"/>
38+
<location filename="../mainwindow.cpp" line="173"/>
3939
<source>File url list is empty</source>
4040
<translation>文件 URL 列表为空</translation>
4141
</message>
4242
<message>
43-
<location filename="../mainwindow.cpp" line="322"/>
43+
<location filename="../mainwindow.cpp" line="382"/>
4444
<source>&amp;Copy</source>
4545
<translation>复制(&amp;C)</translation>
4646
</message>
@@ -49,72 +49,77 @@
4949
<translation type="vanished">复制位图(&amp;P)</translation>
5050
</message>
5151
<message>
52-
<location filename="../mainwindow.cpp" line="343"/>
52+
<location filename="../mainwindow.cpp" line="403"/>
5353
<source>Copy P&amp;ixmap</source>
5454
<translation>复制位图(&amp;I)</translation>
5555
</message>
5656
<message>
57-
<location filename="../mainwindow.cpp" line="348"/>
57+
<location filename="../mainwindow.cpp" line="408"/>
5858
<source>Copy &amp;File Path</source>
5959
<translation>复制文件路径(&amp;F)</translation>
6060
</message>
6161
<message>
62-
<location filename="../mainwindow.cpp" line="358"/>
62+
<location filename="../mainwindow.cpp" line="418"/>
6363
<source>&amp;Paste Image</source>
6464
<translation>粘贴图像(&amp;P)</translation>
6565
</message>
6666
<message>
67-
<location filename="../mainwindow.cpp" line="363"/>
67+
<location filename="../mainwindow.cpp" line="424"/>
6868
<source>&amp;Paste Image File</source>
6969
<translation>粘贴图像文件(&amp;P)</translation>
7070
</message>
7171
<message>
72-
<location filename="../mainwindow.cpp" line="368"/>
73-
<location filename="../mainwindow.cpp" line="387"/>
72+
<location filename="../mainwindow.cpp" line="429"/>
73+
<location filename="../mainwindow.cpp" line="448"/>
7474
<source>Stay on top</source>
7575
<translation>总在最前</translation>
7676
</message>
7777
<message>
78-
<location filename="../mainwindow.cpp" line="374"/>
79-
<location filename="../mainwindow.cpp" line="388"/>
78+
<location filename="../mainwindow.cpp" line="435"/>
79+
<location filename="../mainwindow.cpp" line="449"/>
8080
<source>Protected mode</source>
8181
<translation>保护模式</translation>
8282
</message>
8383
<message>
84-
<location filename="../mainwindow.cpp" line="380"/>
84+
<location filename="../mainwindow.cpp" line="441"/>
8585
<source>Help</source>
8686
<translation>帮助</translation>
8787
</message>
8888
<message>
89-
<location filename="../mainwindow.cpp" line="383"/>
89+
<location filename="../mainwindow.cpp" line="444"/>
9090
<source>Launch application with image file path as argument to load the file.</source>
9191
<translation>以图片文件的路径作为参数运行程序即可直接打开图片文件。</translation>
9292
</message>
9393
<message>
94-
<location filename="../mainwindow.cpp" line="384"/>
94+
<location filename="../mainwindow.cpp" line="445"/>
9595
<source>Drag and drop image file onto the window is also supported.</source>
9696
<translation>也支持拖放图片文件到窗口内来加载图片。</translation>
9797
</message>
9898
<message>
99-
<location filename="../mainwindow.cpp" line="386"/>
99+
<location filename="../mainwindow.cpp" line="447"/>
100100
<source>Context menu option explanation:</source>
101101
<translation>菜单项说明:</translation>
102102
</message>
103103
<message>
104-
<location filename="../mainwindow.cpp" line="387"/>
104+
<location filename="../mainwindow.cpp" line="448"/>
105105
<source>Make window stay on top of all other windows.</source>
106106
<translation>使窗口始终至于其它非置顶窗口上方。</translation>
107107
</message>
108108
<message>
109-
<location filename="../mainwindow.cpp" line="388"/>
109+
<location filename="../mainwindow.cpp" line="449"/>
110110
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
111111
<translation>避免窗口意外关闭。(如:不小心双击了窗口触发了关闭窗口行为)</translation>
112112
</message>
113113
</context>
114114
<context>
115115
<name>main</name>
116116
<message>
117-
<location filename="../main.cpp" line="24"/>
117+
<location filename="../main.cpp" line="27"/>
118+
<source>Pineapple Pictures</source>
119+
<translation>菠萝看图</translation>
120+
</message>
121+
<message>
122+
<location filename="../main.cpp" line="31"/>
118123
<source>File list.</source>
119124
<translation>文件列表。</translation>
120125
</message>

main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ int main(int argc, char *argv[])
2323
#endif
2424
translator.load(QString("PineapplePictures_%1").arg(QLocale::system().name()), qmDir);
2525
a.installTranslator(&translator);
26+
a.setApplicationName("Pineapple Pictures");
27+
a.setApplicationDisplayName(QCoreApplication::translate("main", "Pineapple Pictures"));
2628

2729
// parse commandline arguments
2830
QCommandLineParser parser;

pineapple-pictures.rc

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-
IDI_ICON1 ICON DISCARDABLE "icons/app-icon.ico"
1+
IDI_ICON1 ICON DISCARDABLE "icons/app-icon.ico"
2+
1 VERSIONINFO
3+
BEGIN
4+
BLOCK "StringFileInfo"
5+
BEGIN
6+
BLOCK "040904E4"
7+
BEGIN
8+
VALUE "FileDescription", "Pineapple Pictures - Image Viewer"
9+
VALUE "LegalCopyright", "MIT/Expat License - Copyright (C) 2020 Gary Wang"
10+
VALUE "ProductName", "Pineapple Pictures"
11+
END
12+
END
13+
BLOCK "VarFileInfo"
14+
BEGIN
15+
VALUE "Translation", 0x409, 1200
16+
END
17+
END

0 commit comments

Comments
 (0)