set foucus of button table only if the device has a dpad

so that Kindle Voyage won't show a highlighted button in
confirm dialog.
pull/1647/head
chrox 9 years ago
parent ddc36198ba
commit e91b7bd266

@ -9,6 +9,7 @@ local Device = Generic:new{
isEmulator = yes,
hasKeyboard = yes,
hasKeys = yes,
hasDPad = yes,
hasFrontlight = yes,
isTouchDevice = yes,
}

@ -16,6 +16,7 @@ local Device = {
-- hardware feature tests: (these are functions!)
hasKeyboard = no,
hasKeys = no,
hasDPad = no,
isTouchDevice = no,
hasFrontlight = no,

@ -12,23 +12,27 @@ local Kindle2 = Kindle:new{
model = "Kindle2",
hasKeyboard = yes,
hasKeys = yes,
hasDPad = yes,
}
local KindleDXG = Kindle:new{
model = "KindleDXG",
hasKeyboard = yes,
hasKeys = yes,
hasDPad = yes,
}
local Kindle3 = Kindle:new{
model = "Kindle3",
hasKeyboard = yes,
hasKeys = yes,
hasDPad = yes,
}
local Kindle4 = Kindle:new{
model = "Kindle4",
hasKeys = yes,
hasDPad = yes,
}
local KindleTouch = Kindle:new{

@ -68,7 +68,7 @@ function ButtonTable:init()
self:addHorizontalSep()
end
end -- end for each button line
if Device:hasKeys() then
if Device:hasDPad() then
self.layout = self.buttons
self.layout[1][1]:onFocus()
self.key_events.SelectByKeyPress = { {{"Press", "Enter"}} }

Loading…
Cancel
Save