2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00
Commit Graph

1169 Commits

Author SHA1 Message Date
bitterlox
491e24ea25
Fix Joplin export (#12446)
turn highlight & notes table into string before sending to joplin
2024-09-02 10:53:07 +02:00
mbays
d097dc0f8c Terminal: Add newline when wrapping
Required to maintain "tty-matrix".
2024-08-31 23:38:37 +02:00
mbays
c2dbd7bf88 Terminal: Don't refresh while input widget closed
Fixes crash on e.g. closing widget after "sleep 3 && echo -e '\eY11'"
2024-08-31 23:38:37 +02:00
mbays
2a39bd15b3 Terminal: Add FIXMEs 2024-08-31 23:38:37 +02:00
mbays
f6ee0aed4f Terminal: Ignore rightChar at end of line 2024-08-31 23:38:37 +02:00
mbays
40034743ad Terminal: Fix handling of '\b' 2024-08-31 23:38:37 +02:00
mbays
f86482c210 Terminal: Remove unnecessary expensive textbox re-inits 2024-08-31 23:38:37 +02:00
mbays
ffd75eb8f1 Terminal: Remove delay on enter 2024-08-31 23:38:37 +02:00
mbays
381a87f9f3 Terminal: Refactor to reduce algorithmic complexity 2024-08-31 23:38:37 +02:00
mbays
1ae38ea8bd Terminal: Ignore ctrl on chars less than '@'
Previous behaviour was to crash.
2024-08-31 23:38:37 +02:00
hius07
49e885321a
Exporter: choose highlight styles to be exported (#12431) 2024-08-31 19:28:48 +03:00
Rowan Decker
60e0e3ef45
Add color highlight menu (#11044) 2024-08-30 22:10:43 +02:00
NiLuJe
5fc5386e87 ReadTimer: Don't blindly repaint the footer in update_status_bars
Send a dedicated event that will let ReaderFooter check if we actually have anything relevant to display, and will do the usual "should I repaint/refresh" checks ;).

Fix #12323
Regression since #12002
2024-08-28 23:53:38 +02:00
NiLuJe
9cd305177e
FocusManager: Fix focus_flags check in moveFocusTo, and deal with the fallout (#12361)
* FocusManager: Fix `focus_flags` check in `moveFocusTo` (0 is truthy in Lua, can't do AND checks like in C ;).)
* FileManager+FileChooser: Pass our custom title bar directly to FileChooser (which also means we can now use FC's FocusManager layout directly).
* FileChooser/Menu: Get rid of the weird `outer_title_bar` hack, and simply take a `custom_title_bar` pointer to an actual TitleBar instance instead.
* FileManager/Menu/ListMenu/CoverMenu: Fix content height computations in `_recalculateDimen` (all the non-FM cases were including an old and now unused padding value, `self.header_padding`, leading to more blank space at the bottom than necessary, and, worse, leading to different item heights between FM views, possibly leading to unnecessary thumbnail scaling !)
* ButtonDialog: Proper focus management when the ButtonTable is wrapped in a ScrollableContainer.
* ConfigDialog: Implement a stupid workaround for a weird FocusManager issue when going back from `[⋮]` buttons.
* ConfigDialog: Don't move the visual focus in `update` (i.e., we use `NOT_FOCUS` now that it works as intended).
* DictQuickLookup: Ensures the `Menu` key bind does the exact same thing as the hamburger icon.
* DictQuickLookup: Ensure we refocus after having mangled the FocusManager layout (prevents an old focus highlight from lingering on the wrong button).
* FileChooser: Stop flagging it as no_title, because it is *never* without a title. (This behavior was a remnant of the previous FM-specific title bar hacks, which are no longer a thing).
* FileChooser: Stop calling `mergeTitleBarIntoLayout` twice in `updateItems`. We already call Menu's, which handles it. (Prevents the title bar from being added twice to the FocusManager layout).
* FocusManager: Relax the `Unfocus` checks in `moveFocusTo` to ensure we *always* unfocus something (if unfocusing was requested), even if we have to blast the whole widget tree to do so. This ensures callers that mangle self.layout can expect things to work after calling it regardless of how borked the current focus is.
* FocusManager: Allow passing `focus_flags` to `refocusWidget`, so that it can be forwarded to the internal `moveFocusTo` call.
* FocusManager: The above also allows us to enforce a default that ensures we do *not* send a Focus event on Touch devices, even if they have the hasDPad devcap. This essentially restores the previous/current behavior of not showing the visual feedback from such focus "events" sent programmatically, given the `focus_flags` check fix at the root of this PR ;).
* InputDialog: Fix numerous issues relating to double/ghost instances of both InputText and VirtualKeyboard, ensuring we only ever have a single InputText & VK instance live.
* InputDialog: Make sure every way we have of hiding the VK play nice together, especially when the `toggleKeyboard` button (shown w/ `add_nav_bar`) is at play. And doubly so when we're `fullscreen`, as hiding the VK implies resizing the widget.
* InputText: Make sure we're flagged as in-focus when tapping inside the text field.
* InputText: Make sure we don't attempt to show an already-visible VK in the custom `hasDPad` `onFocus` handler.
* Menu: Get rid of an old and no longer used (nor meaningful) hack in `onFocus` about the initial/programmatically-sent Focus event.
* Menu: Get rid of the unused `header_padding` field mentioned earlier in the FM/FC fixes.
* Menu: Use `FOCUS_ONLY_ON_NT` in the explicit `moveFocusTo` call in `updatePageInfo`, so as to keep the current behavior of not showing the visual feedback of this focus on Touch devices.
* Menu: Make sure *all* the `moveFocusTo` calls are gated behind the `hasDPad` devcap (previously, that was only the case for `updatePageInfo`, but not `mergeTitleBarIntoLayout` (which is called by `updateItems`).
* MultiInputDialog: Actively get rid of the InputText & VK instances from the base class's constructor that we do not use.
* MultiInputDialog: Ensure the FocusManager layout is *slightly* less broken (password fields can still be a bit weird, though).
* TextViewer: Get rid of the unfocus -> layout mangling -> refocus hack now that `refocusWidget` handles this case sanely.
* VirtualKeyboard: Notify our parent InputDialog when we get closed, so it can act accordingly (e.g., resize itself when `fullscreen`).
* ScrollableContainer: Implement the necessary machinery for focus handling inside ButtonDialog (specifically, when scrolling via PgUp/PgDwn).
* TextEditor: Given the above fixes, the plugin is no longer disabled on non-touch devices.
* ReaderBookMark: Make sure we request a full refresh when closing the "Edit note" dialog, as CRe highlights may extend past its dimensions, and if it's closed separately from VK, the refresh would have been limited to its own dimensions, leaving a neat InputDialog-sized hole in the highlights ;).
2024-08-25 19:34:31 +02:00
hius07
415ce40f84
Touch menu: always go up to correct parent page (#12378) 2024-08-21 20:53:45 +03:00
zwim
004311e2aa
Fix terminal broken cursor and backspace (#12375)
This shall fix #12271

Use $SHELL env-variable if available. (thanks to @Frenzie)

Use a read line wrapper (either rlfe or rlwrap) if available so that dash can be used as interactive shell.
2024-08-19 20:18:37 +02:00
zwim
92de5821bb
[AutoWarmth] Delay front light actions after resume (#12315) 2024-08-09 19:42:13 +02:00
Frans de Jonge
880b7c5ed1
Profiles: make sure to close menu/quickmenu before executing action (#12299)
Mainly a difference without distinction, but in some edge cases like screenshots it keeps the menu on the screen.
See <https://github.com/koreader/koreader/pull/12293#issuecomment-2269680044>.

The "Show as QuickMenu" is really just for balance; it makes little to no difference.
2024-08-06 15:15:08 +02:00
David
3992438872
[CoverBrowser.MosaicMenu] Increase focus underline thickness (#12189) 2024-08-05 10:19:16 +02:00
zwim
f6f8b38cac
[plugin] Reader footer: check if header resp. footer are available (#12264) 2024-08-03 16:38:56 +02:00
hius07
a24bb70066
Annotations: fix exporting (#12261) 2024-08-01 13:14:46 +03:00
NiLuJe
d59c837714
Kobo: Refactor various aspects of the Kaleido/MTK support (#12221)
* UIManager: Let the fb backend deal with Kaleido wfm promotion. This fixes a number of quirks that poisoned the refresh queue with spurious full-screen refreshes. See https://github.com/koreader/koreader-base/pull/1865 for more details.
* This also means we now disable Kaleido waveform modes when color rendering is disabled (remember to trash your thumbnail cache if you don't want to mix color w/ grayscale thumbnails, though).
* UIManager: Merge refreshes that share an edge, because that was driving me nuts (and would have most likely been merged by the kernel anyway). A perfect test-case is the FM, which trips two separate refreshes because of its title bar.
* ReaderFlipping: Use sensible dimensions, so that we only refresh the icon's region.
* ReaderBookmark: Only refresh the dogear instead of the whole page when toggling bookmarks.
* NetworkSetting: Make it a real boy, so it consistently refreshes properly on dismiss instead of relying on UIManager saving the day.
* Kobo: Aggressively prevent *both* suspend & standby while MTK devices are plugged-in, as both will horribly implode the kernel (we previously only prevent standby while charging).
* Kobo: Switch to 8bpp on B&W MTK devices (or when color rendering is disabled on Kaleido panels).
2024-07-28 01:19:40 +02:00
hius07
8cb221c6c6
Annotations: pageno honors reference pages and hidden flows (#12214) 2024-07-24 18:35:48 +03:00
zwim
df48d51eca
AltStatusBar/Footer: add the read timer value (#12002)
Closes #11950
2024-07-19 22:55:31 +02:00
Martín Fernández
4f75e41636
exporter: fix remaining OOM (#12126) 2024-07-03 21:55:42 +02:00
Arpan Ghosh
e88bfbed97
[plugin] Exporter: include book author name in myclippings export format (#12106) 2024-06-28 14:19:08 +02:00
Mochitto
138e26a4fc
[plugin] Exporter: solved my_clippings OOM (#12107)
Closes #10745.
2024-06-28 12:03:54 +02:00
weijiuqiao
e19bed3371
VocabBuilder: fix and improve non-touch device experience (#12030)
Fix #12026.
2024-06-16 13:10:37 +02:00
Benoit Pierre
088ae7d4ee lint: fix issues reported by newer shellcheck / shfmt 2024-06-15 23:02:52 +02:00
hius07
ded709e3a1
InputContainer: consistent input type in onInput() (#12012) 2024-06-15 09:54:17 +03:00
mergen3107
0a021d5e5e
Statistics Plugin: Skip adding never opened marked as finished books (#11991)
Closes #11201
Thank you very much @hius07 !
2024-06-10 14:22:54 +02:00
NiLuJe
0a5dcf885d Calibre Metadata: Flag array & objects as such in the "safe" parser 2024-06-09 19:28:21 +02:00
NiLuJe
8d80acf720 Calibre Metadata: Make sure self.books is always flagged as a JSON array
Ditto for self.driveinfo
2024-06-09 19:28:21 +02:00
NiLuJe
1ca443195b Calibre Metadata: Don't lose rapidjson object/array tagging in slim 2024-06-09 19:28:21 +02:00
Martín Fernández
79c13bee0c
Calibre: Metadata parser improvements (#11922)
* Added a safe pure-Lua SAX JSON parser (via LunaJSON).
* Updated RapidJSON.
* Also implemented a calibre-specific SAX parser in Lua-RapidJSON, and use it by default instead of the full RapidJSON one.
* Raised the file-size threshold to switch between the fast & safe parsers to 50MB.
* Added an UI option to switch between the three parsers.
2024-06-06 01:06:46 +02:00
Frans de Jonge
e2682e2d98
[plugin] AutoDim: reset counter on page turn (#11984)
Even if not from input.

Closes #11979.
2024-06-05 21:17:49 +02:00
hius07
ed550948a9
mosaicmenu: fix collection mark (#11969) 2024-06-05 07:48:29 +03:00
hius07
bd42f6984e
Gesture manager: make long-pressing on top left corner non adjustable in FM (#11971)
It is overridden by the folder tree, so the Gesture manager setting doesn't work.
2024-06-04 21:12:51 +02:00
NiLuJe
08f02bf915 OPDS: Don't append Search twice for feeds with an OpenSearchDescription 2024-06-04 20:28:34 +02:00
NiLuJe
8a37917e5c OPDS: Fixup the last commit
We don't want to actually change the page when we request a fill on the
initial fetch.
2024-06-04 20:28:34 +02:00
NiLuJe
04ccd80b86 OPDS: Fix progressive fill on pagination
I have... no idea how this could have ever worked, the Menu handler has
*always* been called OnNextPage o_O.
2024-06-04 20:28:34 +02:00
NiLuJe
f3a67a4f4d OPDS: Handle searching in Calibre's OPDS server
Re: #11968
2024-06-04 20:28:34 +02:00
hius07
14519bc076
Dispatcher: add File browser actions 'Set display mode', 'Sort By' (#11921) 2024-06-01 10:33:14 +03:00
zwim
d2ff789543
[plugin] AutoWarmth: add more gestures for autowarmth activation (#11946)
Fixes #11274.
2024-06-01 08:42:09 +02:00
nairyo
c7a59145a3
[fix] VocabBuilder: restore erroneously removed onShowVocabBuilder function (#11915)
Fixes #11913.
2024-05-27 20:17:00 +02:00
Piotrek Marciniak
9b1a21ef82
Export highlights: empty annotations as nil instead of empty string (#11912)
Fixes Readwise exports
2024-05-27 19:18:11 +02:00
SomeGuy
eb63cf655f
CoverBrowser: update MosaicMenu FocusManager grid view to 2D (#11906)
This PR [and #11884] are for #11834.
2024-05-27 11:03:06 +02:00
hius07
c6e6d72cf3
Collections: add collection mark to books (#11868) 2024-05-26 08:18:44 +03:00
NiLuJe
4d9c6523ad
Input: Some more followups to the input device auto-detection stuff (#11855)
Switch to a new `input.fdopen` API & wrapper so we can keep the fds opened by `fbink_input_scan` instead of closing them to re-open them right after that...

This should hopefully help on racy zForce devices that attempt to handle power management when opening/closing the device. We know this sometimes horribly fail to re-activate the IR grid (c.f., our manual activation on resume), but this apparently could also happen here (re: #11844) because of the quick succession of open->close->open.
2024-05-19 22:53:14 +02:00
nairyo
126c01e1b5
Replace tweak_buttons_func with an event instead (#11777)
Also see https://github.com/Ajatt-Tools/anki.koplugin/issues/22
2024-05-16 20:44:01 +02:00