Commit Graph

8064 Commits (v2021.02)
 

Author SHA1 Message Date
NiLuJe 7df60ba0e4
OPDSBrowser: Update the title during navigation (#7034)
* OPDSBrowser: Update the title during navigation

Fix #7030
3 years ago
NiLuJe b78d9c1576
Menu: Clear path history on close (#7028)
Move the the paths table outside of the class, make it per instance instead
3 years ago
Frans de Jonge d355e6482d
Revert ManyBooks and Flibusta to HTTP (#7031)
Cf. <https://github.com/koreader/koreader/issues/7007>.
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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.
3 years ago
NiLuJe 4cb752c1df
Bump base (#7016)
(zstd 1.4.8)
3 years ago
NiLuJe cffdd40c1a
macOS: Linting in do_mac_bundle (#7014) 3 years ago
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>
3 years ago
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.
3 years ago
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>.
3 years ago
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.
3 years ago
poire-z daefdc96e9 Remove PNG icons, add koreader.svg
Also move Mac specific resource in platform/mac/.
3 years ago
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
3 years ago
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.
3 years ago
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
3 years ago
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.
3 years ago
NiLuJe 9cda84ef2f Prevent Busted from blowing up on cdata finalizers by properly closing
opened documents...
3 years ago
NiLuJe 0ab4023150 Bump base to pickup https://github.com/koreader/koreader-base/pull/1257 3 years ago
NiLuJe 77342908e6 CI: Update to Busted 2.0.0 3 years ago
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).
3 years ago
NiLuJe c0981a55d9 Make sure KindlePowerD's __gc metamethod will actually be called
* Via the newproxy hack.
3 years ago
NiLuJe e2dd68bd13 RenderImage: Fix __gc handling for GifDocument
* Via ffi/__gc, as this is a plain table.
3 years ago
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.
3 years ago
NiLuJe c1496e943b util: Simplify splitFile* util functions
* Use a single match call instead of two gsubs
3 years ago
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 ;).
3 years ago
Frans de Jonge db9b485e2d
[chore] Minor formatting fixes (#7009)
Cf. <https://github.com/koreader/koreader/pull/6992>.
3 years ago
ddvk 77ac32d4ac
remarkable2 support (#6992)
Fixes https://github.com/koreader/koreader/issues/6792
3 years ago
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).
3 years ago
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.
3 years ago
NiLuJe 348d47365b
Bump base (#7003)
https://github.com/koreader/koreader-base/pull/1259
3 years ago
Frans de Jonge 608cc04622
Fix docs (#6999)
Follow-up to <https://github.com/koreader/koreader/pull/6973>
3 years ago
NiLuJe 83e148bc9e
Tests: Make a few things more deterministic (#6991)
This way we still get the passed/expected actual values in Busted's
output

Which helps not make this any more maddening than it already is to
update...
3 years ago
Martín Fernández a90038e4eb
Calibre plugin fixes for android (#6996)
* calibre plugin: scan on sdcard too
* calibre plugin: force inbox chooser in android's primary partition
* downloadMgr: override dir
3 years ago
NiLuJe 248e508c7e
Deal with hr/br in a single gsub call (#6995) 3 years ago
NiLuJe a0f4015f7d
Workaround luxl's issue with self-closing tags once and for all (#6994)
* luxl and self-closing tags, once more with feeling...

Fix #6993

* More generic fix to the self-closing tag issue w/ luxl

Re #6902 & co.
3 years ago
Martín Fernández 222e752f59
bump luajit-launcher: fix for some dict downloads (#6990)
Follow up: #6959
3 years ago
Frans de Jonge 38d5510a78
Remove sourceror.io (#6986)
The links stopped working, so they no longer look nice like they used to. Here's an excerpt from an e-mail they sent me on November 18, 2020.

> We’ve made the very difficult decision to shut down Sourcerer and have sold our intellectual property rights and trademarks to another organization. We are not disclosing the acquiring organization at this time, but, have discussed extensively how they may be used in the future and couldn’t be more impressed with how thoughtfully they’ve communicated with us their vision for the future.
>
> Sourcerer profiles will be live until March 31, 2021. We will not be updating the platform, fixing bugs, or accepting new signups effective immediately.
3 years ago
NiLuJe e0ac00f310
Make sure getting rid of a DPI override actually restores default behavior (#6984)
* Make switching *back* to the default DPI via auto actually work
properly.

eg., by actually setting DPI back to defaults, and clearing the override
flag.

* Bump base to pickup https://github.com/koreader/koreader-base/pull/1258
3 years ago
Frans de Jonge 582807f971
[chore, plugins] CoverImage: move newline outside translated string (#6985) 3 years ago
NiLuJe 32bf53cfdf
ReaderFooter: Don't duplicate a 12h clock time format option (#6973)
* ReaderFooter:
	* Honor the global twelve_hour_clock setting, instead of
	  duplicating a local one.
	  (Re #6969)

* os.date is a thin wrapper around strftime, so we might be able to get
away with some not-quite-standard extensions...

These are *definitely* supported on Linux, but are *NOT* the glibc
extension (that'd be e.g., %-I), so, hopefully, they're somewhat
portable...

They are also supported on BSD/macOS.
They are *not* supported by the MS UCRT. That means MinGW-w64, too.
This *appears* to be supported on current Bionic (it might even support
said glibc format altering extensions).

* And of course, Windows is terrible, so, make this terribly ugly to not
break it there...

* Turns out BSD also supports the dash trim format extension, so, leave
the trimming to the libc, and handle the special-casing in a way that
doesn't create stupid locals.

* Random unrelated cleanup ^^.

(https://gitter.im/koreader/koreader?at=5fd24be492aa1c4ef5d11f31)

* Update the testsuite

(Because the default used to be 24h clock).

Changed the default to 24h clock ;p.

* Explain why we don't try to fix it in Lua
3 years ago
Martín Fernández 3142f98e20
add target: debian-arm64 (#6909) 3 years ago
Martín Fernández febb8e11a6
bump base (#6978)
* LuaJIT
* cURL 7.74.0
* OpenSSL 1.1.1i
* OpenSSH 8.4p1
3 years ago
John Beard 096b3176dc
Add columns to ReaderZooming paged_modes (#6970)
This means it will warn when changing to continuous mode while
zoom to columns is active.
3 years ago
poire-z 86701f6ccc
TextEditor: fix some settings not sticking (#6979) 3 years ago
Martín Fernández 4345201e0e
[CI] Mac OS app (#6955)
* use 7z instead of dmg
* osx: use always writable paths
3 years ago
poire-z a0eb91d6ab
Some RTL UI fix up after #6885 (#6975)
Avoid crash with RTL UI after options we moved.
Swap Zoom direction items when RTL UI.
Also don't check show_func when sizing the names
on the bottom menu, to avoid icons moving or
resizing when toggling options.
3 years ago
Martín Fernández c481c5aa04
move unpackArchive to Device, use native version on android (#6959) 3 years ago
Martín Fernández 89e1c406f2
android: downgrade targetSdk to 28 (#6961)
Fixes #6953
3 years ago