mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Use async BrowserWindow::setDocumentEdited
This commit is contained in:
@@ -451,6 +451,7 @@ class Atom extends Model
|
||||
center: ->
|
||||
ipc.send('call-window-method', 'center')
|
||||
|
||||
|
||||
# Schedule the window to be shown and focused on the next tick.
|
||||
#
|
||||
# This is done in a next tick to prevent a white flicker from occurring
|
||||
@@ -470,6 +471,9 @@ class Atom extends Model
|
||||
app.emit('will-exit')
|
||||
remote.process.exit(status)
|
||||
|
||||
setDocumentEdited: (edited) ->
|
||||
ipc.send('call-window-method', 'setDocumentEdited', edited)
|
||||
|
||||
# Public: Is the current window in development mode?
|
||||
inDevMode: ->
|
||||
@getLoadSettings().devMode
|
||||
|
||||
@@ -232,8 +232,8 @@ class WorkspaceView extends View
|
||||
# On OS X, fades the application window's proxy icon when the current file
|
||||
# has been modified.
|
||||
updateDocumentEdited: ->
|
||||
modified = @getModel().getActivePaneItem()?.isModified?() ? false
|
||||
atom.getCurrentWindow().setDocumentEdited modified
|
||||
modified = @model.getActivePaneItem()?.isModified?() ? false
|
||||
atom.setDocumentEdited(modified)
|
||||
|
||||
# Get all editor views.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user