Skip to content

Commit 8a129a1

Browse files
committed
Fixes #25 and #26 - Icon now shows on Linux taskbar for AppImage install and About screen
1 parent ae599f9 commit 8a129a1

File tree

7 files changed

+33
-11
lines changed

7 files changed

+33
-11
lines changed

build/icon.icns

256 KB
Binary file not shown.

build/icon.png

-182 KB
Loading

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"electron-log": "^4.0.0",
3232
"electron-store": "^5.1.0",
3333
"electron-unhandled": "^3.0.0",
34-
"electron-util": "^0.13.0",
34+
"electron-util": "^0.14.0",
3535
"js-yaml": "^3.13.1",
3636
"node-exiftool": "^2.3.0",
3737
"serialize-javascript": "^2.1.1",

src/main/menu.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const showPreferences = () => {
1414
// Show the app's preferences here
1515
};
1616

17-
const helpSubmenu = [
17+
let helpSubmenu = [
1818
openUrlMenuItem({
1919
label: "Website",
2020
url: "https://exifcleaner.com"
@@ -43,14 +43,23 @@ ${debugInfo()}`;
4343
}
4444
];
4545

46+
function aboutMenuIconPath() {
47+
if (is.linux) {
48+
return path.join(__dirname, "../../exifcleaner.png");
49+
} else {
50+
return path.join(__dirname, "static", "icon.png");
51+
}
52+
}
53+
4654
if (!is.macos) {
4755
helpSubmenu.push(
4856
{
4957
type: "separator"
5058
},
5159
aboutMenuItem({
52-
icon: path.join(__dirname, "static", "icon.png"),
53-
text: "Created by szTheory"
60+
website: "https://exifcleaner.com",
61+
icon: aboutMenuIconPath(),
62+
copyright: "Copyright © szTheory"
5463
})
5564
);
5665
}

src/main/window_setup.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,23 @@ function mainWindowLoadUrl({ win }) {
4444
}
4545

4646
const createMainWindow = async function() {
47-
return new BrowserWindow({
47+
let options = {
4848
title: app.name,
4949
show: false,
5050
width: DEFAULT_WINDOW_WIDTH,
5151
height: DEFAULT_WINDOW_HEIGHT + 25,
5252
minWidth: DEFAULT_WINDOW_WIDTH,
5353
minHeight: DEFAULT_WINDOW_HEIGHT + 25,
5454
webPreferences: { nodeIntegration: true }
55-
});
55+
};
56+
57+
if (is.linux) {
58+
options = Object.assign({}, options, {
59+
icon: path.join(__dirname, "../../exifcleaner.png")
60+
});
61+
}
62+
63+
return new BrowserWindow(options);
5664
};
5765

5866
const setupMainWindow = function({ win }) {

static/icon.png

-182 KB
Loading

yarn.lock

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3063,11 +3063,16 @@ electron-is-accelerator@^0.1.0:
30633063
resolved "https://registry.yarnpkg.com/electron-is-accelerator/-/electron-is-accelerator-0.1.2.tgz#509e510c26a56b55e17f863a4b04e111846ab27b"
30643064
integrity sha1-UJ5RDCala1Xhf4Y6SwThEYRqsns=
30653065

3066-
electron-is-dev@^1.0.1, electron-is-dev@^1.1.0:
3066+
electron-is-dev@^1.0.1:
30673067
version "1.1.0"
30683068
resolved "https://registry.yarnpkg.com/electron-is-dev/-/electron-is-dev-1.1.0.tgz#b15a2a600bdc48a51a857d460e05f15b19a2522c"
30693069
integrity sha512-Z1qA/1oHNowGtSBIcWk0pcLEqYT/j+13xUw/MYOrBUOL4X7VN0i0KCTf5SqyvMPmW5pSPKbo28wkxMxzZ20YnQ==
30703070

3071+
electron-is-dev@^1.1.0:
3072+
version "1.2.0"
3073+
resolved "https://registry.yarnpkg.com/electron-is-dev/-/electron-is-dev-1.2.0.tgz#2e5cea0a1b3ccf1c86f577cee77363ef55deb05e"
3074+
integrity sha512-R1oD5gMBPS7PVU8gJwH6CtT0e6VSoD0+SzSnYpNm+dBkcijgA+K7VAMHDfnRq/lkKPZArpzplTW6jfiMYosdzw==
3075+
30713076
electron-localshortcut@^3.1.0:
30723077
version "3.2.1"
30733078
resolved "https://registry.yarnpkg.com/electron-localshortcut/-/electron-localshortcut-3.2.1.tgz#cfc83a3eff5e28faf98ddcc87f80a2ce4f623cd3"
@@ -3132,10 +3137,10 @@ electron-unhandled@^3.0.0:
31323137
ensure-error "^2.0.0"
31333138
lodash.debounce "^4.0.8"
31343139

3135-
electron-util@^0.13.0:
3136-
version "0.13.0"
3137-
resolved "https://registry.yarnpkg.com/electron-util/-/electron-util-0.13.0.tgz#bce9032ab07cab3bc3448451f2a48a766ef51cce"
3138-
integrity sha512-3jpvw72quwKMI5fBSE+9oQvtcBmjLZZq5wlOuUujEbV6gRD2Vzrfqmiu0PSwO7+ki7E6xsnrWHg85vMJ/rL/GA==
3140+
electron-util@^0.14.0:
3141+
version "0.14.1"
3142+
resolved "https://registry.yarnpkg.com/electron-util/-/electron-util-0.14.1.tgz#047095c9ac76582612e7e496b0b9c70b73e9ca6c"
3143+
integrity sha512-MvwYywBZ+8P3pSILIEuWHVcykxsaRZOE3iSfHZibfDem/lEK5L1V9UfykmCJJBVL2voJM0o+LdjfuKxtH5kjOQ==
31393144
dependencies:
31403145
electron-is-dev "^1.1.0"
31413146
new-github-issue-url "^0.2.1"

0 commit comments

Comments
 (0)