mirror of https://github.com/koreader/koreader
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fadee1f5dc
Basically: * Use `extend` for class definitions * Use `new` for object instantiations That includes some minor code cleanups along the way: * Updated `Widget`'s docs to make the semantics clearer. * Removed `should_restrict_JIT` (it's been dead code since https://github.com/koreader/android-luajit-launcher/pull/283) * Minor refactoring of LuaSettings/LuaData/LuaDefaults/DocSettings to behave (mostly, they are instantiated via `open` instead of `new`) like everything else and handle inheritance properly (i.e., DocSettings is now a proper LuaSettings subclass). * Default to `WidgetContainer` instead of `InputContainer` for stuff that doesn't actually setup key/gesture events. * Ditto for explicit `*Listener` only classes, make sure they're based on `EventListener` instead of something uselessly fancier. * Unless absolutely necessary, do not store references in class objects, ever; only values. Instead, always store references in instances, to avoid both sneaky inheritance issues, and sneaky GC pinning of stale references. * ReaderUI: Fix one such issue with its `active_widgets` array, with critical implications, as it essentially pinned *all* of ReaderUI's modules, including their reference to the `Document` instance (i.e., that was a big-ass leak). * Terminal: Make sure the shell is killed on plugin teardown. * InputText: Fix Home/End/Del physical keys to behave sensibly. * InputContainer/WidgetContainer: If necessary, compute self.dimen at paintTo time (previously, only InputContainers did, which might have had something to do with random widgets unconcerned about input using it as a baseclass instead of WidgetContainer...). * OverlapGroup: Compute self.dimen at *init* time, because for some reason it needs to do that, but do it directly in OverlapGroup instead of going through a weird WidgetContainer method that it was the sole user of. * ReaderCropping: Under no circumstances should a Document instance member (here, self.bbox) risk being `nil`ed! * Kobo: Minor code cleanups. |
2 years ago | |
---|---|---|
.. | ||
autofrontlight_spec.lua | 3 years ago | |
autosuspend_spec.lua | 3 years ago | |
background_runner_spec.lua | 2 years ago | |
background_task_plugin_spec.lua | 4 years ago | |
batterystat_spec.lua | 2 years ago | |
benchmark.lua | 7 years ago | |
cache_spec.lua | 3 years ago | |
commonrequire.lua | 2 years ago | |
dbg_spec.lua | 7 years ago | |
defaults_spec.lua | 2 years ago | |
depgraph_spec.lua | 4 years ago | |
device_spec.lua | 2 years ago | |
docsettings_spec.lua | 5 years ago | |
document_registry_spec.lua | 4 years ago | |
document_spec.lua | 2 years ago | |
eink_optimization_spec.lua | 6 years ago | |
exporter_plugin_main_spec.lua | 2 years ago | |
filemanager_spec.lua | 3 years ago | |
filemanagerconverter_spec.lua | 3 years ago | |
focusmanager_spec.lua | 2 years ago | |
font_spec.lua | 8 years ago | |
frontlight_spec.lua | 5 years ago | |
gesturedetector_spec.lua | 4 years ago | |
gesturerange_spec.lua | 7 years ago | |
gettext_spec.lua | 4 years ago | |
hook_container_spec.lua | 7 years ago | |
httpclient_spec.lua | 2 years ago | |
imagewidget_spec.lua | 2 years ago | |
input_spec.lua | 2 years ago | |
inputtext_spec.lua | 6 years ago | |
koptinterface_spec.lua | 2 years ago | |
kosync_spec.lua | 5 years ago | |
luadata_spec.lua | 2 years ago | |
luasettings_spec.lua | 3 years ago | |
menu_table_screen_color_spec.lua | 5 years ago | |
menusorter_spec.lua | 4 years ago | |
mock_time.lua | 2 years ago | |
mock_time_spec.lua | 7 years ago | |
network_manager_spec.lua | 5 years ago | |
networksetting_spec.lua | 4 years ago | |
nickel_conf_spec.lua | 5 years ago | |
opds_spec.lua | 3 years ago | |
optmath_spec.lua | 3 years ago | |
persist_spec.lua | 3 years ago | |
quickstart_spec.lua | 7 years ago | |
random_spec.lua | 8 years ago | |
readerbookmark_spec.lua | 3 years ago | |
readerdictionary_spec.lua | 3 years ago | |
readerfooter_spec.lua | 2 years ago | |
readerhighlight_spec.lua | 2 years ago | |
readerlink_spec.lua | 3 years ago | |
readerpaging_spec.lua | 3 years ago | |
readerrolling_spec.lua | 2 years ago | |
readersearch_spec.lua | 3 years ago | |
readertoc_spec.lua | 3 years ago | |
readerui_spec.lua | 3 years ago | |
readerview_spec.lua | 2 years ago | |
readhistory_spec.lua | 3 years ago | |
screenshoter_spec.lua | 3 years ago | |
size_spec.lua | 7 years ago | |
spore_spec.lua | 7 years ago | |
switch_plugin_spec.lua | 7 years ago | |
textboxwidget_spec.lua | 5 years ago | |
time_spec.lua | 2 years ago | |
timeval_spec.lua | 3 years ago | |
toggleswitch_spec.lua | 5 years ago | |
touch_probe_spec.lua | 7 years ago | |
translator_spec.lua | 6 years ago | |
uimanager_bench.lua | 2 years ago | |
uimanager_spec.lua | 2 years ago | |
util_spec.lua | 3 years ago | |
version_spec.lua | 3 years ago | |
wakeupmgr_spec.lua | 2 years ago | |
widget_inputcontainer_spec.lua | 4 years ago | |
widget_menu_spec.lua | 4 years ago | |
widget_progresswidget_spec.lua | 7 years ago | |
wikipedia_spec.lua | 7 years ago |