[core] Remove a bunch of superflous semicolons (#9449)

reviewable/pr9501/r1
zwim 2 years ago committed by GitHub
parent 96930f230f
commit d972b7fcfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -473,7 +473,7 @@ This may help with Greek words among Latin text (as Latin fonts often do not hav
G_reader_settings:saveSetting("cre_monospace_scaling", scale) G_reader_settings:saveSetting("cre_monospace_scaling", scale)
self.ui.document:setMonospaceFontScaling(scale) self.ui.document:setMonospaceFontScaling(scale)
self.ui:handleEvent(Event:new("UpdatePos")) self.ui:handleEvent(Event:new("UpdatePos"))
end end,
}) })
end, end,
help_text = _([[ help_text = _([[
@ -486,10 +486,10 @@ This setting allows scaling all monospace fonts by this percentage so they can f
text = _("Generate font test document"), text = _("Generate font test document"),
callback = function() callback = function()
UIManager:show(ConfirmBox:new{ UIManager:show(ConfirmBox:new{
text = _("Would you like to generate an HTML document showing some sample text rendered with each available font?"); text = _("Would you like to generate an HTML document showing some sample text rendered with each available font?"),
ok_callback = function() ok_callback = function()
self:buildFontsTestDocument() self:buildFontsTestDocument()
end end,
}) })
end, end,
}) })

@ -363,7 +363,7 @@ function ReaderSearch:search(pattern, origin, regex, case_insensitive)
Device:setIgnoreInput(true) Device:setIgnoreInput(true)
local retval, words_found = self.ui.document:findText(pattern, origin, direction, case_insensitive, page, regex, self.max_hits) local retval, words_found = self.ui.document:findText(pattern, origin, direction, case_insensitive, page, regex, self.max_hits)
Device:setIgnoreInput(false) Device:setIgnoreInput(false)
local regex_retval = regex and self.ui.document:getAndClearRegexSearchError(); local regex_retval = regex and self.ui.document:getAndClearRegexSearchError()
if regex and regex_retval ~= 0 then if regex and regex_retval ~= 0 then
local error_message local error_message
if SRELL_ERROR_CODES[regex_retval] then if SRELL_ERROR_CODES[regex_retval] then

@ -875,8 +875,7 @@ function ReaderStyleTweak:editBookTweak(touchmenu_instance)
-- being shown: having them identical will hide that. -- being shown: having them identical will hide that.
end end
end, end,
close_discarded_notif_text = NOT_MODIFIED_MSG; close_discarded_notif_text = NOT_MODIFIED_MSG,
} }
UIManager:show(editor) UIManager:show(editor)
editor:onShowKeyboard(true) editor:onShowKeyboard(true)

@ -454,7 +454,7 @@ function Device:test()
end end
function Device:exit() function Device:exit()
android.LOGI(string.format("Stopping %s main activity", android.prop.name)); android.LOGI(string.format("Stopping %s main activity", android.prop.name))
android.lib.ANativeActivity_finish(android.app.activity) android.lib.ANativeActivity_finish(android.app.activity)
end end

@ -590,11 +590,11 @@ Note that your selected font size is not affected by this setting.]]),
value_table = { 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, value_table = { 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9,
0.95, 0.98, 1, 1.02, 1.05, 1.1, 1.15, 1.2, 1.25, 1.3, 1.35, 1.4, 1.45, 0.95, 0.98, 1, 1.02, 1.05, 1.1, 1.15, 1.2, 1.25, 1.3, 1.35, 1.4, 1.45,
1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9,
3, 3.5, 4, 4.5, 5, 5.5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; 3, 3.5, 4, 4.5, 5, 5.5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
args_table = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, args_table = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 29, 40, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 29, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 }; 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 },
value_step = 1, value_step = 1,
}, },
}, },

