some more refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2012-08-17 07:30:03 +04:00
parent 9a32d04c4c
commit 68f6f61d73
2 changed files with 9 additions and 4 deletions

View File

@ -206,6 +206,7 @@ function showSetup(){
var DEBUG = true var DEBUG = true
//var DEBUG = false //var DEBUG = false
ImageGrid.OPTION({ ImageGrid.OPTION({
name: 'BACKGROUND_MODES', name: 'BACKGROUND_MODES',
doc: 'list of available background styles.\n'+ doc: 'list of available background styles.\n'+
@ -884,13 +885,14 @@ function makeKeyboardHandler(keybindings, unhandled){
callback = handler['default'] callback = handler['default']
} }
if(callback != null){ if(callback != null){
callback() var res = callback()
return false return res?true:false
} }
} else { } else {
// simple callback... // simple callback...
handler() var res = handler()
return false return res?true:false
} }
return unhandled(key) return unhandled(key)
} }

View File

@ -78,6 +78,9 @@ var keybindings = {
17: 16, 17: 16,
18: 16, 18: 16,
20: 16, // Caps Lock 20: 16, // Caps Lock
// refresh...
116: function(){ return DEBUG?true:false } // F5
} }