Clean up menus and unused menu items

This commit is contained in:
2026-04-22 16:53:23 +02:00
parent 3db9e547e9
commit 87ea5e5ee4
+30 -8
View File
@@ -1,5 +1,33 @@
const { app, BrowserWindow, Menu, dialog, ipcMain, fs } = require('electron');
function showAboutDialog(parentWindow) {
const detail = [
'TRIM.SP simulation GUI for low-energy ion implantation studies.',
`Version: ${app.getVersion()}`,
'License: GNU General Public License v2 (GPL-2.0).',
'Maintained by the Low Energy Muons group at the Paul Scherrer Institute.',
'Main contributor: Zaher Salman.',
'',
'Key references:',
'J. P. Biersack and W. Eckstein, Appl. Phys. A 34, 73-94 (1984).',
'W. Eckstein, Computer Simulation of Ion-Solid Interactions (1991).',
'E. Morenzoni et al., NIM B 192, 245-266 (2002).',
'',
'Project repositories:',
'Bitbucket: bitbucket.org/zaher-salman/trimsp',
'Gitea: gitea.psi.ch/LMU/TRIMSP'
].join('\n');
dialog.showMessageBox(parentWindow, {
type: 'info',
title: 'About TrimSP',
message: 'TrimSP',
detail: detail,
buttons: ['OK'],
icon: parentWindow ? undefined : undefined
});
}
// Some Linux/remote desktop setups expose a broken GPU context to Electron.
// Fall back to software rendering instead of crashing on startup.
app.disableHardwareAcceleration();
@@ -214,18 +242,12 @@ function createWindow () {
{
role: 'viewMenu'
},
{
role: 'windowMenu'
},
{
role: 'help',
submenu: [
{
role: 'about'
},
{
label: 'Learn More',
click () { require('electron').shell.openExternal('http://electron.atom.io') }
label: 'About TrimSP',
click () { showAboutDialog(win); }
}
]
}