Commit Graph

1163 Commits (f86482c210a1bdf46af418e629e0e263dd13cf5f)

Author SHA1 Message Date
mbays f86482c210 Terminal: Remove unnecessary expensive textbox re-inits 3 weeks ago
mbays ffd75eb8f1 Terminal: Remove delay on enter 3 weeks ago
mbays 381a87f9f3 Terminal: Refactor to reduce algorithmic complexity 3 weeks ago
mbays 1ae38ea8bd Terminal: Ignore ctrl on chars less than '@'
Previous behaviour was to crash.
3 weeks ago
hius07 49e885321a
Exporter: choose highlight styles to be exported (#12431) 3 weeks ago
Rowan Decker 60e0e3ef45
Add color highlight menu (#11044) 3 weeks ago
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
3 weeks ago
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 ;).
4 weeks ago
hius07 415ce40f84
Touch menu: always go up to correct parent page (#12378) 4 weeks ago
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.
1 month ago
zwim 92de5821bb
[AutoWarmth] Delay front light actions after resume (#12315) 1 month ago
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.
1 month ago
David 3992438872
[CoverBrowser.MosaicMenu] Increase focus underline thickness (#12189) 2 months ago
zwim f6f8b38cac
[plugin] Reader footer: check if header resp. footer are available (#12264) 2 months ago
hius07 a24bb70066
Annotations: fix exporting (#12261) 2 months ago
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).
2 months ago
hius07 8cb221c6c6
Annotations: pageno honors reference pages and hidden flows (#12214) 2 months ago
zwim df48d51eca
AltStatusBar/Footer: add the read timer value (#12002)
Closes #11950
2 months ago
Martín Fernández 4f75e41636
exporter: fix remaining OOM (#12126) 3 months ago
Arpan Ghosh e88bfbed97
[plugin] Exporter: include book author name in myclippings export format (#12106) 3 months ago
Mochitto 138e26a4fc
[plugin] Exporter: solved my_clippings OOM (#12107)
Closes #10745.
3 months ago
weijiuqiao e19bed3371
VocabBuilder: fix and improve non-touch device experience (#12030)
Fix #12026.
3 months ago
Benoit Pierre 088ae7d4ee lint: fix issues reported by newer shellcheck / shfmt 3 months ago
hius07 ded709e3a1
InputContainer: consistent input type in onInput() (#12012) 3 months ago
mergen3107 0a021d5e5e
Statistics Plugin: Skip adding never opened marked as finished books (#11991)
Closes #11201
Thank you very much @hius07 !
3 months ago
NiLuJe 0a5dcf885d Calibre Metadata: Flag array & objects as such in the "safe" parser 3 months ago
NiLuJe 8d80acf720 Calibre Metadata: Make sure self.books is always flagged as a JSON array
Ditto for self.driveinfo
3 months ago
NiLuJe 1ca443195b Calibre Metadata: Don't lose rapidjson object/array tagging in slim 3 months ago
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.
4 months ago
Frans de Jonge e2682e2d98
[plugin] AutoDim: reset counter on page turn (#11984)
Even if not from input.

Closes #11979.
4 months ago
hius07 ed550948a9
mosaicmenu: fix collection mark (#11969) 4 months ago
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.
4 months ago
NiLuJe 08f02bf915 OPDS: Don't append Search twice for feeds with an OpenSearchDescription 4 months ago
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.
4 months ago
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.
4 months ago
NiLuJe f3a67a4f4d OPDS: Handle searching in Calibre's OPDS server
Re: #11968
4 months ago
hius07 14519bc076
Dispatcher: add File browser actions 'Set display mode', 'Sort By' (#11921) 4 months ago
zwim d2ff789543
[plugin] AutoWarmth: add more gestures for autowarmth activation (#11946)
Fixes #11274.
4 months ago
nairyo c7a59145a3
[fix] VocabBuilder: restore erroneously removed onShowVocabBuilder function (#11915)
Fixes #11913.
4 months ago
Piotrek Marciniak 9b1a21ef82
Export highlights: empty annotations as nil instead of empty string (#11912)
Fixes Readwise exports
4 months ago
SomeGuy eb63cf655f
CoverBrowser: update MosaicMenu FocusManager grid view to 2D (#11906)
This PR [and #11884] are for #11834.
4 months ago
hius07 c6e6d72cf3
Collections: add collection mark to books (#11868) 4 months ago
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.
4 months ago
nairyo 126c01e1b5
Replace tweak_buttons_func with an event instead (#11777)
Also see https://github.com/Ajatt-Tools/anki.koplugin/issues/22
4 months ago
NiLuJe fd5260f2ce
Support auto-detection of input devices via fbink_input (#11807)
* Kobo: Drop a bunch of if ladder crap and switch to auto-detection of input devices via fbink_input
* Kindle: Drop an even larger bundle of crap to do the same ;p. (re: #11392)
* ExternalKeyboard: Switch to fbink_input to whitelist keyboards instead of the manual parsing of caps via its FindKeyboard class
* Input: Extended open/close wrappers to handle logging & tracking of dupe open/close calls.
4 months ago
Nico Hirsch 3e04184638
calibre: add wireless connectionstart/stop actions (#11806)
* Register start stop connection actions

* Match code order

* Title to lowercase
4 months ago
peicuiping a7e34673e6
chore: remove repetitive words (#11785) 4 months ago
hius07 c47d3b3177
Menu widget: cleanup (#11759) 5 months ago
zwim bf58723af1
[CoverImage] Honor rotation after opening of a book (#11752)
If rotation changes, create a new cache entry and use that if necessary.

Fixes #11713.
5 months ago
SomeGuy e51b71f463
[Gestures.plugin] Clarify some rotation gesture strings (#11753) 5 months ago