Skip to content

Commit

Permalink
Atom@v1 API, fixes #27,#28 (partially #29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolab committed Jun 5, 2015
1 parent d088913 commit f962814
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
26 changes: 19 additions & 7 deletions lib/local-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,29 @@ module.exports = {

localHistoryView: null,

configDefaults: {
config: {

// 256 KB
fileSizeLimit: 262144,
fileSizeLimit: {
type: 'integer',
default: 262144
},

// in days
daysLimit: 30,

historyStoragePath: utils.getLocalHistoryPath(),

difftoolCommand: 'meld "{current-file}" "{revision-file}"'
daysLimit: {
type: 'integer',
default: 30
},

historyStoragePath: {
type: 'string',
default: utils.getLocalHistoryPath()
},

difftoolCommand: {
type: 'string',
default: 'meld "{current-file}" "{revision-file}"'
}
},

activate: function(state) {
Expand Down
14 changes: 11 additions & 3 deletions menus/local-history.cson
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# See https://atom.io/docs/latest/creating-a-package#menus for more details
'context-menu':
'.overlayer':
'Show history of current file': 'local-history:current-file',
'Open difftool: current file / revision file': 'local-history:difftool-current-file'
'atom-workspace':
[
{
'label': 'Show history of current file',
'command': 'local-history:current-file'
},
{
'label': 'Open difftool: current file / revision file',
'command': 'local-history:difftool-current-file'
}
]

'menu': [
{
Expand Down

0 comments on commit f962814

Please sign in to comment.