mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-29 02:11:28 -06:00
Merge pull request #203 from KiranNiranjan/ELECTRON-142
Electron-142 (Prevents multiple instances of about window)
This commit is contained in:
commit
124b705075
@ -44,6 +44,16 @@ function getTemplatePath() {
|
|||||||
* which this window should show
|
* which this window should show
|
||||||
*/
|
*/
|
||||||
function openAboutWindow(windowName) {
|
function openAboutWindow(windowName) {
|
||||||
|
|
||||||
|
// This prevents creating multiple instances of the
|
||||||
|
// about window
|
||||||
|
if (aboutWindow) {
|
||||||
|
if (aboutWindow.isMinimized()) {
|
||||||
|
aboutWindow.restore();
|
||||||
|
}
|
||||||
|
aboutWindow.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
let allWindows = BrowserWindow.getAllWindows();
|
let allWindows = BrowserWindow.getAllWindows();
|
||||||
allWindows = allWindows.find((window) => { return window.winName === windowName });
|
allWindows = allWindows.find((window) => { return window.winName === windowName });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user