From 7f01a8e7185657eba461bcf559843062b8430e02 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Mon, 4 Dec 2017 23:26:51 +0100 Subject: [PATCH] Add back and deprecate atom.showSaveDialogSync --- src/atom-environment.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/atom-environment.js b/src/atom-environment.js index adf8737fb..ec5212db5 100644 --- a/src/atom-environment.js +++ b/src/atom-environment.js @@ -1080,6 +1080,13 @@ class AtomEnvironment { return this.deserialize(state) } + showSaveDialogSync (options = {}) { + deprecate(`atom.showSaveDialogSync is deprecated and will be removed soon. +Please, implement ::saveAs and ::getSaveDialogOptions instead for pane items +or use Pane::saveItemAs for programmatic saving.`) + return this.applicationDelegate.showSaveDialog(options) + } + async saveState (options, storageKey) { if (this.enablePersistence && this.project) { const state = this.serialize(options)