100 Commits
Author SHA1 Message Date
Huang Xin f384a8311c Fixed zlib has no soname on Kindle (#3523) (#3524) 2017-11-29 13:21:45 +08:00
Huang Xin a44b39fda6 [build] Darwin build of Android port (#3520) 2017-11-28 02:23:54 +08:00
Huang Xin 0e5293f1eb [fix] add OSX build prerequisites cmake and makedepend (#3478) 2017-11-12 00:00:56 +08:00
Huang Xin c22b8393d7 [android] fix hide nav bar on activity create (#3357) 2017-10-14 23:42:55 +08:00
Huang Xin a4e1a3ba5e reflect changes in koreader/android-luajit-launcher#62 (#3254) 2017-09-24 05:58:34 +08:00
Huang Xin 8938786472 [fix] stop propagation of tap events when triggering reader menu (#2934)
* [fix] stop propagation of tap events
when triggering reader menu
And also get rid of unnecessary screen refreshes on Kindle Voyage.
The "progress" window for dict lookup is also eliminated as most of the time dict lookup is an instant process, and the "progress" window is preserved for wikipedia lookup as it may take longer time to show the result window.

* [up] add an option to disable dictionary fuzzy search

* [fix] tidy up require

* [fix] fix read settings
2017-06-19 00:08:57 +08:00
chrox fef18ec73a [fix] revert removing tap gestures to show menus
as the tap gesture on the upper part (mostly) of the screen is
a conventional design to show menus in almost all ereaders as well as
some mobile phone apps. While users not farmilar with the Android world
have no experience with swipe down to show menus that's why we need a
quick start guide for this feature. And experienced Koreader users
probably will turn pages by mistake each time they want to popup the menus.

The solution here is adding back the tap gestures as they were and keep
the new swipe to show menu feature as a supplementary function when
link's tap area blocks menu's tap area.
2017-06-01 20:04:14 +02:00
chrox e6bdcd36c4 fix cannot login to Evernote
This should fix #2231, fix #2332, fix #2387 and fix #2452.
2017-03-05 18:54:14 -08:00
Huang Xin 2859d8ee07 Merge pull request #2381 from Hzj-jie/master3
PR #2356 breaks CJK character splitting
2016-11-26 10:22:04 +08:00
Huang Xin b16a33a232 Merge pull request #2375 from koreader/houqp-master
readerpaging(fix): handle edge cases where paging pan will crash the reader
2016-11-25 10:27:33 +08:00
chrox fcb766784b fix build on OSX 2016-11-24 11:41:00 -08:00
Huang Xin c9ffd44fc8 Merge pull request #2287 from koreader/houqp-master
minor changes
2016-10-17 09:35:57 +08:00
Huang Xin 0facc96f4c Merge pull request #2286 from koreader/houqp-master
defaults: try parse int from user input
2016-10-16 10:01:55 +08:00
Huang Xin 8f09c45536 Merge pull request #2279 from koreader/houqp-master
kodev fixes and bump base/luajit-launcher
2016-10-10 11:14:44 +08:00
chrox b0498ec9b9 revert 9ab005a changes to UIManager:sendEvent
which would make readerui handle swipe event twice.

And use broadcastEvent to emit `FlushSettings` event.

This should fix #2225 and fix #2226.
2016-08-19 00:00:01 +08:00
chrox 001433e6bc various test/coverage optimization 2016-08-15 00:32:40 +08:00
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.
2016-08-13 18:57:15 +08:00
Huang Xin aa8d4f27ae Merge pull request #2218 from chrox/fix_swipe_paging
fix unit test of readerlink and readerpaging
2016-08-13 18:56:53 +08:00
chrox 166aa52a24 move painting and drawing debug log to verbose 2016-08-12 17:47:35 +08:00
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.
2016-08-12 17:05:07 +08:00
chrox 2fa8ebb7c4 don't consume swipe gesture event in readerlink
if location stack is empty
2016-08-12 09:33:31 +08:00
chrox 214c8971e7 fix k2pdfopt performance degradation 2016-08-11 22:53:00 +08:00
chrox 9afad43a3e refactoring utils to tools as discussed in #2197 2016-08-11 19:29:09 +08:00
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.
2016-08-11 18:17:09 +08:00
Huang Xin 37d39759e4 Merge pull request #2193 from NiLuJe/master
Update base
2016-07-28 19:50:21 +08:00
Huang Xin 0d70840504 Merge pull request #2182 from koreader/houqp-master
footer(fix): avoid setting mini footer to invisible when full progress bar is on
2016-07-24 18:23:30 +08:00
Huang Xin 06bd4d7afc Merge pull request #2168 from koreader/houqp-master
scrolltextwidget(fix): add moveCursor method
2016-07-19 14:04:59 +08:00
Huang Xin 6a7f55f812 Merge pull request #2160 from koreader/houqp-master
set scroll mode as default
2016-07-19 07:42:18 +08:00
Huang Xin 71b3fd3fcc Merge pull request #2167 from NiLuJe/master
Fix KT3 battery sysfs entries
2016-07-19 07:40:57 +08:00
chrox 1d887f4fe1 book reading statistics for djvu documents 2016-07-15 23:00:46 +08:00
chrox 41c79407b9 diable double tap by default in the widget stack
This should fix #2141 and fix #2130.
2016-07-14 08:56:10 +08:00
Huang Xin 014abf21bc Merge pull request #2153 from houqp/houqp-master
reader(fix): fix crash when DAUTO_SAVE_PAGING_COUNT is set to 0
2016-07-14 08:08:56 +08:00
Huang Xin b8f23d162d filemanager(fix): refresh banner in filemanager insteand of TextWidget 2016-07-12 21:34:17 -07:00
Huang Xin fc5d350f8c Merge pull request #2151 from houqp/network
network setting menu for kobo
2016-07-12 21:13:19 +08:00
Huang Xin 15ace2cb7f Merge pull request #2148 from NiLuJe/master
Bump base to fix OS X build
2016-07-09 23:22:36 +08:00
Huang Xin cbf3b5ce99 Merge pull request #2143 from NiLuJe/master
Support the White Kindle PaperWhite 3 & the Kindle Oasis
2016-07-09 10:17:04 +08:00
Huang Xin 9364ff5776 Merge pull request #2139 from Hzj-jie/master2
TextWidget should set dirty region in setText function
2016-07-08 18:36:40 +08:00
chrox 41f2fe85b7 fix #2119 by updating libSDL2.so and fix Evernote Plugin 2016-07-05 22:16:42 +08:00
Huang Xin a96c909535 Merge pull request #2129 from Hzj-jie/master
Add folder name in file manager
2016-07-05 19:15:50 +08:00
chrox dee65a7999 add inactive touch zones around buttons on Kindle Voyage
This should fix #1801.
2016-07-01 23:47:32 +08:00
chrox d62415ff69 fix #1994 by updating sdcv 2016-06-30 21:49:14 +08:00
chrox a6e2b77b28 update koreader-base to fix PIE error on Android L 2016-06-30 08:55:23 +08:00
chrox 1c5c7d3a7c fix #1682 by closing all dict windows when holding close icon 2016-06-29 00:35:00 +08:00
chrox 71bf9efc7c split accient greek words with spacing character
This should fix #1705.
2016-06-28 23:50:25 +08:00
chrox 6ec30376a6 fix two crashes 2016-06-28 00:45:01 +08:00
chrox 551857ce6e fix some luacheck warnings 2016-06-28 00:43:23 +08:00
chrox 03fda94562 fix #2110 by adding disable double tap option in screen options 2016-06-27 23:02:10 +08:00
Huang Xin 48331f42ef Merge pull request #2109 from koreader/houqp-master
bump base and add epub conform data
2016-06-27 08:04:39 -05:00
chrox 1cecffb9ae fix koreader-base spec 2016-06-27 00:23:05 +08:00
chrox 27c6933c35 update koreader-base
This should fix #1714 and fix #2107.
2016-06-27 00:06:26 +08:00
chrox f1b76d41d9 fix crash when clearing inputbox 2016-06-26 22:43:40 +08:00
chrox 3d7fe1002c we should disable double tap by default
Currently only column-zoom mode in PDF uses double tap gesture.
2016-06-26 22:36:54 +08:00
chrox 6b43233c4a fix #2092
And fix several other bugs introduced in #2028:
1. hint messages are back instead of the "Demo hint"
2. cursor now only presents in the focused inputbox in a multiinput dialog
3. moving cursor now works in multiinput dialog
2016-06-26 01:33:18 +08:00
chrox 687b6df4f2 add support of screen brightness settings for Android
and use standrad Android API to query battery level and charging status
This should fix #2025, fix #1759 and fix #1415.
2016-06-24 02:05:20 +08:00
Huang Xin f3732fd04d Merge pull request #2099 from koreader/houqp-master
uimanager(fix): honor second when calling Input:waitEvent
2016-06-23 06:48:48 -05:00
Huang Xin ded98125d3 Merge pull request #2098 from koreader/houqp-master
uimanager(fix): handle stack change in close
2016-06-21 06:58:01 -05:00
chrox 682ff27ab7 fix Android build 2016-06-19 22:59:16 +08:00
Huang Xin 48c414123b Merge pull request #2088 from koreader/houqp-master
uimanager(fix): handle last widget in broadcast event properly
2016-06-19 01:35:52 -05:00
chrox ad88192d85 fix #2054 by removing ticks max limitation 2016-06-17 00:23:03 +08:00
chrox 0ca82fb072 fix #2084 introduced by copy and paste in #2079 2016-06-17 00:05:25 +08:00
chrox 40858c670a restrict dictionary window inside of screen especially in landscape mode
This should fix #2020.
2016-06-17 00:04:47 +08:00
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.
2016-06-15 02:52:58 +08:00
chrox 5bbcae954e fix #2060 by handling blank search pattern 2016-06-15 02:34:46 +08:00
chrox 5983050d79 PDF free zoom mode revisit
this should implement feature request of zoom mode for multi-columns
page in #501
This PR depends on koreader/koreader-base#435

How to use?
1. Tap the top left corner of a PDF/Djvu page to get into the flipping
mode
2. Double-tap on text block will zoom in to that column
3. Double-tap on any area will zoom out to an overview of the page
4. repeat step 2 to focus to another page block

How does it work?
1. We first find the mask of text blocks in the page. (Pic 1)
2. Then we intersect page boxes with user tap to form a page block. (Pic 2)
3. Finally we zoom the page to the page block and center current view to
that block. (Pic 3)
2016-06-15 02:05:09 +08:00
Huang Xin 22d0dbfb4f Merge pull request #2075 from chihyang/master
Add a new feature 'read from right to left'
2016-06-14 23:07:17 +08:00
Huang Xin 18a54f839d Merge pull request #2081 from koreader/houqp-master
handle auto shutdown in pocketbook
2016-06-14 23:05:11 +08:00
Huang Xin 3544d0b0ee Merge pull request #2076 from koreader/houqp-master
uimanager(fix): handle edge case where second widget in stack is ignored
2016-06-13 10:14:03 -05:00
Huang Xin 751e46c85b Merge pull request #2055 from koreader/houqp-master
Fix unit test on ubuntu 16.04
2016-06-02 06:02:16 -05:00
chrox 449089881c accommodation of EPUB spec for new crengine 2016-06-01 21:35:14 +08:00
chrox f07ff43db4 update koreader-base 2016-06-01 21:35:14 +08:00
Huang Xin fd39016c87 Merge pull request #2028 from union2find/master
Add cursor functionality for inputtext widget
2016-06-01 08:34:42 -05:00
Huang Xin ffca77af40 Merge pull request #2032 from koreader/keyboard
russian keyboard layout improvement from mergen3107
2016-06-01 08:32:54 -05:00
Huang Xin f718b0669f Merge pull request #2045 from koreader/defaults
defaults(refactor): remove global hack in filemanagersetdefaults
2016-06-01 08:31:36 -05:00
Huang Xin e3ff96d108 Merge pull request #2042 from koreader/houqp-master
automatically set proper ev timeval for kobo touch
2016-05-26 19:31:15 -05:00
chrox 4c491b5ee2 rename 'Highlight' to 'Highlight options' in menu
This should fix #2023.
2016-05-14 12:20:01 +08:00
chrox 5e8c045fcb Bump k2pdfopt to v2.34, tesseract-ocr to 3.04 and leptonica to v1.72 2016-05-13 00:46:03 +08:00
chrox 6e723237ba fix 'opening file' dialog not centered in landscape
by setting the timeout to 0.0 seconds so that when the screen
is turned to landscape the dialog is already closed.
2016-04-23 23:09:34 +08:00
chrox 92184f0199 fix #1985 by always return to the parent dir of current doc in the FileManager 2016-04-23 22:57:19 +08:00
chrox 7071ae2b6e fix unit test of occurrences search 2016-04-23 21:53:06 +08:00
chrox 25b70007d4 update to latest koreader base 2016-04-22 20:13:44 +08:00
chrox df65d2972a experimental port to Mac OSX
Currently it can open cre-based docs and Djvu docs
It still has some problems with PDF docs and the touch input.
2016-04-22 20:13:44 +08:00
Huang Xin c1932fc927 Merge pull request #1956 from Hzj-jie/master
Use Screen:scaleBySize to auto scale virtual keyboard size
2016-04-12 09:06:05 -05:00
chrox f3e0d44cc4 disable jit on some modules on android
to make koreader on Android  more stable

and with these opt params:
```
require("jit.opt").start("sizemcode=64","maxmcode=64", "hotloop=10000")
```

The strategy here is that we only use precious mcode memory (jitting)
on deep loops like the several blitting methods in blitbuffer.lua and
the pixel-copying methods in mupdf.lua. So that a small amount of mcode
memory (64KB) allocated when koreader is launched in the android.lua
is enough for the program and it won't need to jit other parts of lua
code and thus won't allocate mcode memory any more which by our
observation will be harder and harder as we run koreader.
2016-04-07 23:43:58 +08:00
Huang Xin 503b2073ce Merge pull request #1946 from koreader/houqp-master
touch_probe(fix): do not filter probe touch event by range
2016-04-07 00:21:05 -05:00
Huang Xin d6426ab872 Merge pull request #1930 from koreader/houqp-master
fix(readerrolling): crash with legacy last_per config in page mode
2016-04-02 02:18:19 -05:00
Huang Xin 35a5cbe6d5 Merge pull request #1912 from koreader/houqp-master
bump luajit-launcher
2016-03-21 03:36:55 -05:00
chrox dd9dde510c don't update git-rev file in android ota package 2016-03-15 20:43:12 +08:00
Huang Xin b3147c7412 Merge pull request #1888 from koreader/houqp-master
minor bookstatus fix for nexus5x
2016-03-15 20:25:04 +08:00
chrox 3a9cb659d1 add OTA update on Android 2016-03-13 23:43:05 +08:00
Huang Xin fefd89013d Merge pull request #1878 from koreader/houqp-master
doc: add new files in travis doc push
2016-03-10 17:52:55 +08:00
Huang Xin 025daad708 Merge pull request #1877 from koreader/houqp-master
fix: delay showReader after UIManager:run is called
2016-03-09 19:40:51 +08:00
Huang Xin 30c630ba2f Merge pull request #1873 from koreader/houqp-master
layout adjustment for readerstatus & autoRefreshTime bug fix
2016-03-08 19:27:34 +08:00
Huang Xin 2fda2d0a2b Merge pull request #1869 from koreader/houqp-master
fix double crash in readerui...
2016-03-06 08:48:15 +08:00
Huang Xin 203048cf40 Merge pull request #1864 from koreader/houqp-master
unschedule footer clock refresh task on document close.
2016-03-01 22:50:44 +08:00
Huang Xin 09d477418c Merge pull request #1861 from NiLuJe/master
Some more Kindle 5.7 fixes...
2016-03-01 07:52:55 +08:00
Huang Xin f56b5311fb Merge pull request #1860 from frankyifei/new
update
2016-02-29 22:59:20 +08:00
Huang Xin 03d7b7d61c Merge pull request #1855 from koreader/houqp-master
bump base for android fix
2016-02-29 07:50:57 +08:00
Huang Xin 2d7d7f8b8b Merge pull request #1856 from houqp/fixmd5
fix: use ffi/md5 in plugins
2016-02-28 08:40:12 +08:00
Huang Xin a1d4a9603a Merge pull request #1843 from koreader/houqp-master
push doc update from travis & show book status at the end of the book
2016-02-24 23:14:01 +08:00
chrox 529cb801c1 fix broken extended InputDialog components
eg. LoginDialog and MultiInputDialog
since the style refactoring in #1783.
2016-02-21 23:30:06 +08:00