+
\ No newline at end of file
diff --git a/src/packages/ActivityMonitor/scheme.html b/src/packages/ActivityMonitor/scheme.html
index 5c66f43..47388f3 100644
--- a/src/packages/ActivityMonitor/scheme.html
+++ b/src/packages/ActivityMonitor/scheme.html
@@ -1,6 +1,6 @@
-
+
-
+
\ No newline at end of file
diff --git a/src/packages/CoreServices/package.json b/src/packages/CoreServices/package.json
index b45cae3..7691707 100644
--- a/src/packages/CoreServices/package.json
+++ b/src/packages/CoreServices/package.json
@@ -1,5 +1,6 @@
{
"app":null,
+ "services": [ "Calendar", "PushNotification", "Spotlight" ]
"name":"CoreServices",
"description":"This is the core services",
"info":{
diff --git a/src/packages/DummyApp/package.json b/src/packages/DummyApp/package.json
index 645b13a..001e6f5 100644
--- a/src/packages/DummyApp/package.json
+++ b/src/packages/DummyApp/package.json
@@ -11,5 +11,5 @@
"version":"0.1a",
"category":"System",
"iconclass":"fa fa-user-circle-o",
- "mimes":[".*"]
+ "mimes":["none"]
}
\ No newline at end of file
diff --git a/src/packages/DummyApp/scheme.html b/src/packages/DummyApp/scheme.html
index 7c43da0..0637c42 100644
--- a/src/packages/DummyApp/scheme.html
+++ b/src/packages/DummyApp/scheme.html
@@ -1,13 +1,15 @@
-
-
-
-
+
+
+
+
+
+
-
-
+
+
\ No newline at end of file
diff --git a/src/packages/Files/main.coffee b/src/packages/Files/main.coffee
index 3c81fea..d20d8ac 100644
--- a/src/packages/Files/main.coffee
+++ b/src/packages/Files/main.coffee
@@ -81,13 +81,20 @@ class Files extends this.OS.GUI.BaseApplication
me.view.set "data", d.result
mnFile:() ->
+ #console.log file
me = @
+ f = () ->
+ console.log "called"
+ file = me.view.get "selectedFile"
+ return undefined unless file
+ return me._gui.appsByMime file.mime
+
{
text: "File",
child: [
{ text: "New file", dataid: "#{@name}-mkf" },
{ text: "New folder", dataid: "#{@name}-mkdir" },
- { text: "Open", dataid: "#{@name}-open" },
+ { text: "Open with", dataid: "#{@name}-open", child: f },
{ text: "Upload", dataid: "#{@name}-upload" },
{ text: "Download", dataid: "#{@name}-download" },
{ text: "Properties", dataid: "#{@name}-info" }
diff --git a/src/packages/Files/scheme.html b/src/packages/Files/scheme.html
index 5011dce..d153af9 100644
--- a/src/packages/Files/scheme.html
+++ b/src/packages/Files/scheme.html
@@ -1,14 +1,14 @@
-
-
+
+
-
-
+
+
-
-
+
+
\ No newline at end of file
diff --git a/src/packages/MarkOn/main.coffee b/src/packages/MarkOn/main.coffee
index ea3f269..ed5f657 100644
--- a/src/packages/MarkOn/main.coffee
+++ b/src/packages/MarkOn/main.coffee
@@ -8,6 +8,7 @@ class MarkOn extends this.OS.GUI.BaseApplication
@container = @find "mycontainer"
@previewOn = false
@currfile = if @args and @args.length > 0 then @args[0].asFileHandler() else "Untitled".asFileHandler()
+ @editormux = false
@editor = new SimpleMDE
element: markarea
autofocus: true
@@ -38,7 +39,10 @@ class MarkOn extends this.OS.GUI.BaseApplication
]
@editor.codemirror.on "change", () ->
- console.log "thing changed"
+ return if me.editormux
+ if me.currfile.dirty is false
+ me.currfile.dirty = true
+ me.scheme.set "apptitle", "#{me.currfile.basename}*"
@on "vboxchange", (e) -> me.resizeContent()
@resizeContent()
@open @currfile
@@ -53,9 +57,14 @@ class MarkOn extends this.OS.GUI.BaseApplication
open: (file) ->
#find table
+ return if file.path is "Untitled"
me = @
+ file.dirty = false
file.read (d) ->
+ me.editormux = true
me.editor.value d
+ me.scheme.set "apptitle", "#{me.currfile.basename}"
+ me.editormux = false
save: (file) ->
@@ -64,6 +73,7 @@ class MarkOn extends this.OS.GUI.BaseApplication
return me.error "Error saving file #{file.basename}" if d.error
file.dirty = false
file.text = file.basename
+ me.scheme.set "apptitle", "#{me.currfile.basename}"
menu: () ->
me = @
@@ -97,4 +107,15 @@ class MarkOn extends this.OS.GUI.BaseApplication
when "#{@name}-Saveas"
@currfile.cache = @editor.value()
saveas()
+
+ cleanup: (evt) ->
+ return unless @currfile.dirty
+ me = @
+ evt.preventDefault()
+ @.openDialog "YesNoDialog", (d) ->
+ if d
+ me.currfile.dirty = false
+ me.quit()
+ , "Quit", { text: "Quit without saving ?" }
+
this.OS.register "MarkOn", MarkOn
\ No newline at end of file
diff --git a/src/packages/MarkOn/scheme.html b/src/packages/MarkOn/scheme.html
index d97500d..38ed98b 100644
--- a/src/packages/MarkOn/scheme.html
+++ b/src/packages/MarkOn/scheme.html
@@ -1,7 +1,7 @@
-
+
-
+
\ No newline at end of file
diff --git a/src/packages/NotePad/main.coffee b/src/packages/NotePad/main.coffee
index bad968f..7df949f 100644
--- a/src/packages/NotePad/main.coffee
+++ b/src/packages/NotePad/main.coffee
@@ -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
\ No newline at end of file
diff --git a/src/packages/NotePad/scheme.html b/src/packages/NotePad/scheme.html
index fed1131..cdf04e6 100644
--- a/src/packages/NotePad/scheme.html
+++ b/src/packages/NotePad/scheme.html
@@ -1,18 +1,18 @@
-
-
+
+
-
-
+
+
-
+
-
-
-
+
+
+
\ No newline at end of file
diff --git a/src/packages/wTerm/main.coffee b/src/packages/wTerm/main.coffee
index 5eb4f9a..0a58cb0 100644
--- a/src/packages/wTerm/main.coffee
+++ b/src/packages/wTerm/main.coffee
@@ -31,6 +31,8 @@ class wTerm extends this.OS.GUI.BaseApplication
end = if (i + 1) * 1000 > len then len else (i + 1) * 1000
me.term.write pastedText.substring i * 1000, end
#self.socket.send("i"+ substr.replace(/\n/g,"\r\n"))
+ # make desktop menu if not exist
+ @systemsetting.desktop.menu.push { text: "Open terminal", app: "wTerm" }
@openSession()
@on "vboxchange", (e) -> me.resizeContent e.w, e.h
diff --git a/src/packages/wTerm/scheme.html b/src/packages/wTerm/scheme.html
index be18835..15a2347 100644
--- a/src/packages/wTerm/scheme.html
+++ b/src/packages/wTerm/scheme.html
@@ -1,5 +1,5 @@
-
+
-
+
\ No newline at end of file