rename check_to_enable_callback to isActiveCallback

This commit is contained in:
Martin Grenfell
2009-07-21 23:43:00 +12:00
parent a2ead3545e
commit 6518d1eb4c
2 changed files with 5 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ let g:loaded_nerdtree_git_menu = 1
call NERDTreeAddMenuItem({ call NERDTreeAddMenuItem({
\ 'text': '(g)it menu', \ 'text': '(g)it menu',
\ 'shortcut': 'g', \ 'shortcut': 'g',
\ 'check_to_enable_callback': 'NERDTreeGitMenuEnabled', \ 'isActiveCallback': 'NERDTreeGitMenuEnabled',
\ 'callback': 'NERDTreeGitMenu' }) \ 'callback': 'NERDTreeGitMenu' })
function! NERDTreeGitMenuEnabled() function! NERDTreeGitMenuEnabled()

View File

@@ -470,16 +470,16 @@ function! s:MenuItem.Create(options)
let newMenuItem.text = a:options['text'] let newMenuItem.text = a:options['text']
let newMenuItem.shortcut = a:options['shortcut'] let newMenuItem.shortcut = a:options['shortcut']
let newMenuItem.callback = a:options['callback'] let newMenuItem.callback = a:options['callback']
if has_key(a:options, 'check_to_enable_callback') if has_key(a:options, 'isActiveCallback')
let newMenuItem.check_to_enable_callback = a:options['check_to_enable_callback'] let newMenuItem.isActiveCallback = a:options['isActiveCallback']
endif endif
call add(s:MenuItem.All(), newMenuItem) call add(s:MenuItem.All(), newMenuItem)
endfunction endfunction
"FUNCTION: MenuItem.enabled() {{{3 "FUNCTION: MenuItem.enabled() {{{3
function! s:MenuItem.enabled() function! s:MenuItem.enabled()
if has_key(self, "check_to_enable_callback") if has_key(self, "isActiveCallback")
return {self.check_to_enable_callback}() return {self.isActiveCallback}()
endif endif
return 1 return 1
endfunction endfunction