mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
added (E)dit action to keyboard binding viewer + minor refactroing...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
680d080830
commit
f6d999b09e
@ -975,7 +975,7 @@ var KeyboardUIActions = actions.Actions({
|
|||||||
}
|
}
|
||||||
: options.get_key_text
|
: options.get_key_text
|
||||||
|
|
||||||
var dialog = browse.makeLister(null,
|
return browse.makeLister(null,
|
||||||
function(path, make){
|
function(path, make){
|
||||||
var keys = kb.keys('*')
|
var keys = kb.keys('*')
|
||||||
var keybindings = kb.keyboard
|
var keybindings = kb.keyboard
|
||||||
@ -1132,19 +1132,29 @@ var KeyboardUIActions = actions.Actions({
|
|||||||
options.cls,
|
options.cls,
|
||||||
].join(' '),
|
].join(' '),
|
||||||
})
|
})
|
||||||
|
// setup extra kb actions...
|
||||||
|
.run(function(){
|
||||||
|
// clone the bindings so as not to mess up the global browser...
|
||||||
|
this.keybindings = JSON.parse(JSON.stringify(this.keybindings))
|
||||||
|
|
||||||
// handle '?' button to browse path...
|
// handle '?' button to browse path...
|
||||||
dialog.showDoc = function(){
|
this.showDoc = function(){
|
||||||
var action = dialog.select('!').attr('action')
|
var action = this.select('!').attr('action')
|
||||||
action
|
action
|
||||||
&& action in that
|
&& action in that
|
||||||
&& that.showDoc(action)
|
&& that.showDoc(action)
|
||||||
}
|
}
|
||||||
// clone the bindings so as not to mess up the global browser...
|
this.keyboard.handler('General', '?', 'showDoc')
|
||||||
dialog.keybindings = JSON.parse(JSON.stringify(dialog.keybindings))
|
|
||||||
dialog.keyboard.handler('General', '?', 'showDoc')
|
|
||||||
|
|
||||||
return dialog
|
// edit keys on 'E' press...
|
||||||
|
if(that.editKeyboardBindings){
|
||||||
|
this.editKeys = function(){
|
||||||
|
that.editKeyboardBindings()
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
this.keyboard.handler('General', 'e', 'editKeys')
|
||||||
|
}
|
||||||
|
})
|
||||||
})],
|
})],
|
||||||
// XXX this does not handle the passed container protocol...
|
// XXX this does not handle the passed container protocol...
|
||||||
// .editKeyboardBindings('Drawer') is broken...
|
// .editKeyboardBindings('Drawer') is broken...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user