Commit Graph

372 Commits (863255c9f426bdd6845f3f3eced4f270f1baecee)

Author SHA1 Message Date
Hzj_jie 30378eb2a8 Add restart koreader function and ensure FlushSettings event can be delivered to all widgets (#2772) 7 years ago
Qingping Hou 55ec64a859 readermenu(fix): override pan gesture from scrolling 7 years ago
Qingping Hou 72ae80870c quickstart fix (#2804)
* translation text fix

* quickstart(fix): go back to home dir after document close

* quickstart(fix): purge old quick start files

* spec: fix quickstart tests
7 years ago
Frans de Jonge a192178bf6 Version spec: slight improvements 7 years ago
Frans de Jonge 21622b5da8 Spec: Wikipedia stub 7 years ago
Frans de Jonge 89099e2c94 Swipe for menu and quickstart guide (#2761)
* Swipe for menu and quickstart guide

Because swiping for the menu is a big change from what we're used to, this commit includes a new quickstart guide.

Fixes #2608.

* add some dev docs
* add FileConverter spec
* add QuickStart spec
* add Version module
* add Version spec
7 years ago
Hzj_jie 999898fa69 Merge various information into systemstat (#2764)
* Merge various information to systemstat
7 years ago
Frans de Jonge 92b9139294 ReaderFooter (lang): "Show toc markers" to "Show chapter markers"
I think it sounds more natural as chapter than as table of content, which is an implementation detail (i.e., the chapter markers are shown based on what's in the TOC).

Also removed redundant "this" from "Remaining pages in this chapter"
7 years ago
Frans de Jonge 3982170886 MenuSorter: fix findById 7 years ago
Frans de Jonge e9df73f6dc Developer documentation improvements
* Fixed up all of util and added when absent
* Updated widget examples to new coding style
7 years ago
Robert a3c4254809 Added util.fixUtf8 (#2704)
* Remove invalid UTF-8 chars from OPDS
* add unit tests
7 years ago
Hzj_jie ea2de9638b LuaSettings:wrap() / LuaSettings:child() function to create an LuaSettings to represent a sub table of an existing one (#2685) 7 years ago
Frans de Jonge 8b7e18a7d7 MenuSorter: resolve review comments
* simplify user config loop
* simplify unit test for Travis memory use
* remove unused util variable
7 years ago
Frans de Jonge ddf590eb6d MenuSorter: split out menu order configuration 7 years ago
Frans de Jonge 33c848f813 MenuSorter: first unit tests 7 years ago
Frans de Jonge 653ff64438 MenuSorter: handle disabled 7 years ago
Frans de Jonge 8f31a81601 MenuSorter: some documentation
MenuSorter: forgot to add plugin style change

MenuSorter: worked out the final quirks

* Menu always compressed into tables without missing indexes for ipairs compatibility
* Orphans attached
* Separators no longer count as items
7 years ago
Frans de Jonge 56659ddb20 MenuSorter: avoid recursion in findById 7 years ago
Frans de Jonge b7b5950e98 MenuSorter: review comments and various bug fixes
* fixed wrongful retention of submenus variable and added return to MenuSorter:findById
* fixed readerfooter_spec.lua error
* fixed review comments
7 years ago
Qingping Hou 2aa9d5d64e test: add unit tests for docsettings 7 years ago
Qingping Hou 9b7aba3fba fix: override readerhighlight hold in readerfooter
Also fix touch zone dependency graph generation code.

ReaderHighlight has now been migrated to use touch zone

Inputcontainer's touch event handling logic changed to only stop
propagation when handler returns `true`. Previously, it stops
propagation when a handler is found. This is needed to support
both readerhighlight_tap and tap_forward touch zones.
7 years ago
Qingping Hou 0b9c9d6ddb test(chore): remove side effects 7 years ago
Hzj_jie 529d1b3d33 evernote: ReadHistory integration and text file output (#2498) 7 years ago
Qingping Hou 581039aed5 opds(fix): unescape name and value 7 years ago
poire-z a8dd8c6f30 textboxwidget: even better text wrapping
util.isSplitable() accepts now also the previous char to help
decide if a space can be used to split a line.
TextBoxWidget:_splitCharWidthList() : simplified logic
8 years ago
poire-z 5040bfe4c5 textboxwidget and scrolltextwidget enhancements (#2393)
util: made isSplitable() accept an optional next_char
for wiser decision

textboxwidget: speed up rendering, enhanced text wrapping,
allow selection of multiple words with Hold.

scrolltextwidget: allow scrolling with Tap.

Details in #2393
8 years ago
Qingping Hou a6c506dc10 kobolight(refactor): move into plugin & only enable for kobo 8 years ago
Qingping Hou 0c49b915de refactor: add touch zone subsystem to inputcontainer
Touch zone decouples screen size from gesture event registration.

The win here is each individual widget does not need to update
gesture range on screen rotate/resize anymore.

Another advantage is we now have a centralized ordered array to handle
all registered touch event listeners, makes it much easier to resolve
gesture range conflicts between multiple widgets.

This patch also includes the following changes:

* migrate readerpaging to use readerui's touch zone
* migrate readerfooter to use readerui's touch zone
* move inverse read direction setting to touch menu's setting tab
* moved kobolight widget from readerview into readerui
* various dead code cleanups and comments
8 years ago
Hzj_jie 9efc723388 PR #2356 breaks CJK character splitting 8 years ago
Qingping Hou cd24eb82d7 readerpaging(fix): handle edge cases where paging pan will crash the reader 8 years ago
robert00s fc5ba9b862 Fix hyphenation words with unicode character in texboxwidget (#2356) 8 years ago
Qingping Hou efae2ed16f network(fix): automaticallly obtain IP if network is already authenticated 8 years ago
Qingping Hou 558754e9b5 footer(refactor): various bug fixes and optimizations 8 years ago
Qingping Hou abbb72b6d3 readerrolling(fix): do not emit PageUpdate event until document is ready 8 years ago
Hzj_jie f1637ef19b Merge pull request #2268 from Hzj-jie/master
This is the implementation of whisper sync
8 years ago
Hzj_jie fd7ae875c0 Whisper sync feature
Now KOReader supports more sync options, and most of the sync operation can be
executed automatically.
8 years ago
Qingping Hou ebc7055b43 chore: move kobo specific code into kobo/device.lua 8 years ago
Qingping Hou 31470efa3b Merge pull request #2250 from Hzj-jie/master2
Add readhistory_spec / docsettings_spec
8 years ago
Zijie He ced671bc69 Add readhistory_spec / docsettings_spec 8 years ago
Zijie He 125fb6dfc6 unload network manager package to ensure it is initialized correctly. 8 years ago
Zijie He 9b66bf1149 Restore WIFI state when koreader starts. 8 years ago
Hzj_jie da2c57f93a Automatically connect WIFI after Kobo has been resumed (#2215)
* Add bash scripts to control WIFI / IP, so we can share them with frontend/device/kobo/device.lua.

* add test cases
8 years ago
chrox 001433e6bc various test/coverage optimization 8 years ago
chrox 7fd6037bb0 fix #2219
The ABS_PRESSURE ABS code is also detected on some KOBO devices
if ABS_PRESSURE events are feeded to handle orientation those devices
will have a unresponsive screen as described in #2219.

This patch registers an event adjustment handler for Kindle Oasis to
adjust the ABS_PRESSURE code to ABS_OASIS_ORIENTATION code so that
it won't affect event handling on other devices.
8 years ago
chrox 9ab005a1d3 fix unit test of readerlink and readerpaging
and have more confidence with the unit testing framework.

Now `make testfront` won't retry on failure and testing files are
ordered in each run so that it's possible to reproduce testing failure.

And this patch also fix flush settings not working before suspend issue:
at some point the `FlushSettings` event is sent to `UIManager` instead
of `ReaderUI`, but `UIManager` only delegated events to active widgets
and `ReaderUI` is actually not an active widgets thus will miss the event.

This patch also add a verbose debug mode with "-v" as a switch to turn
on this mode. With verbose mode on, event handling will be logged.
8 years ago
Qingping Hou 61b6896391 Merge pull request #2217 from chrox/benchmark_tool
fix k2pdfopt performance degradation
8 years ago
chrox 9afad43a3e refactoring utils to tools as discussed in #2197 8 years ago
chrox 7ea12c0198 fix broken unit tests on Travis CI
1. It turns out that `device_id` is not defined in unit test environment
which makes the `assert(self.kosync_device_id)` fail and somehow makes `luajit` segmentation fault.
2. In the device spec, stubbing `io.open` will make subsquent `require`
all return boolean value and segmentation fault `luajit`.

This patch is a minimum viable change that makes CI work on both my
local box and Travis.
8 years ago
Zijie He 820a39c8f7 Update KOSyncClient 8 years ago
Qingping Hou 1c5543358c readerfooter(fix): avoid setting mini footer to invisible when full progress bar is on
Our previous assumption is user will only choose between full or min
bar. The does not hold anymore as many more info has been added to the
mini bar and sometimes user might want to have both of them on. This
patch makes the reader behavior consistent when both bars are set to be
on for a document.
8 years ago
Qingping Hou f30e487959 readerpaging(fix): set the corrent page number on GoBackLink event 8 years ago
Qingping Hou 3339ed4e5f test(fix): update tests for default scroll mode 8 years ago
Qingping Hou 0d9fc17d7c chore: rename SetDefaults:SaveSettings 8 years ago
Qingping Hou 20eb36a03d feat: add network management UI for kobo 8 years ago
chrox 71bf9efc7c split accient greek words with spacing character
This should fix #1705.
8 years ago
Qingping Hou fadad90447 uimanager(fix): handle stack change in close 8 years ago
Qingping Hou af2f3c30c7 uimanager(fix): handle last widget in broadcast event properly 8 years ago
chrox f5ea29c8d3 fix unit test of defaults since we deleted one global default
I'm afraid this unit test is not maintainable, each time we
change the structure of the defaults.lua we must change this spec
accordingly. We probably will get rid of defaults.lua as well as the
filemanagersetdefaults and this spec.
8 years ago
Qingping Hou ce7ae2dfac uimanager(fix): handle edge case where second widget in stack is ignored 8 years ago
Hzj_jie cf8c0aa81f Add docsettings unittest 8 years ago
Hzj_jie 016aaa92b9 Merge remote-tracking branch 'upstream/master'
Conflicts:
	frontend/docsettings.lua
8 years ago
Qingping Hou 301925e34a textboxwidget(fix): handle onHoldWord event 8 years ago
Qingping Hou adf5ffdd26 dictquicklookup(fix): use self.region for matching hold event 8 years ago
Qingping Hou 2e417cfbd8 filemanager(refactor): use purge method from docsettings 8 years ago
Qingping Hou 8268d8d32c test(fix): clean up after screenshot test 8 years ago
chrox 449089881c accommodation of EPUB spec for new crengine 8 years ago
Huang Xin f718b0669f Merge pull request #2045 from koreader/defaults
defaults(refactor): remove global hack in filemanagersetdefaults
8 years ago
Qingping Hou a92a88e063 uimanager(fix): check active widgets in the correct order 8 years ago
Qingping Hou 9586b36eb6 defaults(fix): purge entry from persistent file 8 years ago
Qingping Hou 60587e08c6 defaults(refactor): remove global hack in filemanagersetdefaults
also added screensaver folder setting dialog for kobo
8 years ago
Qingping Hou 82a3e0f9ad automatically adjust ev time for kobo touch 8 years ago
Qingping Hou 068cefe8fc test: flush book settings before suspend 8 years ago
Qingping Hou f01b261188 test: add kindle init and fl tests 8 years ago
Qingping Hou ef4004e72b test(fix): disable footer in readerlink_spec 8 years ago
Qingping Hou 7c380121ea test: more readerfooter progressbar tests 8 years ago
Qingping Hou 0f3eeb24c9 progressbar(fix): persist progressbar visibility 8 years ago
Qingping Hou eb71d29716 kodev(minor): fix arg test 8 years ago
chrox 7071ae2b6e fix unit test of occurrences search 8 years ago
Qingping Hou d7b1b403c1 progresswidget(fix): ignore nil self.last 8 years ago
Qingping Hou 572412b1f6 readerrolling(fix): detect end of book properly 8 years ago
Qingping Hou c22a3747d8 fix all the tests 8 years ago
Qingping Hou 4a66036eb0 test: update test to match the new crengine typesetting 8 years ago
Frans de Jonge 5638819f25 Removed a bunch of "successfully", replaced an ellipsis, and some deviant spellings of KOReader. 8 years ago
Qingping Hou eb37d9b8b6 kobo: fix screen probe for touch 8 years ago
Qingping Hou 144fd170f1 uimanager(refactor): replace autosuspend if check with noop 8 years ago
Qingping Hou e3137134f8 dbg(add): guard method to toggle assert at based at runtimemode 8 years ago
Zijie He b86aa5a02b Implement auto-suspend function for Kobo. Add test case for UIManager:_checkTasks, which should not clear _task_queue_dirty bit before looping. 8 years ago
Qingping Hou e5c1ff1ef6 test(bookmark): purge doc settings before test 8 years ago
Qingping Hou 11d5b5c0a1 fix(readerlink): restore reader view context on go back 8 years ago
Qingping Hou 2d5222ef33 readerview: add get/set methods for view context 8 years ago
Qingping Hou f48d9bd6d9 fix(readerfooter): marker ticks initialization 8 years ago
Qingping Hou adc7ddccfc test: start every test suit with a clean reader setting 8 years ago
Qingping Hou c8cd1d67f5 test: more readerfooter tests 8 years ago
Zijie He 61ec784f91 Add eink_optimization_spec 8 years ago
Qingping Hou e52c74afcc test: more uimanager scheduler test 8 years ago
Qingping Hou b65983da1a multi-touch: add tests for gesturerange moudle 8 years ago
Qingping Hou 8190093f83 kobo: don't create FrontLightState config if it didn't exist to begin with 8 years ago
zijiehe e84093c414 Add a flState in Kobo, and KoboPowerD:toggleFrontlight uses flState to control the light instead of intensity. 8 years ago
Qingping Hou 8c01835458 fix: only show reader status at the end of the book 8 years ago
Qingping Hou 69f9ebd528 build: fix doc generation
also moved MD5 to koreader-base/ffi
8 years ago
Qingping Hou 03e81cfa4d test: fix readerui instance reset test 8 years ago
Qingping Hou 417bb5fb14 test: kill in fly hinting event 8 years ago
Qingping Hou 5e3100874f test: purge doc settings before test 8 years ago
Qingping Hou 12c6bd7121 test: fix readerbookmark unit test 8 years ago
chrox 493c887829 fix travis testfront 8 years ago
Qingping Hou 71ef994318 test: add nickle conf spec 8 years ago
Qingping Hou d1ca8bc494 fix(filemanager): delete document with settings 8 years ago
Qingping Hou 722eaed4b2 feat: docsettings:getSidecarDir 8 years ago
Qingping Hou 3b92bdc084 feat: support screenshot in filemanager 8 years ago
Qingping Hou 5aefb41631 fix readerfooter spec 9 years ago
Qingping Hou ab98097e72 add tests for scheduler 9 years ago
Qingping Hou 55234ef899 fix: read stats crashes pdf/djvu documents 9 years ago
chrox 19979fb8f8 postpone loading of httpclient module in unit test 9 years ago
chrox 54f5166254 add koptinterface spec 9 years ago
chrox 429eeed372 verbose unit test log so that we have a clue when there is segfault 9 years ago
Qingping Hou cdd17906f6 refactor: ui/font:getFace 9 years ago
chrox f0dbd5939c fix travis build segfault hopefully 9 years ago
Frans de Jonge 6eca0be44b Spec updates for new font 9 years ago
Qingping Hou a30fe26de0 Merge pull request #1543 from chrox/plugable-turbo
disable turbo lib by default
9 years ago
chrox a59621953d use turbo library in coverage test 9 years ago
chrox c7cac7b333 disable turbo lib by default 9 years ago
chrox 1fcc425eac regression test to safeguard droid sans fallback 9 years ago
chrox a4404cfb10 Add missing urw fonts and fix unit test 9 years ago
chrox d468b05567 Use turbo looper on Android 9 years ago
Qingping Hou 3a55edd0d5 chore: remove test tag 9 years ago
chrox 0058bc8511 Fix readerbookmark unit test 9 years ago
Qingping Hou 186673587e chore: fix some of the luacheck errors 9 years ago
chrox 932df2a2f9 Refactor out string.gsplit to util.gsplit 9 years ago
chrox 2f2611af42 fix Travis test 9 years ago
chrox 3984d5b31d disable debug in unit test 9 years ago
chrox d08e22ec2e add simple sync service as a plugin
The 'KOSync' plugin will synchronize furthest reading progress
across different koreader devices after users registering their
devices.

The synchronizing service is open-sourced as the project
[koreader/koreader-sync-server](https://github.com/koreader/koreader-sync-server).
9 years ago
chrox 9ab6224963 add lua Spore to build REST client 9 years ago
chrox d7faba5b5c request from async http client only accept one callback
and error should be checked in the callback
9 years ago
chrox 0191dc6530 revert busted to v1.10.0 to avoid segmentation fault in testing 9 years ago
chrox 4053b5adac fix unit test with latest busted 9 years ago
chrox e74d1fa557 turn off debug in unit test 9 years ago
chrox 9299b9a5e8 add async http client
it uses non-blocking turbo I/O looper to process http request
so that multiple http request can be handled simultaneously and http request
won't block user input, and most importantly, in Lua's way.
9 years ago
chrox 5c9a9198fb add Document:fastDigest method to calculate document hash without performance overhead 9 years ago
chrox 07ff30f89c add md5:update and md5:sum methods 9 years ago
Qingping Hou f1d44ec809 test: add imagewidget_spec 10 years ago
chrox 4f35834b2e wrap computation intensive functions in hook free env when makeing coverage test
so that Travis CI job won't fail because of timeout.
10 years ago
chrox d6c4465c47 fix coverage test fails on OPDS browser module
for some reason luxl.lua has problem when being set hook for luacov
10 years ago
Frans de Jonge 47d7a48555 OPDS: refactored unit test and fixed a minor bug with undefined image_rel 10 years ago
Frans de Jonge c25254a7ec OPDS: embryonic unit test for OPDS browser
This initial seed specifically tests against what recently broke in Gutenberg and FeedBooks.
10 years ago
chrox fe885be563 refactoring readerbookmark to show both bookmarks and highlights
in the bookmark menu
and use binary search of the sorted bookmarks table whenever is
possible.
10 years ago
chrox 08dff3a158 turn off debug in unit test by default
Uncommnet the `DEBUG:turnOn()` line to turn it on.
10 years ago
chrox 08f0f14ba3 fix dictionary spec 10 years ago
chrox 566586619a add unit tests for readerdictionary and readerhighlight 10 years ago
chrox 033ffb1d0f update readersearch and readertoc specs as crengine is updated 10 years ago
chrox b80dd1f966 add fulltext search for PDF documents 10 years ago
Hans-Werner Hilse 841e8bd9fa add test for md5 implementation 10 years ago
chrox 616ef3ba8e quit uimanager before run uimanager in test 10 years ago
chrox ae1dd3b380 screenshot to PNG files by default 10 years ago
chrox bd0975896d add fulltext search for EPUB documents 10 years ago
Hans-Werner Hilse 3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
10 years ago
Qingping Hou df61760c82 test: add spec for Menu.itemTableFromTouchMenu 10 years ago
chrox 7c9130744c add collapsable TOC menu 10 years ago
chrox de38ea1199 count only leaf nodes of toc tree when level is zero 10 years ago
chrox b422eb90cc refactoring readerrolling
and fix lossing progress when switching screen mode
10 years ago
chrox cec8ee3c29 add isChapterBegin/End API for readertoc
and add missing test epub
10 years ago
chrox b09bb87d4e refactoring readertoc and readerfooter
so that they don't repeat themselves.
10 years ago
chrox d0b4fa2665 refactoring unit testsuite 10 years ago
chrox f1f8d8dc4f make coverage target for code coverage for the unit test
so that we can easily find which module needs unit test

In order to run 'make coverage' `luacov` need to be installed
with 'sudo luarocks install luacov'.
10 years ago
chrox 794baf4d8a benchmark has no specifications so won't be run by default 10 years ago
chrox 8294a629b8 treate quoted slash as plain text in attribute value 10 years ago
chrox 21dcf787da add OPDS support
This PR implements a simple OPDS browser which can be launched
from filemanager menu.
10 years ago
chrox 7048ca971b add getCoverPageImage api for CreDocument 10 years ago
chrox b6393b543b no need of luagettext module 10 years ago
chrox da84daf17f add cache spec 10 years ago
chrox 2ad371853a add reflowing benchmark 10 years ago
chrox 5d77abd804 add spec of document rendering benchmark 10 years ago
chrox 71eda7a0ca busted test for frontend 10 years ago