Commit Graph

68 Commits

Author SHA1 Message Date
hius07
2a10f7188b filemanagerfilesearcher: fix menu appearance (#13465) 2025-03-27 17:13:37 +02:00
hius07
93ee0a1415 File browser: sort by metadata (#13437) 2025-03-24 19:12:46 +02:00
hius07
f1726a9e5d FileSearcher: consistent results window (#13298) 2025-02-27 18:45:52 +02:00
hius07
17504993ae CoverBrowser info_cache: move to core (#13018) 2025-01-18 10:08:18 +02:00
hius07
0114954fc1 CoverBrowser BookInfoManager: lite getDocProps() (#12936) 2024-12-27 08:16:47 +02:00
hius07
4cdef40f97 File search: improve (#12549) 2024-09-28 19:47:56 +03:00
David
f3c0af49c2 Support 'Ctrl' shortcuts on hasKeyboard (#12347) 2024-08-13 20:34:34 +02:00
hius07
c46578aece BookInfo: rating, review (#12313) 2024-08-11 17:01:15 +03:00
David
2900eef276 Show/Hide Virtual keyboard and more keyboard shortcuts (#12162) 2024-08-07 18:09:40 +02:00
hius07
585afda4be File searcher: group operations (#11980) 2024-06-06 11:44:03 +03:00
hius07
6b0d97bf22 Multiple collections (#11693) 2024-05-01 09:01:59 +03:00
hius07
d94b819eb1 CoverBrowser: use bookinfo cache in Classic mode (#11404)
Getting bookinfo from the cache db is much faster than opening a book, let's use it in Classic mode too.

With fallback if no metadata available.
2024-01-26 22:01:45 +01:00
Wim de With
e7780c09f3 fixup! Process directory list items for mixed collation 2023-12-07 09:39:04 +01:00
Wim de With
128accafe3 fixup! Process directory list items for mixed collation 2023-12-07 09:39:04 +01:00
Wim de With
98d92d37ab Refactor FileManager collation for easier patching 2023-12-07 09:39:04 +01:00
hius07
d0d3cf78f9 History: search (#11084) 2023-11-09 07:34:56 +02:00
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.
2023-11-05 07:24:18 +02:00
hius07
3b2fc7a551 Reader: re-enable File search, Folder shortcuts (#11028) 2023-10-20 11:16:26 +02:00
hius07
e577c79d95 File search, FileChooser and others (#10994) 2023-10-12 08:58:52 +03:00
hius07
ed2ea6803f Custom metadata (#10861) 2023-09-01 08:07:29 +03:00
hius07
1ef7821b66 getProps: centralize 2 (#10837)
Centralize and optimize handling document properties.
2023-08-30 07:53:59 +03:00
hius07
4d26650ad6 Filesearcher: add search in book metadata (#10198) 2023-03-28 16:16:53 +03:00
NiLuJe
7863a7ad70 Misc: Natural sorting refactor (#10023)
* Move natural sorting algo to a dedicated sort module to avoid code duplication
* Use a slightly more accurate algorithm, and speed it up by caching intermediary strings
* Calibre: Use natural sorting in metadata search (fix #10009)
2023-01-16 19:36:22 +01:00
NiLuJe
fadee1f5dc Clarify our OOP semantics across the codebase (#9586)
Basically:

* Use `extend` for class definitions
* Use `new` for object instantiations

That includes some minor code cleanups along the way:

* Updated `Widget`'s docs to make the semantics clearer.
* Removed `should_restrict_JIT` (it's been dead code since https://github.com/koreader/android-luajit-launcher/pull/283)
* Minor refactoring of LuaSettings/LuaData/LuaDefaults/DocSettings to behave (mostly, they are instantiated via `open` instead of `new`) like everything else and handle inheritance properly (i.e., DocSettings is now a proper LuaSettings subclass).
* Default to `WidgetContainer` instead of `InputContainer` for stuff that doesn't actually setup key/gesture events.
* Ditto for explicit `*Listener` only classes, make sure they're based on `EventListener` instead of something uselessly fancier.
* Unless absolutely necessary, do not store references in class objects, ever; only values. Instead, always store references in instances, to avoid both sneaky inheritance issues, and sneaky GC pinning of stale references.
  * ReaderUI: Fix one such issue with its `active_widgets` array, with critical implications, as it essentially pinned *all* of ReaderUI's modules, including their reference to the `Document` instance (i.e., that was a big-ass leak).
* Terminal: Make sure the shell is killed on plugin teardown.
* InputText: Fix Home/End/Del physical keys to behave sensibly.
* InputContainer/WidgetContainer: If necessary, compute self.dimen at paintTo time (previously, only InputContainers did, which might have had something to do with random widgets unconcerned about input using it as a baseclass instead of WidgetContainer...).
* OverlapGroup: Compute self.dimen at *init* time, because for some reason it needs to do that, but do it directly in OverlapGroup instead of going through a weird WidgetContainer method that it was the sole user of.
* ReaderCropping: Under no circumstances should a Document instance member (here, self.bbox) risk being `nil`ed!
* Kobo: Minor code cleanups.
2022-10-06 02:14:48 +02:00
hius07
d7549dbd87 File searcher: fix show folders, include subfolders checkbutton (#8807) 2022-03-12 11:24:07 +01:00
Philip Chan
107156c0a8 [feat] Non-touch improvements (#8859)
FocusManager: fix round x use y layout
FocusManager: add tab and shift tab focus navigation support
FocusManager: handle Press key by default
FocusManager: make sure selected in instance level
FocusManager: add hold event support
FocusManager: Half move instead of edge move
FocusManager: add keymap override support
FocusManager: refocusWidget will delegate to parent FocusManager
Focusmanager: refocusWidget can execute on next tick
inputtext: can move out of focus on back
inputtext: fix cannot exit for non-touch device
inputtext: fix cannot input text with kindle dx physical keyboard
fontlightwidget: add non-touch support
datetimewidget: add non-touch support
datetimewidget: fix set date failed in kindle DX, fix datetimewidget month range to 1~23 by default
datetimewidget: make hour max value to 23
multiinputdialog: add non-touch support
checkbox: focusable and focus style
virtualkeyboard: no need to press two back to unfocus inputtext
virtualkeyboard: collect FocusManager event key names to let VirtualKeyboard disable them
openwithdialog: add non-touch support
inputdialog: can close via back button
enable all InputDialog and MultiInputDialog can be close by back
keyboardlayoutdialog: non-touch support
readertoc: non touch device can expand/collapse in toc
bookstatuswidget: non touch support
keyvaluepage: non-touch support
calendarview: non-touch support
2022-03-04 21:20:00 +01:00
hius07
5c39c19a73 [chore] Remove leftover: cface (#8659)
Ancient menu widget had it.

Not used anymore.
2022-01-12 13:32:03 +01:00
hius07
1df6ab751b ButtonDialogTitle: no bold font in the title by default (#8557) 2021-12-16 14:46:53 +02:00
hius07
19271c08c4 Checkbutton widget optimization (#8522)
-checkmark toggling is separated from the callback
-default width added
2021-12-07 13:35:44 +02:00
hius07
8a750d4692 File searcher: fix FileManager invocation (#8257)
Do not start a new instance if not needed.
2021-09-25 10:55:59 +02:00
hius07
859327dea5 Input dialogs: keep size in rotation (#8223) 2021-09-17 19:36:57 +02:00
hius07
1a127633c2 InputDialog: add :addWidget(), use it for checkboxes (#8168)
Also: Text editor now closes its keyboard when calling Find
and Go to line (which open their own keyboards) to avoid
conflicts between multiple keyboards.
2021-09-02 22:53:54 +02:00
hius07
68782c3f89 Checkbutton: optimize callback (#8134) 2021-08-27 21:21:14 +02:00
hius07
b4ec68d8c0 [UX] File search: add hold in search results (#8100)
Currently we see filenames only.

Added hold action to show the full path. Go to on a file will open the folder with a focused file.
2021-08-18 16:17:27 +02:00
hius07
3c597d1d84 FileSearcher: allow call with a search string (#8073) 2021-08-14 17:53:39 +02:00
hius07
c8a7f52672 Checkbutton: ensure max width, multiline if needed (#8066) 2021-08-14 00:49:19 +02:00
zwim
48d1b23469 FileSearcher honor filemanagers sorting order (#7978) 2021-07-18 20:21:39 +02:00
zwim
ab6867c8fa FileManager: allow case sensitive file search (#7956)
Bump base for cre.cpp cleanup and utf8proc FFI.
Add a checkbutton for case sensitive search in FileBrowser,
and use Utf8Proc.lowercase() for case insensitive search.
Also use it in ReaderUserHyph as a replacement for
crengine getLowercasedWord().
2021-07-15 12:53:28 +02:00
NiLuJe
e7acec1526 ReaderUI: Saner FM/RD lifecycle
* Ensure that going from one to the other tears down the former and
    its plugins before instantiating the latter and its plugins.

UIManager: Unify Event sending & broadcasting
  * Make the two behave the same way (walk the widget stack from top to
    bottom), and properly handle the window stack shrinking shrinking
    *and* growing.
    Previously, broadcasting happened bottom-to-top and didn't really
    handle the list shrinking/growing, while sending only handled the list
    shrinking by a single element, and hopefully that element being the one
    the event was just sent to.

These two items combined allowed us to optimize suboptimal
refresh behavior with Menu and other Menu classes when
opening/closing a document.
e.g., the "opening document" Notification is now properly regional,
and the "open last doc" option no longer flashes like a crazy person
anymore.

Plugins: Allow optimizing Menu refresh with custom menus, too.

Requires moving Menu's close_callback *after* onMenuSelect, which, eh,
probably makes sense, and is probably harmless in the grand scheme of
things.
2021-05-05 20:37:33 +02:00
hius07
aef1e271b5 [UX] Search dialogs: don't close when searching with nothing entered (#7501)
File search, Fulltext search, Search dictionary, Search Wikipedia, DictQuickLookup: do nothing when nothing entered and search is pressed.
2021-04-04 17:27:17 +02:00
Frans de Jonge
627065c354 Add a period (#7493) 2021-04-04 08:53:34 +02:00
hius07
052e19ead5 Standardize search/find to search (#7398)
* Change 'Find a file' to 'File search' for consistency

There is 'File search' in the Gesture manager already.
There is 'Fulltext search' in the readermenu.
Some help text added.
2021-04-02 17:59:29 +02:00
NiLuJe
bf6c0cdd6c LuaSettings: Add a method to initialize a setting properly (#7371)
* LuaSettings/DocSettings: Updated readSetting API to allow proper initialization to default.
Use it to initialize tables, e.g., fixing corner-cases in readerFooter that could prevent settings from being saved.
(Fixes an issue reported on Gitter).
* LuaSettings/DocSettings: Add simpler API than the the flip* ones to toggle boolean settings.
* Update LuaSettings/DocSettigns usage throughout the codebase to use the dedicated boolean methods wher appropriate, and clean up some of the more mind-bending uses.
* FileChooser: Implement an extended default exclusion list (fix #2360)
* ScreenSaver: Refactor to avoid the pile of kludges this was threatening to become. Code should be easier to follow and use, and fallbacks now behave as expected (fix #4418).
2021-03-06 22:44:18 +01:00
yparitcher
78c34e60fa FileSearcher: Do not crash on space, show unsupported files if enabled. (#7362) 2021-03-06 19:31:39 +01:00
NiLuJe
525b1957b9 [RFC] Pagination UI shenanigans (#7335)
* Menu/KeyValuePage/ReaderGoTo: Unify the dialogs. (Generally, "Enter page number" as title, and "Go to page" as OK button).
* Allow *tapping* on pagination buttons, too. Added spacers around the text to accommodate for that.
* Disable input handlers when <= 1 pages, while still printing the label in black.
* Always display both the label and the chevrons, even on single page content. (Menu being an exception, because it can handle showing no content at all, in which case we hide the chevrons).
* KVP: Tweak the pagination buttons layout in order to have consistent centering, regardless of whether the return arrow is enabled or not. (Also, match Menu's layout, more or less).
* Menu: Minor layout tweaks to follow the KVP tweaks above. Fixes, among possibly other things, buttons in (non-FM) "List" menus overlapping the final entry (e.g., OPDS), and popout menus with a border being misaligned (e.g., Calibre, Find a file).
* CalendarView: Minor layout tweaks to follow the KVP tweaks. Ensures the pagination buttons are laid out in the same way as everywhere else (they used to be a wee bit higher).
2021-02-25 05:15:23 +01:00
poire-z
3b89e32069 [UX] Add ToC/Bookmarks settings
- Menu widget: allow specifying the number of items per
  page and the item font size, so we can use other values
  than the default File browser ones
- Menu: fix setDirty when a border is used
- ToC: add item per page and font size settings, make
  Alternative ToC more visible (was previously
  available on long-press on Table of contents)
- Bookmarks: add item per page, font size, size reduction
- Progress bars (Skim widget and footer): allow selecting
  ToC depths from which ticks are made.
2021-02-05 23:58:32 +01:00
yparitcher
70f89c4df1 ReaderGesture: cleanup (#6292)
convert all gesture actions to use events for better modularity
add network event handlers and device event handlers
2020-07-12 14:47:49 -04:00
NiLuJe
1f994f8ede Floor dimension computations (mul/div). (#6264)
* floor most every dimension computations involving MUL or DIV
Should avoid passing nonsensical floating point coordinates/dimensions
to the UI code.

* Update base

* https://github.com/koreader/koreader-base/pull/1113
* https://github.com/koreader/koreader-base/pull/1114
* https://github.com/koreader/koreader-base/pull/1115

* Bump android-luajit-launcher

https://github.com/koreader/android-luajit-launcher/pull/230
https://github.com/koreader/android-luajit-launcher/pull/231
2020-06-13 01:56:36 +02:00
NiLuJe
80c1e5290c File search & BookInfo: Don't traverse hidden folders if we're not showing them (#5816)
* File search: Don't traverse hidden folders if we're not showing them

Re https://www.mobileread.com/forums/showpost.php?p=3949194&postcount=21

* Ignore macOS resource forks, too.

* Apply the same logic to the BookInfo directory walker

* And never ever show resource forks in the FM, either.
2020-02-05 03:14:21 +01:00
Frans de Jonge
6c93415f67 [fix] Filesearcher crash on empty file attributes (#5351)
Fixes <https://github.com/koreader/koreader/issues/5343>.
2019-09-09 18:39:36 +02:00