2
0
mirror of https://github.com/koreader/koreader synced 2024-11-04 12:00:25 +00:00
Commit Graph

1413 Commits

Author SHA1 Message Date
NiLuJe
ac1358e0f0 Menu: Actually hide PlatformNav if !hasKeys
Returning {} just leads to a present but blank entry

(Also, nobody notice that the capcheck was wrong inside platnav anyway ;p).
2023-08-15 21:24:11 +02:00
NiLuJe
6283674c47 Menu: Split off "Page Turns" submenu in two sections
The Kindle swipe animations & physical key inversion apply *everywhere*,
so we need this accessible in the FM, too.

Move it to Navigation, which is where it already was on !Touch devices.
2023-08-15 21:24:11 +02:00
poire-z
626864f856 [chore] replace utf8 bytes with Unicode escape sequence 2023-08-02 01:28:24 +02:00
NiLuJe
ef0bcbad3f
ReaderFooter: Don't reset the initial position marker like a cowboy (#10767)
Take a more tactful approach instead, should hopefully prevent issues like in https://github.com/koreader/koreader/pull/10114#issuecomment-1658913661
2023-08-01 18:43:48 +02:00
hius07
47dae6c5dd
Dictionary: fix Fuzzy search setting appearance (#10721) 2023-07-24 09:25:53 +03:00
hius07
a311de6d8e
readerview: do not read/save inapplicable doc_settings items (#10710) 2023-07-24 09:25:16 +03:00
poire-z
d0e705a582
Font list menu: allow sorting by more recently set (#10662)
- Add a toggle in Font settings> allowing showing font
  ordered by most recently selected (long-press on
  it allows clearing this history).
- Keep in G_reader_settings a list of known fonts, so
  we can notice newly added user fonts, and put them
  at the start of the most recently selected. Show
  these new fonts with a symbol in the menu.
- TouchMenu: allows for a flag to trigger menu
  refresh when going up.
2023-07-12 22:29:13 +02:00
hius07
e1ed3a71c5
Style tweaks: notification on toggling style tweak with a gesture (#10674) 2023-07-12 07:45:47 +03:00
poire-z
dffc2404ca Text search: normalize input text
So that Unicode NFC normalization can combine diacritics
entered via our keyboard with their base into their
canonical form (we can expect books text to be normalized).
2023-07-04 09:03:34 +02:00
hius07
6decb71521
ReaderPaging: do not store zeroes in page_positions (#10602)
Page_position value depends on the view mode parameters, but we can assume that zero is a frequent case.
2023-07-04 08:43:30 +02:00
NiLuJe
08dd97384c
KOSync: Clarify settings, plus refactor & fixes to make "auto-sync" more reliable (#10605)
Fix: #10539, and for context #6489, #6733, #6534

Reorganize and reword most of the settings to make it clear what actually ties into auto sync, and what doesn't. (Specifically, what happens when a pull attempts to sync forward or backward has nothing to do with auto sync, it applies in all cases; while the periodic sync *does* require auto sync).

The main point of contention, though, is that auto sync will now *always* attempt to setup network connectivity (i.e., on resume/suspend/close). Periodic sync will *not* though (the intent being that, if you use periodic sync, you're relying on the activity check to actually keep wifi on at all times)).

Since this may lead to a large amount of nagging about wifi toggles on devices w/ NetworkManager support, it is now *disabled* by default on those devices. (And given that it wouldn't have worked because of the lack of connectivity, that doesn't really make any practical difference ;p).

Additionally, given the fact that there's no way to make this behavior viable if the "before wifi" action is left at its default of "prompt", this feature now *requires* that to be set to "turn_on" (on devices where it can, of course); attempting to toggle it on will warn about that if necessary.
This change is retroactive (OTM).

Includes an assortment of fixes and cleanups, including migrating to the new LuaSettings API, which is why there's no longer a smattering of superfluous flushes.
2023-07-03 01:23:14 +02:00
hius07
eef99dafd6
Overlap: fix detecting reflow mode (#10576) 2023-06-14 07:36:37 +03:00
hius07
46933035c5
Open with: images (#10561) 2023-06-12 09:08:56 +03:00
hius07
23feb0c9cd
Bookmarks: filter by highlight style (#10549) 2023-06-08 08:28:43 +03:00
poire-z
04425b74fc BookMap: add "Overview" mode
Add a restricted but convenient mode showing BookMap like
in initial view, while still allowing chapter levels to be
tweaked. This allows getting back to this view with another
gesture to see the overall progress in the book, while
still having the normal BookMap in flat mode acting as
an alternative ToC.
Available as an action to associate to a gesture, and
with long-press on the "Book map" menu item.
2023-06-05 00:58:15 +02:00
hius07
57f4ff2c68
ReaderHighlight: manage overlapped highlights (#10492) 2023-05-28 08:05:48 +03:00
hius07
919d67656d
readerhighlight: fix translator auto lang (#10469) 2023-05-20 15:41:50 +03:00
hius07
5f59ee6417
readerhighlight: fix translate (#10451)
Fix translation for books without "language" in properties (it is "", Translator expects nil).
Regression after #10438.
2023-05-18 21:57:16 +02:00
hius07
3dce41269d
Translator: translate current page (#10438) 2023-05-17 07:34:37 +03:00
poire-z
fc81c7db24 DictQuickLookup: add button to show list of results
Add a left button to the title bar to show the list
of results as a popup.
Dictionary: tap or long-press on that button give
different view of the results.
Wikipedia: request 30 results instead of 20, so we
can show 15, 10 or 6 of them per page of that popup.
2023-05-12 20:12:10 +02:00
hius07
b4f453eb58
Page overlap: add "Horizontal line" marker (#10401) 2023-05-07 20:28:18 +03:00
Frans de Jonge
46f0bba74b
ReaderLink: fix capitalization typo in "Go Forward" (#10399) 2023-05-07 18:36:28 +02:00
yparitcher
de5c872dcb Dispatcher: add addCurrentLocationToStack
This is useful when i want to reference something a few pages away while keeping track of my current page
2023-05-05 08:06:23 +02:00
hius07
4f23a6fafa
Custom book covers (#10329) 2023-05-03 15:43:05 +03:00
hius07
9db74f1f01
ConfirmBox: add widgets (#10364) 2023-05-02 08:25:34 +03:00
yparitcher
64b0f5e7cf ReaderFooter: separate ToggleFooterMode from TapFooter
the footer can be toggled by gestures and menu, and should only be locked or skim in flipping mode when the footer is tapped

also allow toggling when only displaying the progress bar

rename to TapFooter to show it is not an event

Fixes: #10355
2023-05-01 15:28:26 -04:00
hius07
af45ec75c3
ReaderThumbnails: update cached page thumbnail on bookmark note change (#10303) 2023-04-14 07:53:05 +03:00
hius07
be7d6008d1
Reader: do not apply line spacing out of range (#10307)
* readercoptlistener: fix line spacing out of range

* readerkoptlistener: fix line spacing out of range

* creoptions: fix line spacing limit
2023-04-13 20:43:04 +02:00
zwim
4dbaca180a
PM: Optimize task queue handling around standby (#10203)
Instead of firing on(Enter|Leave)Standby Events, and having every other piece of code that might care about that handle re-scheduling their stuff themselves; simply make the standby implementation (i.e., AutoSuspend's) shift the whole task queue by the amount of time spent in standby to re-sync everything automatically.

(This is necessary in the first place because Linux, as the task queue ticks in CLOCK_MONOTONIC, which does *not* tick during suspend/standby; while we expect most of the tasks scheduled to actually reflect real world clock delays).
2023-04-05 20:54:47 +02:00
hius07
b01e1c5918
Reader: do not apply font size out of range (#10295) 2023-04-04 08:11:02 +03:00
hius07
827581ac72
readerbookmark: fix writing pdf annotation (#10287) 2023-04-02 10:31:43 +03:00
nairyo
983e083a0b
Center pdf manual zoom mode (#10246)
Center PDF content when its width is smaller than the screen

fix #9967
2023-03-31 17:29:16 +02:00
hius07
3a37d30ad6
Dispatcher: use translated labels for Zoom Mode actions (#10269) 2023-03-30 08:36:41 +03:00
yparitcher
bc5d354225
ReaderLink: allow a forward location stack (#10228)
this allows going back and forth from links (think of undo / redo)

when going back and no forward locations and when we are not on the same page as the last saved location, add the current location to the forward stack, helping if one goes back by mistake they can jump back to their current location

when going back and no forward locations and when we are not on the same page as the last saved location, add the current location to the forward stack, helping if one goes back by mistake they can jump back to thier current location
2023-03-29 18:32:44 +02:00
hius07
c6a7f083c9
readerstyletweak: update profiles on unregistering in dispatcher (#10247) 2023-03-26 21:10:39 +03:00
poire-z
f16fbf1d0b Book style tweak: add button with CSS suggestions
Mostly non-standard CSS declarations (so, possibly unknown
to users) that can be useful for solving certain issues.
2023-03-23 20:28:38 +01:00
hius07
1e6b22a60e
Readerzooming: fix use of default settings (#10205)
(1) Fix default direction. Closes #10201. Fixes #9321.
(2) Fix default overlap (unreported bug).
(3) Do not write unused settings to doc_settings.
2023-03-23 09:04:59 +01:00
poire-z
3006348585 PageBrowser: toggle page bookmark with long-press on thumbnail 2023-03-14 23:41:38 +01:00
nairyo
65031ae14f
Dictionary lookup window: use from/to language to determine glyph form (#10184)
For example, to determine whether the Japanese or Chinese form should be shown.

* Dictionaries.lua - use iso3 codes everywhere
readerdictionary.lua - convert iso to bcp tag, to construct ifo_lang
isolanguage.lua - map from iso3 to full language name, map from iso3 to bcp language tag

* Make the full language names translatable

* Store ifo information from dictionaries.lua in downloaded dictionaries
2023-03-14 22:11:17 +01:00
hius07
536d71970f
Bookmark flipping mode fix (#10196)
(1) Changed indicator icon to "bookmark".
(2) Added toggling action to dispatcher.
2023-03-13 09:52:10 +02:00
poire-z
eeb3c08457 View HTML: add CSS helpers with long-press
Move View html code from ReaderHighlight to a new
dedicated module.
Long-press on an element or its text in the HTML will
show a popup with a list of selectors related to this
element that can be copied to clipboard (to be pasted
in Find or in a Book style tweak).
2 addtional buttons in this popup allow seeing all the
CSS rulesets in all stylesheets that would be matched by
this element, which should make it easier understanding
the publisher stylesheets and using or creating style
tweaks.
2023-03-05 23:42:24 +01:00
NiLuJe
189739ac4c
ReaderFooter: Don't reset session marker on standby (#10167) 2023-02-28 18:06:43 +01:00
hius07
55f1b8c974
UX: a set of minor fixes (#10165)
- AutoFrontlight plugin: update checkmark on toggling
- KeepAlive plugin: update checkmark on toggling
- ReaderPageMap: font size menu entry
- ReaderStatus, common_settings_menu_table: book status "read" -> "finished"
2023-02-28 09:19:17 +02:00
hius07
54b3b5a8cc
ReaderHighlight: minor fixes (#10142)
* readerui: save highlight to pdf requires button press

* readerhighlight: fix select mode confirmbox icon
2023-02-19 20:49:09 +01:00
hius07
15605291c2
DocSettings: add support of centralized sdr storage (#10132) 2023-02-17 23:06:55 +02:00
NiLuJe
c5d606a7f4
ProgressWidget: Add an optional marker on the initial position (#10114)
* Enable it on SkimToWidget
* Optional on ReaderFooter (toggle in the progress bar > style submenu)
2023-02-17 00:37:30 +01:00
poire-z
81f2aed086 ReaderRolling: quicker partial rerenderings with EPUBs
Only available with EPUBs containing 2 or more fragments,
and a file size large enough to ensure a cache file is used.
The idea is simply, on any rendering setting change, to
skip the rerendering of the full book and to defer any
rerendering to the moment we draw a DocFragment, and
render only it.
So, on a setting change, only the fragment containing the
current page will be rerendered, and the new fragments we
may cross while turning pages.
When having done so, KOReader is in a degraded state (the
full page count is incorrect, the ToC is invalid...).
So, a full rerendering is needed, and one will happen
in the background, and when the user is idle, we reload
seamlessly and quickly from the cache file it has made.
ReaderFlipping will show some icons in the top left
corner to let it know at which steps in this procress
we are.
2023-02-16 23:36:26 +01:00
poire-z
2f0954fa71 Book style tweak: revamp sample tweak 2023-02-16 23:36:26 +01:00
hius07
91ff6ce2d8
ReaderBookmark: fix comparing positions (#10109) 2023-02-13 00:14:49 +01:00
Melik
9e7e68beb6 Shorten status button names 2023-02-11 21:49:23 +01:00