From 7a6a48d7ea7fc50c7ba4070a19093cbef722a6fb Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Jun 2015 15:31:33 -0700 Subject: [PATCH] Move getSaveDialogOptions near other save methods --- src/text-editor.coffee | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 20ef23264..4469be580 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -593,16 +593,6 @@ class TextEditor extends Model # Essential: Returns the {String} path of this editor's text buffer. getPath: -> @buffer.getPath() - # Private: Return [save options](http://electron.atom.io/docs/v0.27.0/api/di - # alog/#dialog.showsavedialog(%5Bbrowserwindow%5D,-%5Boptions%5D,-%5Bcallbac - # k%5D)) to be used when displaying the save dialog. - # - # Default empty options are returned now. In the future this would be the - # place to start implementing things like: https://discuss.atom.io/t - # /request-saving- file-with-correct-extension/17521 - getSaveDialogOptions: -> - {} - # Extended: Returns the {String} character set encoding of this editor's text # buffer. getEncoding: -> @buffer.getEncoding() @@ -648,6 +638,10 @@ class TextEditor extends Model else @isModified() and not @buffer.hasMultipleEditors() + # Returns an {Object} to configure dialog shown when this editor is saved + # via {Pane::saveItemAs}. + getSaveDialogOptions: -> {} + checkoutHeadRevision: -> if filePath = this.getPath() atom.project.repositoryForDirectory(new Directory(path.dirname(filePath)))