diff --git a/src/core/settings.coffee b/src/core/settings.coffee index fedff60..c298a5b 100644 --- a/src/core/settings.coffee +++ b/src/core/settings.coffee @@ -10,9 +10,9 @@ #TODO: multi app try to write to this object, it neet to be cloned { text: "Applications", path: 'app:///', iconclass: "fa fa-adn", type: "app" }, { text: "Home", path: 'home:///', iconclass: "fa fa-home", type: "fs" }, - { text: "OS", path: 'os:///', iconclass: "fa fa-inbox", type: "fs" }, { text: "Desktop", path: _OS.setting.desktop.path , iconclass: "fa fa-desktop", type: "fs" }, - { text: "Google Drive", path: 'gdv:///', iconclass: "fa fa-google-drive", type: "fs" }, + { text: "OS", path: 'os:///', iconclass: "fa fa-inbox", type: "fs" }, + { text: "Google Drive", path: 'gdv:///', iconclass: "fa fa-inbox", type: "fs" }, { text: "Shared", path: 'shared:///' , iconclass: "fa fa-share-square", type: "fs" } ] if not _OS.setting.VFS.mountpoints diff --git a/src/packages/MarkOn/main.coffee b/src/packages/MarkOn/main.coffee index 177998e..f99aec2 100644 --- a/src/packages/MarkOn/main.coffee +++ b/src/packages/MarkOn/main.coffee @@ -44,6 +44,7 @@ class MarkOn extends this.OS.GUI.BaseApplication me.currfile.dirty = true me.scheme.set "apptitle", "#{me.currfile.basename}*" @on "hboxchange", (e) -> me.resizeContent() + @bindKey "ALT-N", () -> me.actionFile "#{me.name}-New" @bindKey "ALT-O", () -> me.actionFile "#{me.name}-Open" @bindKey "CTRL-S", () -> me.actionFile "#{me.name}-Save" @bindKey "ALT-W", () -> me.actionFile "#{me.name}-Saveas" @@ -83,6 +84,7 @@ class MarkOn extends this.OS.GUI.BaseApplication menu = [{ text: "File", child: [ + { text: "Open", dataid: "#{@name}-New", shortcut: "A-N" }, { text: "Open", dataid: "#{@name}-Open", shortcut: "A-O" }, { text: "Save", dataid: "#{@name}-Save", shortcut: "C-S" }, { text: "Save as", dataid: "#{@name}-Saveas", shortcut: "A-W" } @@ -110,6 +112,10 @@ class MarkOn extends this.OS.GUI.BaseApplication when "#{@name}-Saveas" @currfile.cache = @editor.value() saveas() + when "#{@name}-New" + @currfile = "Untitled".asFileHandler() + @currfile.cache = "" + @editor.value("") cleanup: (evt) -> return unless @currfile.dirty diff --git a/src/packages/NotePad/main.coffee b/src/packages/NotePad/main.coffee index 3134f89..6034b96 100644 --- a/src/packages/NotePad/main.coffee +++ b/src/packages/NotePad/main.coffee @@ -104,6 +104,7 @@ class NotePad extends this.OS.GUI.BaseApplication , "Close tab", { text: "Close without saving ?" } return false #@tabarea.set "closable", true + @bindKey "ALT-N", () -> me.actionFile "#{me.name}-New" @bindKey "ALT-O", () -> me.actionFile "#{me.name}-Open" @bindKey "CTRL-S", () -> me.actionFile "#{me.name}-Save" @bindKey "ALT-W", () -> me.actionFile "#{me.name}-Saveas" @@ -243,6 +244,7 @@ class NotePad extends this.OS.GUI.BaseApplication menu = [{ text: "File", child: [ + { text: "New", dataid: "#{@name}-New", shortcut: "A-N" }, { text: "Open", dataid: "#{@name}-Open", shortcut: "A-O" }, { text: "Save", dataid: "#{@name}-Save", shortcut: "C-S" }, { text: "Save as", dataid: "#{@name}-Saveas", shortcut: "A-W" } @@ -278,6 +280,8 @@ class NotePad extends this.OS.GUI.BaseApplication when "#{@name}-Saveas" @currfile.cache = @editor.getValue() saveas() + when "#{@name}-New" + @open "Untitled".asFileHandler() cleanup: (evt) -> dirties = ( v for v in @tabarea.get "items" when v.dirty )