mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
use debug to print debug info
This commit is contained in:
@@ -270,7 +270,7 @@ function SelectMenu:choose(ypos, height)
|
||||
end
|
||||
if self.item_shortcuts[c] ~= nil and
|
||||
string.len(self.item_shortcuts[c]) == 3 then
|
||||
-- print "Del", "Sym and "Ent"
|
||||
-- debug "Del", "Sym and "Ent"
|
||||
renderUtf8Text(fb.bb, 13, y, fface,
|
||||
self.item_shortcuts[c], true)
|
||||
else
|
||||
@@ -322,14 +322,14 @@ function SelectMenu:choose(ypos, height)
|
||||
ev.code = adjustKeyEvents(ev)
|
||||
if ev.type == EV_KEY and ev.value == EVENT_VALUE_KEY_PRESS then
|
||||
keydef = Keydef:new(ev.code, getKeyModifier())
|
||||
print("key pressed: "..tostring(keydef))
|
||||
debug("key pressed: "..tostring(keydef))
|
||||
|
||||
command = self.commands:getByKeydef(keydef)
|
||||
if command ~= nil then
|
||||
print("command to execute: "..tostring(command))
|
||||
debug("command to execute: "..tostring(command))
|
||||
ret_code = command.func(self, keydef)
|
||||
else
|
||||
print("command not found: "..tostring(command))
|
||||
debug("command not found: "..tostring(command))
|
||||
end
|
||||
|
||||
if ret_code == "break" then
|
||||
@@ -337,7 +337,7 @@ function SelectMenu:choose(ypos, height)
|
||||
end
|
||||
|
||||
if self.selected_item ~= nil then
|
||||
print("# selected "..self.selected_item)
|
||||
debug("# selected "..self.selected_item)
|
||||
return self.selected_item, self.item_array[self.selected_item]
|
||||
end
|
||||
end -- EOF if
|
||||
|
||||
Reference in New Issue
Block a user