fix minor error

This commit is contained in:
Xuan Sang LE
2018-01-30 19:06:30 +01:00
parent 02422319ca
commit de387ece25
23 changed files with 190 additions and 95 deletions

View File

@ -215,7 +215,17 @@ class NotePad extends this.OS.GUI.BaseApplication
when "#{@name}-Saveas"
@currfile.cache = @editor.getValue()
saveas()
cleanup: (evt) ->
dirties = ( v for v in @tabarea.get "items" when v.dirty )
return if dirties.length is 0
me = @
evt.preventDefault()
@.openDialog "YesNoDialog", (d) ->
if d
v.dirty = false for v in dirties
me.quit()
, "Quit", { text: "Ignore all #{dirties.length} unsaved files ?" }
NotePad.singleton = false
this.OS.register "NotePad", NotePad