@@ -7,8 +7,6 @@ const tray = require('./tray');
7
7
const AutoLaunch = require ( 'auto-launch' ) ;
8
8
// Configuration
9
9
const Config = require ( 'electron-store' ) ;
10
- // Development
11
- const isDev = require ( 'electron-is-dev' ) ;
12
10
// Updater
13
11
const updater = require ( './updater' ) ;
14
12
// File System
@@ -30,7 +28,7 @@ const config = new Config({
30
28
, hide_menu_bar : false
31
29
, tabbar_location : 'top'
32
30
, window_display_behavior : 'taskbar_tray'
33
- , auto_launch : ! isDev
31
+ , auto_launch : false
34
32
, flash_frame : true
35
33
, window_close_behavior : 'keep_in_tray'
36
34
, start_minimized : false
@@ -75,24 +73,22 @@ const appMenu = require('./menu')(config);
75
73
76
74
// Configure AutoLaunch
77
75
const appLauncher = new AutoLaunch ( {
78
- name : 'Hamsket'
79
- , isHidden : config . get ( 'start_minimized' )
76
+ name : 'Hamsket' ,
77
+ isHidden : config . get ( 'start_minimized' )
80
78
} ) ;
81
- if ( ! isDev ) {
82
- appLauncher
83
- . isEnabled ( )
84
- . then ( ( isEnabled ) => {
85
- if ( config . get ( 'auto_launch' ) && ! isEnabled ) {
86
- appLauncher . enable ( ) ;
87
- } else if ( ! config . get ( 'auto_launch' ) && isEnabled ) {
88
- appLauncher . disable ( ) ;
89
- }
90
- return ;
91
- } )
92
- . catch ( ( err ) => {
93
- console . log ( err ) ;
94
- } ) ;
95
- }
79
+ appLauncher
80
+ . isEnabled ( )
81
+ . then ( ( isEnabled ) => {
82
+ if ( config . get ( 'auto_launch' ) && ! isEnabled ) {
83
+ appLauncher . enable ( ) ;
84
+ } else if ( ! config . get ( 'auto_launch' ) && isEnabled ) {
85
+ appLauncher . disable ( ) ;
86
+ }
87
+ return ;
88
+ } )
89
+ . catch ( ( err ) => {
90
+ console . log ( err ) ;
91
+ } ) ;
96
92
97
93
// Keep a global reference of the window object, if you don't, the window will
98
94
// be closed automatically when the JavaScript object is garbage collected.
@@ -147,9 +143,6 @@ function createWindow () {
147
143
148
144
process . setMaxListeners ( 10000 ) ;
149
145
150
- // Open the DevTools.
151
- if ( isDev ) mainWindow . webContents . openDevTools ( ) ;
152
-
153
146
// and load the index.html of the app.
154
147
mainWindow . loadURL ( 'file://' + __dirname + '/../index.html' ) ;
155
148
@@ -241,8 +234,6 @@ function createMasterPasswordWindow() {
241
234
}
242
235
243
236
} ) ;
244
- // Open the DevTools.
245
- if ( isDev ) mainMasterPasswordWindow . webContents . openDevTools ( ) ;
246
237
247
238
mainMasterPasswordWindow . loadURL ( 'file://' + __dirname + '/../masterpassword.html' ) ;
248
239
mainMasterPasswordWindow . on ( 'close' , function ( ) { mainMasterPasswordWindow = null ; } ) ;
0 commit comments