Commit Graph

88 Commits

Author SHA1 Message Date
hius07
b707d0f593 Menu widget: "Go to letter" everywhere (#13405) 2025-03-16 08:03:14 +02:00
hius07
f1726a9e5d FileSearcher: consistent results window (#13298) 2025-02-27 18:45:52 +02:00
hius07
42de1fb96e Collections: filter by book status (#13099) 2025-01-25 10:49:35 +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
cd8ef3ceb5 FileManager, History, Collections: expose file dialog buttons (#12845) 2024-12-05 18:54:32 +02:00
hius07
c2d1099976 Profiles: more auto-exec triggers 2 (#12691) 2024-10-31 20:26:21 +02:00
hius07
76deedfb73 Menu widget: rotation handler (#12573) 2024-10-10 10:54:59 +03:00
hius07
963aa9ac7c filemanagerhistory: fix update list after deleting a file 2024-08-31 15:18:18 +02:00
hius07
c46578aece BookInfo: rating, review (#12313) 2024-08-11 17:01:15 +03:00
NiLuJe
030f4a15d4 ReadHistory: On remove, trust the index from FileManagerHistory if possible (#12253)
The item's idx field is based on the current view settings, so only trust it when there's no filtering or searches involved, which ensures the order matches the actual history array layout.
2024-08-03 21:49:11 +02:00
hius07
c6e6d72cf3 Collections: add collection mark to books (#11868) 2024-05-26 08:18:44 +03:00
hius07
6b0d97bf22 Multiple collections (#11693) 2024-05-01 09:01:59 +03:00
Denis Malinovsky
6cc970dbb4 Do flashui refresh for first display of History page (#11603)
This fixes ghosting for color Pocketbook devices

Fixes #11602.
2024-04-06 13:07:34 +02:00
hius07
b8090c641c Minimize DocSettings:open() calls (#11437) 2024-02-07 10:35:52 +02: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
hius07
3533356ffd filemanagerhistory: fix untranslated strings (#11282) 2023-12-28 07:47:56 +02:00
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.
2023-12-19 09:22:53 +02:00
hius07
b4424b4685 filemanagerhistory: fix non standard status (#11188) 2023-12-02 09:06:31 +02:00
hius07
d0d3cf78f9 History: search (#11084) 2023-11-09 07:34:56 +02:00
hius07
e577c79d95 File search, FileChooser and others (#10994) 2023-10-12 08:58:52 +03:00
hius07
40e2a838ae Status: setting status of current book in History and Collections (#10946) 2023-09-29 07:44:10 +03:00
hius07
e4ba8c7909 Custom metadata: event (#10869) 2023-09-06 09:41:10 +03:00
hius07
45428dda49 History: shorten date/time field (#10594) 2023-06-21 07:33:09 +03:00
hius07
01e6593dd4 File popup dialog buttons (#10537) 2023-06-08 08:27:52 +03:00
hius07
59a0139a60 File browser: add Folder Menu (#10275) 2023-03-31 19:35:27 +03:00
hius07
df9c2bcb7f History: fix book info buttons disable (#10244) 2023-03-26 21:11:19 +03:00
hius07
a3d42ac344 Classic display mode: add popup file dialog buttons (#10185) 2023-03-07 22:24:42 +02:00
hius07
15605291c2 DocSettings: add support of centralized sdr storage (#10132) 2023-02-17 23:06:55 +02:00
Melik
881d8ed406 Fix spelling of filemanagerutil.genStatusButtonsRow 2023-02-11 21:49:23 +01:00
Melik
d9b0785a96 Reset button gen to util, collections current file check
- filemanagerutil.resetDocumentSettings()'s doc_settings:close() -> doc_settings:flush()
- Remove current_status from filemanagerutil.getStatusButtonsRow() args, get it inside from file
- Move genStatusButton() inside filemanagerutil.getStatusButtonsRow()
- Move "Reset settings" button generation to filemanagerutil
- Rename "Reset settings" button to "Reset" and update popup box text
- Disable "Reset settings" for file if it's currently open in Collections (same as History)
2023-02-11 21:49:23 +01:00
Melik
fb7ec830c6 Create getStatusButtonsRow() for status buttons, hide row if history item deleted 2023-02-11 21:49:23 +01:00
Melik
31cfffc289 Pull genStatusButton() to filemanagerutil 2023-02-11 21:49:23 +01:00
Melik
502bb0ccbf Create genStatusButton() for buttons, use item.dim for deleted in history 2023-02-11 21:49:23 +01:00
Melik
9e7e68beb6 Shorten status button names 2023-02-11 21:49:23 +01:00
Melik
1b2adfd201 Return to callback fudging, fix book info callback replacement 2023-02-11 21:49:23 +01:00
Melik
628cacf1e6 Disable status buttons for deleted files in history 2023-02-11 21:49:23 +01:00
Melik
8642509f26 Move 'Put on hold' between reading & read 2023-02-11 21:49:23 +01:00
Melik
57849b3f7c Add buttons to history, use id for button-getting 2023-02-11 21:49:23 +01:00
melyux
cc53ceb039 History: remember status filter, show filtered count in title (#9822) 2022-12-02 16:56:00 +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
NiLuJe
62059f8d68 Misc: Get rid of the legacy defaults.lua globals (#9546)
* This removes support for the following deprecated constants: `DTAP_ZONE_FLIPPING`, `DTAP_ZONE_BOOKMARK`, `DCREREADER_CONFIG_DEFAULT_FONT_GAMMA`
* The "Advanced settings" panel now highlights modified values in bold (think about:config in Firefox ;)).
* LuaData: Isolate global table lookup shenanigans, and fix a few issues in unused-in-prod codepaths.
* CodeStyle: Require module locals for Lua/C modules, too.
* ScreenSaver: Actually garbage collect our widget on close (ScreenSaver itself is not an instantiated object).
* DateTimeWidget: Code cleanups to ensure child widgets can be GC'ed.
2022-09-28 01:10:50 +02:00
Frans de Jonge
0fe3a9d19c [i18n] Add context to book status filter options (#8906)
Fixes #8903.
2022-03-15 16:16:04 +01:00
hius07
7b4d6fd205 History: filter by book status (#8820) 2022-03-12 11:26:11 +01:00
poire-z
37eb53f6e4 DocSettings/Purge .sdr: reword, don't purge other books (#8348)
Reword "Purge .sdr" to "Reset settings".
When purging, remove only the known document metadata
files, and not those for a document with the same name but
a different suffix.
2021-10-21 22:43:05 +02:00
hius07
2a6931e72f History: add confirmation before cleaning (#8016) 2021-07-23 17:14:25 +02:00
NiLuJe
90c38e2d0d ReadHistory: nil guard a Document instance access
We're now more careful about this, so, I suppose weird timings may mean
we might be trying to access a nil here.

Fix #7706

Guard a few other similar constructs
2021-05-19 20:55:00 +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
d31dc1e450 FileManager modules: Slightly less hackish onSetRotationMode handlers...
And, also, rotate the parent widget (i.e., FM/RV) to avoid leaving the
user with a broken layout when they exit in a different orientation ;).
2021-04-10 00:39:49 +02:00
NiLuJe
a185290549 FileManagerHistory: Handle rotation events
Fix #7518
2021-04-10 00:39:49 +02:00