image insert

This commit is contained in:
lxsang 2018-09-13 22:37:41 +02:00
parent 0eee08855c
commit 397d322788
2 changed files with 8 additions and 8 deletions

View File

@ -382,7 +382,7 @@
// close the session
return this.session.close(function(e) {
if (e) {
return me.error("Cannot close session " + e);
return me.error(__("Cannot close session {0}", e));
}
me.editorSession.sessionController.getMetadataController().unsubscribe(gui.MetadataController.signalMetadataChanged, me.metaChanged);
me.editorSession.sessionController.getUndoManager().unsubscribe(gui.UndoManager.signalDocumentModifiedChanged, me.documentChanged);
@ -391,17 +391,17 @@
// destry editorSession
return me.editorSession.destroy(function(e) {
if (e) {
return me.error("Cannot destroy editor session " + e);
return me.error(__("Cannot destroy editor session {0}", e));
}
me.editorSession = void 0;
// destroy session
return me.session.destroy(function(e) {
if (e) {
return me.error("Cannot destroy document session " + e);
return me.error(__("Cannot destroy document session {0}", e));
}
core.Async.destroyAll([me.canvas.destroy], function(e) {
if (e) {
return me.error("Cannot destroy canvas" + e);
return me.error(__("Cannot destroy canvas {0}", e));
}
return me.notify("Document closed");
});

View File

@ -274,20 +274,20 @@ class OpenPage extends this.OS.GUI.BaseApplication
@session.enqueue [op]
# close the session
@session.close (e) ->
return (me.error "Cannot close session " + e) if e
return me.error __("Cannot close session {0}", e) if e
me.editorSession.sessionController.getMetadataController().unsubscribe gui.MetadataController.signalMetadataChanged, me.metaChanged
me.editorSession.sessionController.getUndoManager().unsubscribe gui.UndoManager.signalDocumentModifiedChanged, me.documentChanged
me.directFormattingCtl.unsubscribe gui.DirectFormattingController.textStylingChanged, me.textStylingChanged
me.directFormattingCtl.unsubscribe gui.DirectFormattingController.paragraphStylingChanged, me.textStylingChanged
# destry editorSession
me.editorSession.destroy (e) ->
return (me.error "Cannot destroy editor session " + e) if e
return me.error __("Cannot destroy editor session {0}", e) if e
me.editorSession = undefined
# destroy session
me.session.destroy (e) ->
return (me.error "Cannot destroy document session " + e) if e
return me.error __("Cannot destroy document session {0}", e) if e
core.Async.destroyAll [me.canvas.destroy], (e) ->
return me.error "Cannot destroy canvas" + e if e
return me.error __("Cannot destroy canvas {0}", e) if e
me.notify "Document closed"
me.session = undefined
me.directFormattingCtl = undefined