replace console tray icons
BIN
console/resources/console-tray-Template.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
console/resources/console-tray-Template@2x.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 5.7 KiB |
|
@ -16,8 +16,12 @@ var ProcessGroupStates = hfprocess.ProcessGroupStates;
|
||||||
|
|
||||||
const ipcMain = electron.ipcMain;
|
const ipcMain = electron.ipcMain;
|
||||||
|
|
||||||
|
const osType = os.type();
|
||||||
|
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var TRAY_ICON = path.join(__dirname, '../resources/console-tray.png');
|
|
||||||
|
const TRAY_FILENAME = (osType == "Darwin" ? "console-tray-Template.png" : "console-tray.png");
|
||||||
|
const TRAY_ICON = path.join(__dirname, '../resources/' + TRAY_FILENAME);
|
||||||
|
|
||||||
// print out uncaught exceptions in the console
|
// print out uncaught exceptions in the console
|
||||||
process.on('uncaughtException', console.log.bind(console));
|
process.on('uncaughtException', console.log.bind(console));
|
||||||
|
@ -52,12 +56,11 @@ if (argv.localDebugBuilds || argv.localReleaseBuilds) {
|
||||||
// TODO: show an error for the binaries that couldn't be found
|
// TODO: show an error for the binaries that couldn't be found
|
||||||
|
|
||||||
function openFileBrowser(path) {
|
function openFileBrowser(path) {
|
||||||
var type = os.type();
|
if (osType == "Windows_NT") {
|
||||||
if (type == "Windows_NT") {
|
|
||||||
childProcess.exec('start ' + path);
|
childProcess.exec('start ' + path);
|
||||||
} else if (type == "Darwin") {
|
} else if (osType == "Darwin") {
|
||||||
childProcess.exec('open ' + path);
|
childProcess.exec('open ' + path);
|
||||||
} else if (type == "Linux") {
|
} else if (osType == "Linux") {
|
||||||
childProcess.exec('xdg-open ' + path);
|
childProcess.exec('xdg-open ' + path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,7 +164,6 @@ function updateMenuArray(menuArray, serverState) {
|
||||||
function updateTrayMenu(serverState) {
|
function updateTrayMenu(serverState) {
|
||||||
if (tray) {
|
if (tray) {
|
||||||
var menuArray = buildMenuArray(serverState);
|
var menuArray = buildMenuArray(serverState);
|
||||||
console.log(menuArray);
|
|
||||||
tray.setContextMenu(Menu.buildFromTemplate(menuArray));
|
tray.setContextMenu(Menu.buildFromTemplate(menuArray));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|