Commit Graph

2088 Commits (master)

Author SHA1 Message Date
poire-z 455e904120 Text selection: add option to disable corner scroll
People using 2-steps text selection (via the Select button) may
want to not be annoyed by this feature.
Also tweak a bit its behaviour, requiring now the text selection
to come from outside a corder into a corner to activate it, which
should allow starting text selection from a corner without
triggering a scroll yet.
4 months ago
NiLuJe 8968c41070 i18n: Some more unicode escapes => raw bytes shenanigans
Fix #11332
4 months ago
zwim 2c33fc6576
Reader: Do less work on same-orientation non-gyro rotations (#11297)
Namely, don't recompute layouts, as they do not change.
(The gyro codepaths were already doing something similar.)

* Keep ConfigDialog, FileManagerMenu & ReaderMenu open on rotation.
  (In practice, only ConfigDialog is affected, as *Menu doesn't handle the rotation event.)
* Plugged an instance leak in the aforementioned Menu classes.
* Unify behavior & code with the gyro codepaths.
4 months ago
hius07 ea9ef6781c
CoverBrowser: adjustable mosaic grid (#11232) 4 months ago
hius07 3533356ffd
filemanagerhistory: fix untranslated strings (#11282) 4 months ago
hius07 7a421ea3ab
Fix "Open next file" (#11272) 4 months ago
hius07 b949d07f4f
filemanagerbookinfo: proper text_type of description (#11260) 4 months ago
hius07 5a4e70a19d
History, Collection: title bar in FM style (#11243)
These changes make the title bar in File manager, History and Collection windows of the same height.
The items and book covers thumbnail dimensions in Mosaic and Detailed list display modes are now equal, and up/down scaling of the thumbnails is not needed when switching between File manager, History and Collection.
5 months ago
hius07 bf59f53e18
Folder shortcuts: speed up (#11221) 5 months ago
hius07 f765fe3070
Screenshot: set as book custom cover (#11227) 5 months ago
hius07 f4a5a2b60a
TextViewer: add dialog to set font size and justify text (#11210) 5 months ago
hius07 aabd6d7a26
File browser, Collection: improve group actions (#11178)
Maintain correct records in History and Favorites when moving/deleting folders or group of files.
Optimize Collection module to minimize storage requests.
5 months ago
Wim de With e7780c09f3 fixup! Process directory list items for mixed collation 5 months ago
Wim de With 128accafe3 fixup! Process directory list items for mixed collation 5 months ago
Wim de With 98d92d37ab Refactor FileManager collation for easier patching 5 months ago
hugleo f990937f9f
Autocrop fix (#11194)
After some tests with the said document from https://github.com/koreader/koreader/issues/970 it seems like that the visual defect occurs for only semi-auto and manual crop modes.

I've removed auto-crop from the rule so fixes https://github.com/koreader/koreader/issues/4106 when using auto-crop.
5 months ago
poire-z b361cec4ff ReaderStyleTweak: minor CSS suggestions popup fixes 5 months ago
hius07 b4424b4685
filemanagerhistory: fix non standard status (#11188) 5 months ago
hius07 d3787eee64
filemanagershortcuts: fix menu (#11167) 5 months ago
NiLuJe 82e7ebd6df
ReaderView: Flash when paging *away* from images, too (#11152)
Reword the `Always flash around pages with images` Menu/Dispatcher entry
accordingly.

Fix #11143
5 months ago
hius07 d99c70b5e1
ReaderHighlight: adjustable highlight dialog position (#11116) 6 months ago
hius07 88d6613fed
Folder shortcuts: new markers, buttons (#11108)
Buttons to add/remove folder shortcut from Plus menu and from folder popup dialog.
A marker ("empty star") for folders with shortcuts.
6 months ago
hius07 da8e23c011
InputDialog: tap outside to close dialog if keyboard is hidden (#11094) 6 months ago
hius07 082ef9b545
FileChooser: fix reverse sorting of folders (#11093)
Do not apply "reverse sorting" to folders in sorting modes "type", "size", "percentage".
In that modes folders are sorted by name.
6 months ago
poire-z 894cb3190d
Page browser: show nightmode thumbnails when in nightmode (#11091)
Just prevent page thumbnails ImageWidgets to be nightmode
inverted, unlike all other ones which are expected to be
double inverted to get their original colors shown.
The same thumbnail can be used and cached in both day and
night modes, unless "nightmode_images" is enabled and have
crengine itself invert images, making thumbnails different.
6 months ago
hius07 4044c81a5a
History: update on deleting a folder (#11090) 6 months ago
hius07 d0d3cf78f9
History: search (#11084) 6 months ago
hius07 51f3115b90
Profiles: fix updating gestures (#11072) 6 months ago
hius07 68aa209a6c
Open with... improvement (#11056)
Allows associating filetypes with non-document providers (like ImageViewer or TextViewer) to "open" (view) these files by a tap in file browser.
6 months ago
hius07 b70f866656
DocSettings (again) (#11020)
Cleaning and optimizing Docsettings code.
6 months ago
hius07 6b892a65a3
ReaderHighlight: delete highlight in view note dialog (#11039) 6 months ago
hius07 39d54956ec
webdav: do not allow trailing slash in start folder (#11026) 7 months ago
hius07 3b2fc7a551
Reader: re-enable File search, Folder shortcuts (#11028) 7 months ago
hius07 2ed2c2c23d
md5: centralize and deduplicate (#11003)
Document partial md5 hash is calculated by util.partialMD5() and stored in doc_settings as "partial_md5_checksum" on the first document opening.
7 months ago
hius07 6ccf19b99f
History: update on renaming/moving a folder (#10999) 7 months ago
François Gannaz 11083022b0
Minor code quality improvements (#10905) 7 months ago
hius07 e577c79d95
File search, FileChooser and others (#10994) 7 months ago
hius07 517731dbbb
Finished books: freeze history timestamp and statistics (#10968) 7 months ago
poire-z ea3f8951a3 Add ReaderHandmade: support for custom TOC and hidden flows
Checkboxes under TOC>Settings> allow enabling Custom TOC
and Custom hidden flows (similar to "Hide non-linear fragments"
available with some EPUBs).
Handled by a new ReaderHandmade module.
Adding and removing TOC chapters is done in PageBrowser
with long-press on a page thumbnail, and for chapters also
in the popup dialog after selecting some text in a page.

ReaderToc: add a symbol in title when the TOC is the
alternative TOC or the custom TOC.
7 months ago
poire-z c51b0c7bb9 BookMap: add option Alternative theme
When enabled in BookMap, both BookMap and PageBrowser get:
- alternating gray background on chapter spans
- hatched background instead of uni-gray on hidden flows.
Also, with both normal look and this alternative theme,
show some hatched overlay on thumbnails part of hidden flows.

ReaderToc: for each TOC item, have it carry its sequence/number
in that level (we do this in validateAndFixToc() where we are
already iterating all the items).
7 months ago
poire-z 35f16f87a4 ReaderThumbnail: fix slow thumbnails when in scroll mode
If originally with two-columns in page mode, and switching
to scroll mode, thumbnails generation would be slow as
the document would be rerendered for each thumbnail.
7 months ago
poire-z 5ec736ae96 ReaderToc: rework getChapterPageCount/Left/Done()
Rework the way they are computed, fixing issues with hidden
flows when they don't coincide with chapter starts.
7 months ago
poire-z e6ac74c1df ReaderPaging: use document:getNext/PrevPage()
instead of doing arithmetic (ie. new_page=cur_page+1).
This makes it ready to work with custom hidden flows
where these document:getNextPage()/getPrevPage() will
be overloaded to skip pages in hidden flows.

Also fix some odd issues (page truncated or with parts
duplicated) with scrolling/page turning when at start
or end of the document.
7 months ago
François Gannaz 128302873d
New menu option and filemanager filter to hide finished books #7158 (#10895)
* New menu option and filemanager filter to hide finished books #7158

The default behavior is to display the finished books (no change on
upgrade). For consistency with the two similar options, it represented
by a checkbox "Show hidden books" that is checked by default.

The implementation is straightforward, meaning that, when the option is
unchecked, each file will require a call to `filemanagerutil.getStatus`
that checks its status.

For clarity, the code uses the "finished books" expression because the
condition is relevant to the *book* metadata, while the other settings
are about *file* attributes.
7 months ago
Benoit Pierre 5b5b4d9ebc
readerhighlight: fix OCRed text dictionary lookups (#10967)
Cf. #10966.
7 months ago
hius07 0ac258fcb7
Coverbrowser: event for cache refreshing (#10956) 7 months ago
hius07 40e2a838ae
Status: setting status of current book in History and Collections (#10946) 7 months ago
NiLuJe e5535a3a3a
ReaderRolling: Guard against races between scheduled tasks and CloseDocument (#10934)
Fix #10932

---------

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
7 months ago
hius07 9f39614e8a
Custom metadata: fixes 2 (#10919) 8 months ago
hius07 ed5c1cef20
ButtonTable: remove unused (#10926) 8 months ago
hius07 684fc22ffc
TextViewer: font size (#10911) 8 months ago
hius07 be125af949
Actions for Go to first/last bookmark (#10899) 8 months ago
hius07 3f677a7fdd
copt/kopt options: deduplicate some defaults (#10893) 8 months ago
hius07 108d87742a
Custom metadata: fixes (#10889) 8 months ago
hius07 cc82ead981
copt deduplicate: font settings (#10885) 8 months ago
hius07 6efcf96b75
copt deduplicate: font_size, visible_pages (#10882) 8 months ago
hius07 7d626456a3
copt deduplicate: render_dpi, margins, rotation_mode (#10880) 8 months ago
hius07 73378cd9d7
copt deduplicate: line_spacing (#10768) 8 months ago
hius07 5e74f29fba
copt deduplicate: embedded_css, embedded_fonts (#10876) 8 months ago
hius07 e4ba8c7909
Custom metadata: event (#10869) 8 months ago
hius07 f46f341b9b
Reset settings/cover/metadata separately (#10866) 8 months ago
hius07 912ae156f7
copt deduplicate: smooth_scaling, nightmode_images (#10801)
Main discussion in #10763.
8 months ago
hius07 a767ad44db
PDF contrast: incorrect set by a gesture (#10798) 8 months ago
NiLuJe 4cc620b702
VirtualKeyboard: Revamp visibility handling (#10852)
Move as much of the state tracking as possible inside VirtualKeyboard itself.
InputDialog unfortunately needs an internal tracking of this state because it needs to know about it *before* the VK is shown, so we have to keep a bit of duplication in there, although we do try much harder to keep everything in sync (at least at function call edges), and to keep the damage contained to, essentially, the toggle button's handler.

(Followup to #10803 & #10850)
8 months ago
hius07 ed2ea6803f
Custom metadata (#10861) 8 months ago
hius07 1ef7821b66
getProps: centralize 2 (#10837)
Centralize and optimize handling document properties.
8 months ago
NiLuJe a736a3ebe0
Calibre: Add reading status to the metadata search popups (#10842)
We're getting old, remembering whether you've actually read stuff is hard ;).
8 months ago
hius07 33467098dd
filemanager: minor tweaks (#10821) 9 months ago
NiLuJe 7e628958b6 Misc: review pass for #10803 9 months ago
NiLuJe a15fc0e9a5 Revert "Test: Fiw readerhighlight test"
This reverts commit c23c422f62.
9 months ago
NiLuJe ae7e2f14aa Test: Fiw readerhighlight test
With actual ReaderUI teardowns, and fix the overlapping highlight
handling, so we can drop the nocov flags
9 months ago
NiLuJe 55534fcec2 ReaderView: Keep the terrible readerhilight_spec test happy
This thing is a horrible mess.
9 months ago
NiLuJe 0686ee594c ReaderView: Make sure we unschedule the hinting task on actual teardown.
onCloseDocument is way too early, if another, later onCloseDocument
handler trips a ReaderUI repaint, a new task will be scheduled, and that
one will never be cancelled, resulting in it running post-teardown,
crashing horribly.

This was for instance very easy to trigger via KOSync.

Fix #10806
9 months ago
NiLuJe 22678ee5ff Misc: Review pass on the previous commits
* Unbreak the Device test
* Rename a few things
* Tweak a few comments
9 months ago
NiLuJe 71378b0b50 Startup: Move Device ctor/dtor shenanigans to the actual Device
constructors and destructors

No need to leak implementation details in there.
9 months ago
NiLuJe 4acf131071 ReaderActivityIndicator: Oh god, my eyes, they buuuuurn.
Make this a real boy, with a transient lipc handle.
And get rid of the insane 1s sleep on affected ReaderView paints,
because ouchy.

This is completely deprecated anyway, so this is entirely pointless,
and mainly to prevent implementation details from creeping into
reader.lua.
9 months ago
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).
9 months ago
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.
9 months ago
hius07 1544ca28af
FileManager: truncate left in selected files list (#10783)
Truncate the path to view the filename in full. Closes #10760.
9 months ago
poire-z 626864f856 [chore] replace utf8 bytes with Unicode escape sequence 9 months ago
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
9 months ago
hius07 47dae6c5dd
Dictionary: fix Fuzzy search setting appearance (#10721) 10 months ago
hius07 a311de6d8e
readerview: do not read/save inapplicable doc_settings items (#10710) 10 months ago
poire-z 8a240dd635
bump LunaSVG, crengine: add support for .docm (#10702)
Includes:
- bump LunaSVG: intermediate upstream bump, cleanup
- bump LunaSVG: minor upstream tweaks
crengine:
- DocX: add support for similar DocM format
- LVStyleSheet: fix LVCssDeclaration::getHash()
- CSS parsing: accept Unicode values for ID and classnames
- update for Harfbuzz 8, fix some compiler warning
Also fix input not restored when loading failed,
and KOReader not able to exit.
10 months ago
Glen Sawyer 73c4f09a88
FileChooser: re-add file sort by "last date read" (#10682)
Revert bits from eb299c30.
10 months ago
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.
10 months ago
hius07 e1ed3a71c5
Style tweaks: notification on toggling style tweak with a gesture (#10674) 10 months ago
hius07 b1c90260e4
DropBox: unify error messages (#10666) 10 months ago
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).
10 months ago
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.
10 months ago
hius07 dee1c902ec
ReaderUI: minor optimization (#10634) 10 months ago
hius07 eb299c300d
FileChooser: Sort by date (#10627) 10 months ago
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.
10 months ago
kosmoski 72c1905110
Add 'Content-Length' header to WebDAV upload request (#10567)
Co-authored-by: wojtek <wojtek@pop-os.localdomain>
10 months ago
hius07 45428dda49
History: shorten date/time field (#10594) 11 months ago
hius07 54ab0a04f8
Archive viewer (#10584) 11 months ago
hius07 eef99dafd6
Overlap: fix detecting reflow mode (#10576) 11 months ago
hius07 46933035c5
Open with: images (#10561) 11 months ago
hius07 fc7181419f
CoverImage: custom cover support (#10553) 11 months ago
hius07 23feb0c9cd
Bookmarks: filter by highlight style (#10549) 11 months ago