@ -92,9 +92,9 @@ common_settings.time = {
sub_item_table = { sub_item_table = {
{ {
text_func = function() text_func = function()
local util = require('util'); local util = require('util')
-- sample text shows 1:23:45 -- sample text shows 1:23:45
local duration_format_str = util.secondsToClockDuration("classic", 5025, false); local duration_format_str = util.secondsToClockDuration("classic", 5025, false)
return T(_("Classic (%1)"), duration_format_str) return T(_("Classic (%1)"), duration_format_str)
end, end,
checked_func = function() checked_func = function()
@ -107,9 +107,9 @@ common_settings.time = {
}, },
{ {
text_func = function() text_func = function()
local util = require('util'); local util = require('util')
-- sample text shows 1h23m45s -- sample text shows 1h23m45s
local duration_format_str = util.secondsToClockDuration("modern", 5025, false); local duration_format_str = util.secondsToClockDuration("modern", 5025, false)
return T(_("Modern (%1)"), duration_format_str) return T(_("Modern (%1)"), duration_format_str)
end, end,
checked_func = function() checked_func = function()

@ -13,7 +13,7 @@ local StreamMessageQueue = MessageQueue:new{
} }
function StreamMessageQueue:start() function StreamMessageQueue:start()
self.context = czmq.zctx_new(); self.context = czmq.zctx_new()
self.socket = czmq.zsocket_new(self.context, C.ZMQ_STREAM) self.socket = czmq.zsocket_new(self.context, C.ZMQ_STREAM)
self.poller = czmq.zpoller_new(self.socket, nil) self.poller = czmq.zpoller_new(self.socket, nil)
local endpoint = string.format("tcp://%s:%d", self.host, self.port) local endpoint = string.format("tcp://%s:%d", self.host, self.port)

@ -22,7 +22,7 @@ end
function SwitchPlugin:new(o) function SwitchPlugin:new(o)
o = self:extend(o) o = self:extend(o)
assert(type(o.name) == "string", "name is required"); assert(type(o.name) == "string", "name is required")
o.settings = LuaSettings:open(DataStorage:getSettingsDir() .. "/" .. o.name .. ".lua") o.settings = LuaSettings:open(DataStorage:getSettingsDir() .. "/" .. o.name .. ".lua")
o.settings_id = 0 o.settings_id = 0
SwitchPlugin._init(o) SwitchPlugin._init(o)

@ -161,7 +161,7 @@ end
-- @treturn RenderTextSize -- @treturn RenderTextSize
function RenderText:sizeUtf8Text(x, width, face, text, kerning, bold) function RenderText:sizeUtf8Text(x, width, face, text, kerning, bold)
if not text then if not text then
logger.warn("sizeUtf8Text called without text"); logger.warn("sizeUtf8Text called without text")
return { x = 0, y_top = 0, y_bottom = 0 } return { x = 0, y_top = 0, y_bottom = 0 }
end end
@ -209,7 +209,7 @@ end
-- @return int width of rendered bitmap -- @return int width of rendered bitmap
function RenderText:renderUtf8Text(dest_bb, x, baseline, face, text, kerning, bold, fgcolor, width, char_pads) function RenderText:renderUtf8Text(dest_bb, x, baseline, face, text, kerning, bold, fgcolor, width, char_pads)
if not text then if not text then
logger.warn("renderUtf8Text called without text"); logger.warn("renderUtf8Text called without text")
return 0 return 0
end end

@ -286,7 +286,7 @@ function TitleBar:init()
end end
local line_widget = LineWidget:new{ local line_widget = LineWidget:new{
dimen = Geom:new{ w = self.width, h = Size.line.thick }, dimen = Geom:new{ w = self.width, h = Size.line.thick },
background = self.bottom_line_color; background = self.bottom_line_color
} }
if self.bottom_line_h_padding then if self.bottom_line_h_padding then
line_widget.dimen.w = line_widget.dimen.w - 2 * self.bottom_line_h_padding line_widget.dimen.w = line_widget.dimen.w - 2 * self.bottom_line_h_padding

Loading…
Cancel
Save