remove trailing spaces

pull/2/merge
Qingping Hou 11 years ago
parent 4d72574dfb
commit c5ff50abdf

@ -130,7 +130,7 @@ function CreDocument:engineInit()
if not engine_initilized then if not engine_initilized then
-- initialize cache -- initialize cache
cre.initCache(1024*1024*64) cre.initCache(1024*1024*64)
-- we need to initialize the CRE font list -- we need to initialize the CRE font list
local fonts = Font:getFontList() local fonts = Font:getFontList()
for _k, _v in ipairs(fonts) do for _k, _v in ipairs(fonts) do

@ -47,7 +47,7 @@ end
ReaderConfig = InputContainer:new{ ReaderConfig = InputContainer:new{
dimen = Geom:new{ dimen = Geom:new{
x = 0, x = 0,
y = 7*Screen:getHeight()/8, y = 7*Screen:getHeight()/8,
w = Screen:getWidth(), w = Screen:getWidth(),
h = Screen:getHeight()/8, h = Screen:getHeight()/8,
@ -82,7 +82,7 @@ function ReaderConfig:onShowConfigMenu()
ui = self.ui, ui = self.ui,
configurable = self.configurable, configurable = self.configurable,
config_options = self.options, config_options = self.options,
close_callback = function() close_callback = function()
self.ui:handleEvent(Event:new("RestoreHinting")) self.ui:handleEvent(Event:new("RestoreHinting"))
end, end,
} }

@ -103,7 +103,7 @@ function MenuItem:init()
local shortcut_icon_dimen = Geom:new() local shortcut_icon_dimen = Geom:new()
if self.shortcut then if self.shortcut then
shortcut_icon_dimen.w = math.floor(self.dimen.h*4/5) shortcut_icon_dimen.w = math.floor(self.dimen.h*4/5)
shortcut_icon_dimen.h = shortcut_icon_dimen.w shortcut_icon_dimen.h = shortcut_icon_dimen.w
end end
self.detail = self.text self.detail = self.text
@ -132,7 +132,7 @@ function MenuItem:init()
if Device:isTouchDevice() then if Device:isTouchDevice() then
else else
self.active_key_events.ShowItemDetail = { self.active_key_events.ShowItemDetail = {
{"Right"}, doc = "show item detail" {"Right"}, doc = "show item detail"
} }
end end
indicator = " >>" indicator = " >>"
@ -349,7 +349,7 @@ function Menu:init()
if self.is_enable_shortcut then if self.is_enable_shortcut then
self.key_events.SelectByShortCut = { {self.item_shortcuts} } self.key_events.SelectByShortCut = { {self.item_shortcuts} }
end end
self.key_events.Select = { self.key_events.Select = {
{"Press"}, doc = "select current menu item" {"Press"}, doc = "select current menu item"
} }
end end
@ -371,7 +371,7 @@ function Menu:updateItems(select_number)
for c = 1, self.perpage do for c = 1, self.perpage do
-- calculate index in item_table -- calculate index in item_table
local i = (self.page - 1) * self.perpage + c local i = (self.page - 1) * self.perpage + c
if i <= #self.item_table then if i <= #self.item_table then
local item_shortcut = nil local item_shortcut = nil
local shortcut_style = "square" local shortcut_style = "square"
@ -401,7 +401,7 @@ function Menu:updateItems(select_number)
table.insert(self.layout, {item_tmp}) table.insert(self.layout, {item_tmp})
else else
-- item not enough to fill the whole page, break out of loop -- item not enough to fill the whole page, break out of loop
table.insert(self.item_group, table.insert(self.item_group,
VerticalSpan:new{ VerticalSpan:new{
width = (self.item_dimen.h * (self.perpage - c + 1)) width = (self.item_dimen.h * (self.perpage - c + 1))
}) })
@ -441,7 +441,7 @@ function Menu:onSelectByShortCut(_, keyevent)
if self.item_table[(self.page-1)*self.perpage + k] then if self.item_table[(self.page-1)*self.perpage + k] then
self:onMenuSelect(self.item_table[(self.page-1)*self.perpage + k]) self:onMenuSelect(self.item_table[(self.page-1)*self.perpage + k])
end end
break break
end end
end end
return true return true
@ -471,7 +471,7 @@ override this function to process the item selected in a different manner
]]-- ]]--
function Menu:onMenuSelect(item) function Menu:onMenuSelect(item)
if item.sub_item_table == nil then if item.sub_item_table == nil then
self.close_callback() self.close_callback()
self:onMenuChoice(item) self:onMenuChoice(item)
else else
-- save menu title for later resume -- save menu title for later resume

Loading…
Cancel
Save