@@ -19,6 +19,12 @@ const Protos = require('./helpers/protos.js')([{
1919 ]
2020} ] ) ;
2121
22+ const browserWindowOptions = { } ;
23+
24+ if ( process . platform === "linux" ) {
25+ browserWindowOptions . icon = path . join ( `${ __dirname } /icons/icon.png` ) ;
26+ }
27+
2228const IS_PORTABLE = process . env . PORTABLE_EXECUTABLE_DIR != null ;
2329const USER_DATA = IS_PORTABLE ? path . join ( process . env . PORTABLE_EXECUTABLE_DIR , process . env . PORTABLE_EXECUTABLE_APP_FILENAME + '-data' ) : app . getPath ( 'userData' ) ;
2430const SETTINGS_PATH = path . join ( USER_DATA , 'settings.json' ) ;
@@ -72,6 +78,7 @@ async function openDB() {
7278 let pass = await new Promise ( ( resolve , reject ) => {
7379 passwordPromptResponse = null ;
7480 let promptWindow = new BrowserWindow ( {
81+ ...browserWindowOptions ,
7582 webPreferences : {
7683 preload : path . join ( __dirname , 'preload.js' ) ,
7784 contextIsolation : true ,
@@ -162,6 +169,7 @@ var mainWindowCreated = false;
162169function createWindow ( ) {
163170
164171 win = new BrowserWindow ( {
172+ ...browserWindowOptions ,
165173 webPreferences : {
166174 preload : path . join ( __dirname , 'preload.js' ) ,
167175 contextIsolation : true ,
@@ -225,6 +233,7 @@ ipcMain.handle('encryption:setup', async () => {
225233 let pass = await new Promise ( ( resolve , reject ) => {
226234 passwordPromptResponse = null ;
227235 let promptWindow = new BrowserWindow ( {
236+ ...browserWindowOptions ,
228237 parent : win ,
229238 modal : true ,
230239 webPreferences : {
@@ -290,6 +299,7 @@ ipcMain.handle('encryption:remove', async () => {
290299 let pass = await new Promise ( ( resolve , reject ) => {
291300 passwordPromptResponse = null ;
292301 let promptWindow = new BrowserWindow ( {
302+ ...browserWindowOptions ,
293303 parent : win ,
294304 modal : true ,
295305 webPreferences : {
0 commit comments