aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Andrzej Ressel <jereksel@gmail.com>2020-01-30 00:03:02 +0100
committerLibravatar Andrzej Ressel <jereksel@gmail.com>2020-01-30 00:03:02 +0100
commitd4ba692994467ca2c28cf27bb63b9a4c67f04195 (patch)
tree12c45d568abf03f409b5654fc364aa81c39a1a6c
parentMerge branch 'develop' (diff)
downloadferdium-app-d4ba692994467ca2c28cf27bb63b9a4c67f04195.tar.gz
ferdium-app-d4ba692994467ca2c28cf27bb63b9a4c67f04195.tar.zst
ferdium-app-d4ba692994467ca2c28cf27bb63b9a4c67f04195.zip
Start in tray
-rw-r--r--src/components/settings/settings/EditSettingsForm.js3
-rw-r--r--src/config.js1
-rw-r--r--src/containers/settings/EditSettingsScreen.js11
-rw-r--r--src/i18n/messages/src/containers/settings/EditSettingsScreen.json117
-rw-r--r--src/index.html2
-rw-r--r--src/index.js10
6 files changed, 90 insertions, 54 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js
index d567a47d1..0badd3b98 100644
--- a/src/components/settings/settings/EditSettingsForm.js
+++ b/src/components/settings/settings/EditSettingsForm.js
@@ -162,6 +162,7 @@ export default @observer class EditSettingsForm extends Component {
162 noUpdates: PropTypes.bool.isRequired, 162 noUpdates: PropTypes.bool.isRequired,
163 hibernationEnabled: PropTypes.bool.isRequired, 163 hibernationEnabled: PropTypes.bool.isRequired,
164 isDarkmodeEnabled: PropTypes.bool.isRequired, 164 isDarkmodeEnabled: PropTypes.bool.isRequired,
165 isTrayEnabled: PropTypes.bool.isRequired,
165 openProcessManager: PropTypes.func.isRequired, 166 openProcessManager: PropTypes.func.isRequired,
166 }; 167 };
167 168
@@ -199,6 +200,7 @@ export default @observer class EditSettingsForm extends Component {
199 noUpdates, 200 noUpdates,
200 hibernationEnabled, 201 hibernationEnabled,
201 isDarkmodeEnabled, 202 isDarkmodeEnabled,
203 isTrayEnabled,
202 openProcessManager, 204 openProcessManager,
203 } = this.props; 205 } = this.props;
204 const { intl } = this.context; 206 const { intl } = this.context;
@@ -235,6 +237,7 @@ export default @observer class EditSettingsForm extends Component {
235 <Toggle field={form.$('autoLaunchOnStart')} /> 237 <Toggle field={form.$('autoLaunchOnStart')} />
236 <Toggle field={form.$('runInBackground')} /> 238 <Toggle field={form.$('runInBackground')} />
237 <Toggle field={form.$('enableSystemTray')} /> 239 <Toggle field={form.$('enableSystemTray')} />
240 {isTrayEnabled && <Toggle field={form.$('startMinimized')} />}
238 <Toggle field={form.$('privateNotifications')} /> 241 <Toggle field={form.$('privateNotifications')} />
239 <Toggle field={form.$('showServiceNavigationBar')} /> 242 <Toggle field={form.$('showServiceNavigationBar')} />
240 <Toggle field={form.$('hibernate')} /> 243 <Toggle field={form.$('hibernate')} />
diff --git a/src/config.js b/src/config.js
index bd67aee6b..f877f4f2e 100644
--- a/src/config.js
+++ b/src/config.js
@@ -48,6 +48,7 @@ export const DEFAULT_APP_SETTINGS = {
48 autoLaunchInBackground: false, 48 autoLaunchInBackground: false,
49 runInBackground: true, 49 runInBackground: true,
50 enableSystemTray: true, 50 enableSystemTray: true,
51 startMinimized: false,
51 minimizeToSystemTray: false, 52 minimizeToSystemTray: false,
52 privateNotifications: false, 53 privateNotifications: false,
53 showDisabledServices: true, 54 showDisabledServices: true,
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js
index 07efbb881..c961d7541 100644
--- a/src/containers/settings/EditSettingsScreen.js
+++ b/src/containers/settings/EditSettingsScreen.js
@@ -38,6 +38,10 @@ const messages = defineMessages({
38 id: 'settings.app.form.runInBackground', 38 id: 'settings.app.form.runInBackground',
39 defaultMessage: '!!!Keep Ferdi in background when closing the window', 39 defaultMessage: '!!!Keep Ferdi in background when closing the window',
40 }, 40 },
41 startMinimized: {
42 id: 'settings.app.form.startMinimized',
43 defaultMessage: '!!!Start minimized'
44 },
41 enableSystemTray: { 45 enableSystemTray: {
42 id: 'settings.app.form.enableSystemTray', 46 id: 'settings.app.form.enableSystemTray',
43 defaultMessage: '!!!Show Ferdi in system tray', 47 defaultMessage: '!!!Show Ferdi in system tray',
@@ -169,6 +173,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
169 data: { 173 data: {
170 runInBackground: settingsData.runInBackground, 174 runInBackground: settingsData.runInBackground,
171 enableSystemTray: settingsData.enableSystemTray, 175 enableSystemTray: settingsData.enableSystemTray,
176 startMinimized: settingsData.startMinimized,
172 minimizeToSystemTray: settingsData.minimizeToSystemTray, 177 minimizeToSystemTray: settingsData.minimizeToSystemTray,
173 privateNotifications: settingsData.privateNotifications, 178 privateNotifications: settingsData.privateNotifications,
174 showServiceNavigationBar: settingsData.showServiceNavigationBar, 179 showServiceNavigationBar: settingsData.showServiceNavigationBar,
@@ -260,6 +265,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
260 value: settings.all.app.runInBackground, 265 value: settings.all.app.runInBackground,
261 default: DEFAULT_APP_SETTINGS.runInBackground, 266 default: DEFAULT_APP_SETTINGS.runInBackground,
262 }, 267 },
268 startMinimized: {
269 label: intl.formatMessage(messages.startMinimized),
270 value: settings.all.app.startMinimized,
271 default: DEFAULT_APP_SETTINGS.startMinimized,
272 },
263 enableSystemTray: { 273 enableSystemTray: {
264 label: intl.formatMessage(messages.enableSystemTray), 274 label: intl.formatMessage(messages.enableSystemTray),
265 value: settings.all.app.enableSystemTray, 275 value: settings.all.app.enableSystemTray,
@@ -455,6 +465,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
455 noUpdates={this.props.stores.settings.app.noUpdates} 465 noUpdates={this.props.stores.settings.app.noUpdates}
456 hibernationEnabled={this.props.stores.settings.app.hibernate} 466 hibernationEnabled={this.props.stores.settings.app.hibernate}
457 isDarkmodeEnabled={this.props.stores.settings.app.darkMode} 467 isDarkmodeEnabled={this.props.stores.settings.app.darkMode}
468 isTrayEnabled={this.props.stores.settings.app.enableSystemTray}
458 openProcessManager={() => this.openProcessManager()} 469 openProcessManager={() => this.openProcessManager()}
459 /> 470 />
460 </ErrorBoundary> 471 </ErrorBoundary>
diff --git a/src/i18n/messages/src/containers/settings/EditSettingsScreen.json b/src/i18n/messages/src/containers/settings/EditSettingsScreen.json
index 411e35dab..6a723ceca 100644
--- a/src/i18n/messages/src/containers/settings/EditSettingsScreen.json
+++ b/src/i18n/messages/src/containers/settings/EditSettingsScreen.json
@@ -39,15 +39,28 @@
39 } 39 }
40 }, 40 },
41 { 41 {
42 "id": "settings.app.form.startMinimized",
43 "defaultMessage": "!!!Start minimized",
44 "file": "src/containers/settings/EditSettingsScreen.js",
45 "start": {
46 "line": 41,
47 "column": 18
48 },
49 "end": {
50 "line": 44,
51 "column": 3
52 }
53 },
54 {
42 "id": "settings.app.form.enableSystemTray", 55 "id": "settings.app.form.enableSystemTray",
43 "defaultMessage": "!!!Show Ferdi in system tray", 56 "defaultMessage": "!!!Show Ferdi in system tray",
44 "file": "src/containers/settings/EditSettingsScreen.js", 57 "file": "src/containers/settings/EditSettingsScreen.js",
45 "start": { 58 "start": {
46 "line": 41, 59 "line": 45,
47 "column": 20 60 "column": 20
48 }, 61 },
49 "end": { 62 "end": {
50 "line": 44, 63 "line": 48,
51 "column": 3 64 "column": 3
52 } 65 }
53 }, 66 },
@@ -56,11 +69,11 @@
56 "defaultMessage": "!!!Minimize Ferdi to system tray", 69 "defaultMessage": "!!!Minimize Ferdi to system tray",
57 "file": "src/containers/settings/EditSettingsScreen.js", 70 "file": "src/containers/settings/EditSettingsScreen.js",
58 "start": { 71 "start": {
59 "line": 45, 72 "line": 49,
60 "column": 24 73 "column": 24
61 }, 74 },
62 "end": { 75 "end": {
63 "line": 48, 76 "line": 52,
64 "column": 3 77 "column": 3
65 } 78 }
66 }, 79 },
@@ -69,11 +82,11 @@
69 "defaultMessage": "!!!Don't show message content in notifications", 82 "defaultMessage": "!!!Don't show message content in notifications",
70 "file": "src/containers/settings/EditSettingsScreen.js", 83 "file": "src/containers/settings/EditSettingsScreen.js",
71 "start": { 84 "start": {
72 "line": 49, 85 "line": 53,
73 "column": 24 86 "column": 24
74 }, 87 },
75 "end": { 88 "end": {
76 "line": 52, 89 "line": 56,
77 "column": 3 90 "column": 3
78 } 91 }
79 }, 92 },
@@ -82,11 +95,11 @@
82 "defaultMessage": "!!!Always show service navigation bar", 95 "defaultMessage": "!!!Always show service navigation bar",
83 "file": "src/containers/settings/EditSettingsScreen.js", 96 "file": "src/containers/settings/EditSettingsScreen.js",
84 "start": { 97 "start": {
85 "line": 53, 98 "line": 57,
86 "column": 28 99 "column": 28
87 }, 100 },
88 "end": { 101 "end": {
89 "line": 56, 102 "line": 60,
90 "column": 3 103 "column": 3
91 } 104 }
92 }, 105 },
@@ -95,11 +108,11 @@
95 "defaultMessage": "!!!Enable service hibernation", 108 "defaultMessage": "!!!Enable service hibernation",
96 "file": "src/containers/settings/EditSettingsScreen.js", 109 "file": "src/containers/settings/EditSettingsScreen.js",
97 "start": { 110 "start": {
98 "line": 57, 111 "line": 61,
99 "column": 13 112 "column": 13
100 }, 113 },
101 "end": { 114 "end": {
102 "line": 60, 115 "line": 64,
103 "column": 3 116 "column": 3
104 } 117 }
105 }, 118 },
@@ -108,11 +121,11 @@
108 "defaultMessage": "!!!Hibernation strategy", 121 "defaultMessage": "!!!Hibernation strategy",
109 "file": "src/containers/settings/EditSettingsScreen.js", 122 "file": "src/containers/settings/EditSettingsScreen.js",
110 "start": { 123 "start": {
111 "line": 61, 124 "line": 65,
112 "column": 23 125 "column": 23
113 }, 126 },
114 "end": { 127 "end": {
115 "line": 64, 128 "line": 68,
116 "column": 3 129 "column": 3
117 } 130 }
118 }, 131 },
@@ -121,11 +134,11 @@
121 "defaultMessage": "!!!Server", 134 "defaultMessage": "!!!Server",
122 "file": "src/containers/settings/EditSettingsScreen.js", 135 "file": "src/containers/settings/EditSettingsScreen.js",
123 "start": { 136 "start": {
124 "line": 65, 137 "line": 69,
125 "column": 10 138 "column": 10
126 }, 139 },
127 "end": { 140 "end": {
128 "line": 68, 141 "line": 72,
129 "column": 3 142 "column": 3
130 } 143 }
131 }, 144 },
@@ -134,11 +147,11 @@
134 "defaultMessage": "!!!Todo Server", 147 "defaultMessage": "!!!Todo Server",
135 "file": "src/containers/settings/EditSettingsScreen.js", 148 "file": "src/containers/settings/EditSettingsScreen.js",
136 "start": { 149 "start": {
137 "line": 69, 150 "line": 73,
138 "column": 14 151 "column": 14
139 }, 152 },
140 "end": { 153 "end": {
141 "line": 72, 154 "line": 76,
142 "column": 3 155 "column": 3
143 } 156 }
144 }, 157 },
@@ -147,11 +160,11 @@
147 "defaultMessage": "!!!Enable Ferdi password lock", 160 "defaultMessage": "!!!Enable Ferdi password lock",
148 "file": "src/containers/settings/EditSettingsScreen.js", 161 "file": "src/containers/settings/EditSettingsScreen.js",
149 "start": { 162 "start": {
150 "line": 73, 163 "line": 77,
151 "column": 14 164 "column": 14
152 }, 165 },
153 "end": { 166 "end": {
154 "line": 76, 167 "line": 80,
155 "column": 3 168 "column": 3
156 } 169 }
157 }, 170 },
@@ -160,11 +173,11 @@
160 "defaultMessage": "!!!Ferdi Lock password", 173 "defaultMessage": "!!!Ferdi Lock password",
161 "file": "src/containers/settings/EditSettingsScreen.js", 174 "file": "src/containers/settings/EditSettingsScreen.js",
162 "start": { 175 "start": {
163 "line": 77, 176 "line": 81,
164 "column": 16 177 "column": 16
165 }, 178 },
166 "end": { 179 "end": {
167 "line": 80, 180 "line": 84,
168 "column": 3 181 "column": 3
169 } 182 }
170 }, 183 },
@@ -173,11 +186,11 @@
173 "defaultMessage": "!!!Enable scheduled Do-not-Disturb", 186 "defaultMessage": "!!!Enable scheduled Do-not-Disturb",
174 "file": "src/containers/settings/EditSettingsScreen.js", 187 "file": "src/containers/settings/EditSettingsScreen.js",
175 "start": { 188 "start": {
176 "line": 81, 189 "line": 85,
177 "column": 23 190 "column": 23
178 }, 191 },
179 "end": { 192 "end": {
180 "line": 84, 193 "line": 88,
181 "column": 3 194 "column": 3
182 } 195 }
183 }, 196 },
@@ -186,11 +199,11 @@
186 "defaultMessage": "!!!From", 199 "defaultMessage": "!!!From",
187 "file": "src/containers/settings/EditSettingsScreen.js", 200 "file": "src/containers/settings/EditSettingsScreen.js",
188 "start": { 201 "start": {
189 "line": 85, 202 "line": 89,
190 "column": 21 203 "column": 21
191 }, 204 },
192 "end": { 205 "end": {
193 "line": 88, 206 "line": 92,
194 "column": 3 207 "column": 3
195 } 208 }
196 }, 209 },
@@ -199,11 +212,11 @@
199 "defaultMessage": "!!!To", 212 "defaultMessage": "!!!To",
200 "file": "src/containers/settings/EditSettingsScreen.js", 213 "file": "src/containers/settings/EditSettingsScreen.js",
201 "start": { 214 "start": {
202 "line": 89, 215 "line": 93,
203 "column": 19 216 "column": 19
204 }, 217 },
205 "end": { 218 "end": {
206 "line": 92, 219 "line": 96,
207 "column": 3 220 "column": 3
208 } 221 }
209 }, 222 },
@@ -212,11 +225,11 @@
212 "defaultMessage": "!!!Language", 225 "defaultMessage": "!!!Language",
213 "file": "src/containers/settings/EditSettingsScreen.js", 226 "file": "src/containers/settings/EditSettingsScreen.js",
214 "start": { 227 "start": {
215 "line": 93, 228 "line": 97,
216 "column": 12 229 "column": 12
217 }, 230 },
218 "end": { 231 "end": {
219 "line": 96, 232 "line": 100,
220 "column": 3 233 "column": 3
221 } 234 }
222 }, 235 },
@@ -225,11 +238,11 @@
225 "defaultMessage": "!!!Dark Mode", 238 "defaultMessage": "!!!Dark Mode",
226 "file": "src/containers/settings/EditSettingsScreen.js", 239 "file": "src/containers/settings/EditSettingsScreen.js",
227 "start": { 240 "start": {
228 "line": 97, 241 "line": 101,
229 "column": 12 242 "column": 12
230 }, 243 },
231 "end": { 244 "end": {
232 "line": 100, 245 "line": 104,
233 "column": 3 246 "column": 3
234 } 247 }
235 }, 248 },
@@ -238,11 +251,11 @@
238 "defaultMessage": "!!!Enable adaptable Dark Mode", 251 "defaultMessage": "!!!Enable adaptable Dark Mode",
239 "file": "src/containers/settings/EditSettingsScreen.js", 252 "file": "src/containers/settings/EditSettingsScreen.js",
240 "start": { 253 "start": {
241 "line": 101, 254 "line": 105,
242 "column": 21 255 "column": 21
243 }, 256 },
244 "end": { 257 "end": {
245 "line": 104, 258 "line": 108,
246 "column": 3 259 "column": 3
247 } 260 }
248 }, 261 },
@@ -251,11 +264,11 @@
251 "defaultMessage": "!!!Enable universal Dark Mode", 264 "defaultMessage": "!!!Enable universal Dark Mode",
252 "file": "src/containers/settings/EditSettingsScreen.js", 265 "file": "src/containers/settings/EditSettingsScreen.js",
253 "start": { 266 "start": {
254 "line": 105, 267 "line": 109,
255 "column": 21 268 "column": 21
256 }, 269 },
257 "end": { 270 "end": {
258 "line": 108, 271 "line": 112,
259 "column": 3 272 "column": 3
260 } 273 }
261 }, 274 },
@@ -264,11 +277,11 @@
264 "defaultMessage": "!!!Accent color", 277 "defaultMessage": "!!!Accent color",
265 "file": "src/containers/settings/EditSettingsScreen.js", 278 "file": "src/containers/settings/EditSettingsScreen.js",
266 "start": { 279 "start": {
267 "line": 109, 280 "line": 113,
268 "column": 15 281 "column": 15
269 }, 282 },
270 "end": { 283 "end": {
271 "line": 112, 284 "line": 116,
272 "column": 3 285 "column": 3
273 } 286 }
274 }, 287 },
@@ -277,11 +290,11 @@
277 "defaultMessage": "!!!Display disabled services tabs", 290 "defaultMessage": "!!!Display disabled services tabs",
278 "file": "src/containers/settings/EditSettingsScreen.js", 291 "file": "src/containers/settings/EditSettingsScreen.js",
279 "start": { 292 "start": {
280 "line": 113, 293 "line": 117,
281 "column": 24 294 "column": 24
282 }, 295 },
283 "end": { 296 "end": {
284 "line": 116, 297 "line": 120,
285 "column": 3 298 "column": 3
286 } 299 }
287 }, 300 },
@@ -290,11 +303,11 @@
290 "defaultMessage": "!!!Show unread message badge when notifications are disabled", 303 "defaultMessage": "!!!Show unread message badge when notifications are disabled",
291 "file": "src/containers/settings/EditSettingsScreen.js", 304 "file": "src/containers/settings/EditSettingsScreen.js",
292 "start": { 305 "start": {
293 "line": 117, 306 "line": 121,
294 "column": 29 307 "column": 29
295 }, 308 },
296 "end": { 309 "end": {
297 "line": 120, 310 "line": 124,
298 "column": 3 311 "column": 3
299 } 312 }
300 }, 313 },
@@ -303,11 +316,11 @@
303 "defaultMessage": "!!!Enable spell checking", 316 "defaultMessage": "!!!Enable spell checking",
304 "file": "src/containers/settings/EditSettingsScreen.js", 317 "file": "src/containers/settings/EditSettingsScreen.js",
305 "start": { 318 "start": {
306 "line": 121, 319 "line": 125,
307 "column": 23 320 "column": 23
308 }, 321 },
309 "end": { 322 "end": {
310 "line": 124, 323 "line": 128,
311 "column": 3 324 "column": 3
312 } 325 }
313 }, 326 },
@@ -316,11 +329,11 @@
316 "defaultMessage": "!!!Enable GPU Acceleration", 329 "defaultMessage": "!!!Enable GPU Acceleration",
317 "file": "src/containers/settings/EditSettingsScreen.js", 330 "file": "src/containers/settings/EditSettingsScreen.js",
318 "start": { 331 "start": {
319 "line": 125, 332 "line": 129,
320 "column": 25 333 "column": 25
321 }, 334 },
322 "end": { 335 "end": {
323 "line": 128, 336 "line": 132,
324 "column": 3 337 "column": 3
325 } 338 }
326 }, 339 },
@@ -329,11 +342,11 @@
329 "defaultMessage": "!!!Include beta versions", 342 "defaultMessage": "!!!Include beta versions",
330 "file": "src/containers/settings/EditSettingsScreen.js", 343 "file": "src/containers/settings/EditSettingsScreen.js",
331 "start": { 344 "start": {
332 "line": 129, 345 "line": 133,
333 "column": 8 346 "column": 8
334 }, 347 },
335 "end": { 348 "end": {
336 "line": 132, 349 "line": 136,
337 "column": 3 350 "column": 3
338 } 351 }
339 }, 352 },
@@ -342,11 +355,11 @@
342 "defaultMessage": "!!!Disable updates", 355 "defaultMessage": "!!!Disable updates",
343 "file": "src/containers/settings/EditSettingsScreen.js", 356 "file": "src/containers/settings/EditSettingsScreen.js",
344 "start": { 357 "start": {
345 "line": 133, 358 "line": 137,
346 "column": 13 359 "column": 13
347 }, 360 },
348 "end": { 361 "end": {
349 "line": 136, 362 "line": 140,
350 "column": 3 363 "column": 3
351 } 364 }
352 }, 365 },
@@ -355,11 +368,11 @@
355 "defaultMessage": "!!!Enable Franz Todos", 368 "defaultMessage": "!!!Enable Franz Todos",
356 "file": "src/containers/settings/EditSettingsScreen.js", 369 "file": "src/containers/settings/EditSettingsScreen.js",
357 "start": { 370 "start": {
358 "line": 137, 371 "line": 141,
359 "column": 15 372 "column": 15
360 }, 373 },
361 "end": { 374 "end": {
362 "line": 140, 375 "line": 144,
363 "column": 3 376 "column": 3
364 } 377 }
365 }, 378 },
@@ -368,11 +381,11 @@
368 "defaultMessage": "!!!Keep all workspaces loaded", 381 "defaultMessage": "!!!Keep all workspaces loaded",
369 "file": "src/containers/settings/EditSettingsScreen.js", 382 "file": "src/containers/settings/EditSettingsScreen.js",
370 "start": { 383 "start": {
371 "line": 141, 384 "line": 145,
372 "column": 27 385 "column": 27
373 }, 386 },
374 "end": { 387 "end": {
375 "line": 144, 388 "line": 148,
376 "column": 3 389 "column": 3
377 } 390 }
378 } 391 }
diff --git a/src/index.html b/src/index.html
index 31e8aa553..6b67cc248 100644
--- a/src/index.html
+++ b/src/index.html
@@ -56,5 +56,5 @@
56 })(); 56 })();
57 } 57 }
58 </script> 58 </script>
59</body 59</body>
60</html> 60</html>
diff --git a/src/index.js b/src/index.js
index 12ea7f646..4c61c5c8e 100644
--- a/src/index.js
+++ b/src/index.js
@@ -91,7 +91,7 @@ if (!gotTheLock) {
91 app.on('second-instance', (event, argv) => { 91 app.on('second-instance', (event, argv) => {
92 // Someone tried to run a second instance, we should focus our window. 92 // Someone tried to run a second instance, we should focus our window.
93 if (mainWindow) { 93 if (mainWindow) {
94 mainWindow.show(); 94 //mainWindow.show();
95 if (mainWindow.isMinimized()) { 95 if (mainWindow.isMinimized()) {
96 mainWindow.restore(); 96 mainWindow.restore();
97 } 97 }
@@ -142,6 +142,8 @@ const createWindow = () => {
142 const mainWindowState = windowStateKeeper({ 142 const mainWindowState = windowStateKeeper({
143 defaultWidth: DEFAULT_WINDOW_OPTIONS.width, 143 defaultWidth: DEFAULT_WINDOW_OPTIONS.width,
144 defaultHeight: DEFAULT_WINDOW_OPTIONS.height, 144 defaultHeight: DEFAULT_WINDOW_OPTIONS.height,
145 maximize: false,
146 fullScreen: false
145 }); 147 });
146 148
147 let posX = mainWindowState.x || DEFAULT_WINDOW_OPTIONS.x; 149 let posX = mainWindowState.x || DEFAULT_WINDOW_OPTIONS.x;
@@ -168,6 +170,7 @@ const createWindow = () => {
168 height: mainWindowState.height, 170 height: mainWindowState.height,
169 minWidth: 600, 171 minWidth: 600,
170 minHeight: 500, 172 minHeight: 500,
173 show: false,
171 titleBarStyle: isMac ? 'hidden' : '', 174 titleBarStyle: isMac ? 'hidden' : '',
172 frame: isLinux, 175 frame: isLinux,
173 backgroundColor, 176 backgroundColor,
@@ -298,6 +301,11 @@ const createWindow = () => {
298 shell.openExternal(url); 301 shell.openExternal(url);
299 } 302 }
300 }); 303 });
304
305 if (!(settings.get('enableSystemTray') && settings.get('startMinimized'))) {
306 mainWindow.show();
307 }
308
301}; 309};
302 310
303// Allow passing command line parameters/switches to electron 311// Allow passing command line parameters/switches to electron