mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Don't use atom.confirm in Workspace
This commit is contained in:
committed by
Nathan Sobo
parent
cb950b65b0
commit
464cfd4474
@@ -175,8 +175,7 @@ class AtomEnvironment extends Model
|
||||
@workspace = new Workspace({
|
||||
@config, @project, packageManager: @packages, grammarRegistry: @grammars,
|
||||
notificationManager: @notifications, setRepresentedFilename: @setRepresentedFilename.bind(this),
|
||||
setDocumentEdited: @setDocumentEdited.bind(this), @clipboard, viewRegistry: @views,
|
||||
assert: @assert.bind(this)
|
||||
setDocumentEdited: @setDocumentEdited.bind(this), @clipboard, viewRegistry: @views, assert: @assert.bind(this), confirm: @confirm.bind(this)
|
||||
})
|
||||
@themes.workspace = @workspace
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class Workspace extends Model
|
||||
{
|
||||
@packageManager, @config, @project, @grammarRegistry, @notificationManager,
|
||||
@clipboard, @viewRegistry, @grammarRegistry, @setRepresentedFilename,
|
||||
@setDocumentEdited, @assert
|
||||
@setDocumentEdited, @assert, @confirm
|
||||
} = params
|
||||
|
||||
debugger unless @assert?
|
||||
@@ -448,7 +448,7 @@ class Workspace extends Model
|
||||
|
||||
largeFileMode = fileSize >= 2 * 1048576 # 2MB
|
||||
if fileSize >= 20 * 1048576 # 20MB
|
||||
choice = atom.confirm
|
||||
choice = @confirm
|
||||
message: 'Atom will be unresponsive during the loading of very large files.'
|
||||
detailedMessage: "Do you still want to load this file?"
|
||||
buttons: ["Proceed", "Cancel"]
|
||||
|
||||
Reference in New Issue
Block a user