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

129 Commits

Author SHA1 Message Date
hius07
c6e6d72cf3
Collections: add collection mark to books (#11868) 2024-05-26 08:18:44 +03:00
hius07
c47d3b3177
Menu widget: cleanup (#11759) 2024-05-07 09:34:30 +03:00
Frans de Jonge
a7edf213a5
[minor] FileChooser: use en-dash instead of dash for UI (#11615) 2024-04-04 16:00:53 +02:00
hasezoey
42c93a7623
FileChooser collates: use "item.sort_percent" for sorting + extra on-hold handling (#11592)
re https://github.com/koreader/koreader/pull/11524#issuecomment-1984110990
re https://github.com/koreader/koreader/pull/11542#issuecomment-2018164346

re #11592
2024-03-30 14:04:43 +01:00
hasezoey
ade1daca3a
FileChooser: "percent - unopened - finished last" consider status "complete" as 100% (#11472)
re #11369
2024-02-27 20:52:37 +01:00
hius07
72a6fa1e64
FileManager: less lfs calls when selecting files (#11476) 2024-02-19 08:03:12 +02:00
hasezoey
76980098ec
FileChooser: add new sorting method (#11369)
"percent - unopened - finished last"
(ie. 90% > 50% > 0% > unopened > 100%)
2024-02-17 01:22:06 +01:00
hius07
5d4747c593
FileManager: less lfs calls (#11452)
Use item info provided by FileChooser.
Also fix showing PathChooser with invalid path,
and fix issue when opening non-supported files.
2024-02-17 01:17:59 +01:00
hius07
4ddc0f2ef8
FileChooser: fixes (#11300) 2024-01-10 20:27:09 +01:00
hius07
7a421ea3ab
Fix "Open next file" (#11272) 2023-12-27 08:45:52 +02: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
01642659d2 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
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.
2023-11-16 07:48:10 +02:00
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.
2023-11-11 07:42:43 +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
e577c79d95
File search, FileChooser and others (#10994) 2023-10-12 08:58:52 +03:00
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.
2023-10-04 19:04:07 +03:00
hius07
f46f341b9b
Reset settings/cover/metadata separately (#10866) 2023-09-05 07:42:46 +03:00
Glen Sawyer
73c4f09a88
FileChooser: re-add file sort by "last date read" (#10682)
Revert bits from eb299c30.
2023-07-12 22:33:14 +02:00
hius07
eb299c300d
FileChooser: Sort by date (#10627) 2023-07-03 08:24:28 +03:00
hius07
2ba694d394
FileChooser: fix percent sorting (#10393) 2023-05-05 22:48:36 +03:00
hius07
483a005cc2
File browser: show Folder Menu on long-press on Home icon (#10298) 2023-04-05 08:24:41 +03:00
hius07
14de514ae8
filechooser: fix show files in bold (#10296) 2023-04-03 12:18:38 +03:00
hius07
b98fee3dd0
filechooser: fix bug with "unreadable content" (#10283) 2023-04-01 20:32:59 +03:00
hius07
4d26650ad6
Filesearcher: add search in book metadata (#10198) 2023-03-28 16:16:53 +03:00
hius07
d2ed7402da
FileChooser: fix sorting and getNextFile() issues (#10176)
- Fix sorting folders when collate is "type", "size", "percentage":
  folders are sorted by name now.
- Fix getting next file in folder when collate is "mixed files and
  folders": returned nil when next item was a folder.
2023-03-05 21:12:24 +01:00
hius07
db9cb542e4
FileChooser: optimize sorting functions (#10091) 2023-02-13 00:14:19 +01: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
b0eb0ce0e1
FileManager: add Select button to the file long-press menu (#9571) 2022-10-04 07:44:17 -04:00
Philip Chan
d6ff983243
Show TitleBar left and right buttons on non-touch devices (#9041)
Titlebar button navigation in menu, including ListMenu and MosaicMenu in FileManager, History, Favourites and Shortcuts.
Hide show password checkbox in non-touch devices
2022-05-06 10:44:25 +02: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
1bfb49c6a5
PathChooser: add left Home button (#8646) 2022-01-11 14:47:06 +02:00
hius07
9bb096484a
FileChooser: show nb of files and subdirs in folders (#8598)
On folders, instead of "5 items", show "2 dirs 3 files"
separately (using symbols for "dirs" and "files").
Also fix: if files filtering is enabled, PathChooser did
show the full number of files in subfolders, instead
of the number of filtered files.
2022-01-04 21:34:22 +01:00
hius07
f83eee02dd
[fix] filechooser: disable long-press in select mode (#8567) 2021-12-21 12:04:20 +01:00
hius07
a703b213f7
File manager: group operations (#8536)
Copy/Move/Delete for group of files.
"Select files" button in the filemanager Plus menu.
2021-12-16 13:12:25 +02:00
hius07
684fd6c12d
Standardize select/choose to choose (#8128)
Closes #8105.
2021-08-24 22:19:07 +02:00
NiLuJe
c044480658 Don't exclude the full .kobo directory tree
Only exclude the useless/dangerous bits.
Allows getting to the Dropbox folder.

Fix #8101
2021-08-19 22:40:04 +02:00
hius07
2ab31a9a36
File browser: Settings submenu reordering (#8000) 2021-07-23 15:47:02 +02:00
zwim
48d1b23469
FileSearcher honor filemanagers sorting order (#7978) 2021-07-18 20:21:39 +02:00
NiLuJe
de6f2e84a3
FileManager/ReaderUI: Clarify the current instance accessor (#7658)
* FileManager/ReaderUI: Clarify the current instance accessor

Make it clearer that we actually store it in a *module/class* member, not an *instance* member.

Also, warn if there's a close/open mismatch.
2021-05-11 00:49:35 +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
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
Frans de Jonge
4f7f6169a6 Change a few more directory strings to folder
Fixes <https://github.com/koreader/koreader/issues/7350>.
2021-02-28 11:20:28 +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
NiLuJe
d6cecc9ee3
Bump base to bring in a few fixes & cleanups (#6753)
* Bump base

https://github.com/koreader/koreader-base/pull/1205
https://github.com/koreader/koreader-base/pull/1206
https://github.com/koreader/koreader-base/pull/1207

* The strcoll shenanigans have been moved to ffi/util
2020-10-05 16:34:46 +02:00
Galunid
0d501f2308
[chore] Fix a few typos (#6601) 2020-08-30 05:27:17 +02:00
poire-z
85a16d0064 Open with: add Text Editor plugin 2020-08-29 20:07:26 +02:00