mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-27 10:28:31 +08:00
fix(T2408): On the Mac, show open / save dialogs as sheets
Fixes T2408
This commit is contained in:
parent
07322b3b6c
commit
9d8174460f
1 changed files with 2 additions and 4 deletions
|
@ -808,14 +808,12 @@ class Atom extends Model
|
|||
remote.process.exit(status)
|
||||
|
||||
showOpenDialog: (options, callback) ->
|
||||
parentWindow = if process.platform is 'darwin' then null else @getCurrentWindow()
|
||||
dialog = remote.require('dialog')
|
||||
dialog.showOpenDialog(parentWindow, options, callback)
|
||||
dialog.showOpenDialog(@getCurrentWindow(), options, callback)
|
||||
|
||||
showSaveDialog: (defaultPath, callback) ->
|
||||
parentWindow = if process.platform is 'darwin' then null else @getCurrentWindow()
|
||||
dialog = remote.require('dialog')
|
||||
dialog.showSaveDialog(parentWindow, {title: 'Save File', defaultPath}, callback)
|
||||
dialog.showSaveDialog(@getCurrentWindow(), {title: 'Save File', defaultPath}, callback)
|
||||
|
||||
saveSync: ->
|
||||
stateString = JSON.stringify(@savedState)
|
||||
|
|
Loading…
Reference in a new issue