2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

7931 Commits

Author SHA1 Message Date
yparitcher
4548ced866
Quickstart: add long press sets default (#7048)
add wiki reference
2020-12-26 12:46:14 +01:00
NiLuJe
f534e08ad1
Bump android-luajit-launcher (#7055)
https://github.com/koreader/android-luajit-launcher/pull/280
2020-12-26 01:19:00 +01:00
Frans de Jonge
53909db687
Close Lua state on all os.exit() calls (#7050)
Cf. <https://github.com/koreader/koreader/pull/7044>.
2020-12-25 16:19:16 +01:00
NiLuJe
21af9144ab
Don't paint invisible background-colored rounded corners (#7046)
* Don't paint invisible background-colored rounded corners

Made obvious when testing #7042

* Only enforce a highlight radius on buttons that don't already set a
custom one ;).

(Mostly, square buttons with a 0 radius ^^).

ffi/blitbuffer already handles radius being nil, which suits us just fine
:)
2020-12-25 00:39:13 +01:00
NiLuJe
7bc8ed87d0
kodev: Avoid catchsegv via -S, --no-catchsegv (#7044)
This works around #7036 on my end (so far).

* Turns out we can actually ask os.exit to close the Lua state, wheee!
Thanks @Frenzie ;).
2020-12-25 00:38:31 +01:00
NiLuJe
39c60ada20
Android: Avoid the Lua blitter (#7042)
* Bump android-luajit-launcher

https://github.com/koreader/android-luajit-launcher/pull/279

* Bump base

https://github.com/koreader/koreader-base/pull/1265
https://github.com/koreader/koreader-base/pull/1267
https://github.com/koreader/koreader-base/pull/1268
2020-12-25 00:37:21 +01:00
Frans de Jonge
dafaf966e4
htmlToPlainText(): Format paragraphs with indentation (#7027)
Cf. <https://www.mobileread.com/forums/showthread.php?p=4072308#post4072308>.
2020-12-24 15:38:18 +01:00
Frans de Jonge
ad08ce9849
OPDS: Inform and warn about downgrade attack (#7032)
Fixes <https://github.com/koreader/koreader/issues/7007>.
2020-12-24 15:37:19 +01:00
Galunid
d5103bddc3
Add fall back to text selection option to panel zoom (#6960)
* Add fall back to text selection option to panel zoom
* Add functions to allow per extension settings
2020-12-24 09:07:27 +01:00
yparitcher
b2b9b49859 ReaderActivityIndicator: fix isStub()
it was being overridden by the EventListener:new

caused by #7002

c.f. https://www.mobileread.com/forums/showthread.php?t=335886
2020-12-23 23:49:53 -05:00
yparitcher
405c48b6ea Show only 1 End Document Dialog at a time
if scrolling past the end of a document the EndOfBook event get fired once per scroll (a lot)
2020-12-23 23:43:54 -05:00
yparitcher
c3fd6ae38b Margins: allow direct input (more_options) 2020-12-23 23:42:34 -05:00
NiLuJe
d845741b15
Android: Don't mark the platform as should_restrict_JIT (#7024)
* Android: Don't mark the platform as should_restrict_JIT

And see how much stuff breaks \o/

* Prevent Android users from disabling the C blitter, regardless of the
restrict flag

* Update android-luajit-launcher

https://github.com/koreader/android-luajit-launcher/pull/278
https://github.com/koreader/android-luajit-launcher/pull/275
2020-12-24 02:37:03 +01:00
NiLuJe
09c1f35191
rM: Unbreak PowerEvents (#7043)
Most of this is scheduled with delays for reasons, so this was a stupid
idea, my bad ;).

Fix #7033
2020-12-24 02:36:05 +01:00
NiLuJe
838769b0fb
BookInfo: Saner database migration (#7039)
Avoid opening two connections in //, by feeding the current connection
to saveSetting, like we were already doing for loadSettings...

It somehow worked just fine on Kobo/Emu, but blew up in fun and
interesting ways on Kindle, probably because of the Fuse proxy.

It was still pretty dumb nonetheless.
2020-12-24 02:35:13 +01:00
NiLuJe
7dd94b348f
rM: Switch to plain dumb sleep during the crash screen (#7038)
The seven billion different input devices on an rM make this trickier in practice.
Plus, rM1 vs. rM2 platform differences...
2020-12-24 02:34:16 +01:00
NiLuJe
8e3a117c68
Rejig CBB toggling on startup to avoid an extra jit.flush (#7023)
* When the CBB is disabled, attempt to apply the JIT tweaks earlier,
avoiding the JIT code flush in the process

* Drop debug prints

* Bump base

https://github.com/koreader/koreader-base/pull/1263
https://github.com/koreader/koreader-base/pull/1264
2020-12-23 17:06:08 +01:00
NiLuJe
7df60ba0e4
OPDSBrowser: Update the title during navigation (#7034)
* OPDSBrowser: Update the title during navigation

Fix #7030
2020-12-23 14:35:54 +01:00
NiLuJe
b78d9c1576
Menu: Clear path history on close (#7028)
Move the the paths table outside of the class, make it per instance instead
2020-12-23 00:24:16 +01:00
Frans de Jonge
d355e6482d
Revert ManyBooks and Flibusta to HTTP (#7031)
Cf. <https://github.com/koreader/koreader/issues/7007>.
2020-12-22 21:47:26 +01:00
NiLuJe
a15106fcc6
NetworkManager: Slightly more accurate wifi strength icons (#7020)
* Update lj-wpaclient to get more consistent link quality values out of it
* Simplify wifi strength icon selection
2020-12-21 18:48:33 +01:00
NiLuJe
f5a7541dbb
[UX] Use a full-width plus for buttons paired with a unicode minus (#7018)
U+FF0B vs. U+002B

Because otherwise it is not, in fact, the same width as the minus, which looks weird in buttons ;).

Re #3840 & #6939
2020-12-20 20:47:40 +01:00
poire-z
9f25dc75a0
IconWidget: fix user icons directory path (#7019)
Should be `DataStorage:getDataDir()` instead of `DataStorage:getSettingsDir()`.
(`koreader/icons/` instead of `koreader/settings/icons/`) https://github.com/koreader/koreader/pull/6977#discussion_r546375434
2020-12-20 20:45:55 +01:00
NiLuJe
90ad2bcf52
Fix y origin of the configmenu extended tapzone (#7015)
Forgot to update it during the revamps in #6918, meaning it starts much
higher than expected.
2020-12-20 09:32:43 +01:00
NiLuJe
4cb752c1df
Bump base (#7016)
(zstd 1.4.8)
2020-12-20 03:58:49 +01:00
NiLuJe
cffdd40c1a
macOS: Linting in do_mac_bundle (#7014) 2020-12-20 01:07:02 +01:00
NiLuJe
49e0e535b5
macOS: Comment the brew shenanigans (#7013)
* Comment the brew shenanigans
  (And support non-standard brew prefixes, just in case)
* Bump base to pickup https://github.com/koreader/koreader-base/pull/1260
* Handle libsodium, too
Co-authored-by: Martín Fernández <paziusss@gmail.com>
2020-12-19 23:55:07 +01:00
NiLuJe
f4e2878a3c
Implement proper alpha-blending of SVG icons (#7011)
* Implement proper alpha-blending of SVG icons

Also, instead of doing that every time, cache a pre-composited version
that matches the screen's BB type.
This is faster, and also has the advantage of making icon highlights
behave.

Jot down a few notes about corner-cases or future improvements, e.g.,
dimming icons on non-white backgrounds, and nightmode with color icons.
2020-12-19 22:34:16 +01:00
Frans de Jonge
a5b133dadc
[UX] Wait 0.5s before showing "searching for" dialog (#7012)
Fixes <https://github.com/koreader/koreader/issues/3030>.

Cross-ref to <https://github.com/koreader/koreader/pull/6998>.
2020-12-19 20:02:09 +01:00
NiLuJe
642978c97c
FileManager: Make reinit slightly less hackish (#7006)
Much like #6958 did for plugins, registering listener twice was also a
big boo-boo.

Revamp the whole thing to make it slightly less hackish.
2020-12-19 16:27:53 +01:00
poire-z
daefdc96e9 Remove PNG icons, add koreader.svg
Also move Mac specific resource in platform/mac/.
2020-12-19 14:49:18 +01:00
poire-z
24424e505e Update UI layout code to use new SVG icons
- Add IconWidget, use it for icons instead of ImageWidget.
  Specify icons by name only, look for them (with either
  .svg or .png suffixes) in multiple directories (including
  koreader/settings/icons/ to allow customizing them).
  Don't crash when icon name not found, shown a black
  background warning icon instead.
- Don't trust the icons' native sizes: replace
  scale_for_dpi=true with width/height=DGENERIC_ICON_SIZE,
  so all icons get the same (tunable) size - except in
  a few specific use cases.
- Top and bottom menu bars: normalize, and have icons
  properly centered in them, extend vertical line
  separators up to the edges.
- TOC: adjust expand/collapse icons size to items size
2020-12-19 14:49:18 +01:00
John Beard
f0b09fb4b3
Add MaterialDesignLight SVG icons (#6937)
The theme is a lighter, simpler line-based theme.
Many are based on MaterialDesignLight or MaterialDesign
by Austin Andrews (Templarian).
As of this commit, no SVG are actually used, they will be
integrated in future commits.
2020-12-19 10:11:04 +01:00
John Beard
3b1b9fe7cb
Radius corners of more boxes (#6997)
This gives a more uniform look than having some boxes rectangular and some
with radiused corners
2020-12-19 08:25:00 +01:00
NiLuJe
84ac1cae05
Merge pull request #6976 from NiLuJe/cbb-c99-front
* BookInfoManager:
  * Use ZSTD instead of zlib to compress thumbnails, because zlib is the absolute worst in terms of performance nowadays.
     Like in CRe, slightly smaller DB, slightly faster compression, hilariously faster decompression.
  * Also revamps the schema a tiny bit following recent discussions:
    * Added `filesize`, `filemtime` columns, and split `series` into `series` and `series_index`.
  * Made the DB migration slightly less harsh (i.e., preserve settings, and a bit of visual feedbad).

* A few `__gc` metamethod tweaks as mentioned in base.
2020-12-19 07:02:58 +01:00
NiLuJe
9cda84ef2f Prevent Busted from blowing up on cdata finalizers by properly closing
opened documents...
2020-12-19 06:40:00 +01:00
NiLuJe
0ab4023150 Bump base to pickup https://github.com/koreader/koreader-base/pull/1257 2020-12-19 04:16:51 +01:00
NiLuJe
77342908e6 CI: Update to Busted 2.0.0 2020-12-19 04:16:51 +01:00
NiLuJe
9b6e339239 Allow optionally returning via a return from main, instead of calling
os.exit.

This ensures a saner teardown of the Lua state, which is mildly helpful
when instrumenting a run...
(e.g., there's a final GC cycle, among other things).
2020-12-19 04:16:51 +01:00
NiLuJe
c0981a55d9 Make sure KindlePowerD's __gc metamethod will actually be called
* Via the newproxy hack.
2020-12-19 04:16:51 +01:00
NiLuJe
e2dd68bd13 RenderImage: Fix __gc handling for GifDocument
* Via ffi/__gc, as this is a plain table.
2020-12-19 04:16:51 +01:00
NiLuJe
7f6bc28eca BookInfoManager: Convert thumbnail compression to ZSTD
* Avoid the Lua string copies when compressing/uncompressing the bb
  thumbs
* Delay the statement reset so that the pointer returned by the BLOB
  query is actually usable ;).
* Re-use a ZSTD decompression context
* Store date & mtime for successfully extracted documents
  c.f., 10477501f9 (r44914917)
* Switch to user_version pragma to handle DB schema versioning
* Update file size/date on *each* extraction attempt.
  @poirez-z raised a good point, this ought to be useful to deem a file
  re-parseable after an update.
* Remove xutil
  Functionality has been moved to ffi/zlib & ffi/zstd
* Preserve settings when migrating the BookInfo DB
* Warn via InfoMessage that the DB was updated
* Only store the series name in series, and move the index in series_index
  (Column names chosen to match Calibre's).
* Handle the new series_index column in BookInfo consumers
* This allows us to get rid of the code that stripped empty decimals
  from series index in *most* places, since it's now a real Lua
  number, and the string formatting library does that magic on its
  own.
2020-12-19 04:16:44 +01:00
NiLuJe
c1496e943b util: Simplify splitFile* util functions
* Use a single match call instead of two gsubs
2020-12-19 01:54:43 +01:00
NiLuJe
d80d6dc562 Handle the BlitBuffer struct changes
* stride is now a size_t
  On some platforms, that's 64 bits, which means it's no longer
  automatically converted to a Lua number to avoid precision loss.
  Do that ourselves, because lua-serialize doesn't know how to handle an
  uint64_t cdata ;).
2020-12-19 01:54:43 +01:00
Frans de Jonge
db9b485e2d
[chore] Minor formatting fixes (#7009)
Cf. <https://github.com/koreader/koreader/pull/6992>.
2020-12-18 23:28:39 +01:00
ddvk
77ac32d4ac
remarkable2 support (#6992)
Fixes https://github.com/koreader/koreader/issues/6792
2020-12-18 23:12:34 +01:00
NiLuJe
17356bbb2a
Kindle: Make ReaderActivityIndicator a stub (#7002)
And only actually flesh it out and register it in the very few cases
where it can actually do something (i.e., old FW 5.x with KPV).
2020-12-18 18:26:58 +01:00
NiLuJe
04a980649f
kodev: Use getopt instead of a hand-rolled hack (#6980)
* Update log android to match the current issue template
* Fix GUI gdb frontends getting wrecked by the older glib library we ship w/
KOReader
* Slightly more aggressive valgrind defaults
  It's slower, but interpreting results without leak-check=full ends up
  costing more time than just running with it.
* Add a callgrind shortcut
* Use getopt instead of a hand-rolled hack for option parsing
* Make it clearer that complex args should be quoted
* Document prompt
* Add a Valgrind suppression file for libdrm/mesa on AMD hardware
  Because mesa/libdrm isn't built w/ -D valgrind=enabled on Gentoo,
  and Valgrind is very much not happy with mesa ;p.
* Allow toggling reader.lua's sane return mode
  (Enabled automatically under gdb/valgrind).
  Should hopefully weed out some noise from valgrind reports.
* Propagate reader.lua's return code
* Sim a few other common devices
* Handle assigning values to short options with an equal instead of a space, like the previous solution
  (This is purely for backward compatibility purposes, this is a syntax that'd fail with the C getopt, too).
* Add gnu-getopt to the build requirement on macOS, because of course everything is terrible.
2020-12-18 18:26:32 +01:00
NiLuJe
348d47365b
Bump base (#7003)
https://github.com/koreader/koreader-base/pull/1259
2020-12-16 09:00:27 +01:00
Frans de Jonge
608cc04622
Fix docs (#6999)
Follow-up to <https://github.com/koreader/koreader/pull/6973>
2020-12-16 07:40:57 +01:00