Commit Graph
59 Commits
Author SHA1 Message Date
hius07 8e8ca98c37 Book status: reset rating (#15227) 2026-04-04 17:43:10 +03:00
hius07 ae5e94db77 Stable pages in file browser 3 (#14952)
Patterns %c (current page) and %t (total pages) will show the same values in reader and file browser.
2026-02-16 21:12:31 +02:00
hius07 1da6dfe1e5 ReaderRolling: save percent_finished on flushing settings (#14787) 2026-01-04 08:00:57 +02:00
hius07 05faeb0597 filemanagerbookinfo: fix "time left in chapter" (#14754) 2025-12-26 16:55:54 +02:00
hius07 76eeed1cb4 Stable pages in file browser 2 (#14592) 2025-11-10 18:30:11 +02:00
hius07 340732f03b Book info: more informative Pages infomessage (#14493) 2025-10-31 18:14:15 +02:00
hius07 3f4ce6bbe1 Stable page numbers 2 (#14473) 2025-10-20 19:02:26 +03:00
hius07 6f22a33b75 filemanagerbookinfo: minor fixes (#14373) 2025-09-29 18:32:52 +03:00
Jason Benwell 336291712a Add separator to custom footer text item (#14328) 2025-09-15 16:04:18 +02:00
Jason Benwell 0c917c6b3a Add "pages left in chapter" option to custom footer text (#14327) 2025-09-14 19:35:57 +02:00
hius07 6c7efa1bdf expandString(): replace patterns with data (#14181) 2025-08-23 09:27:10 +03:00
hius07 93ee0a1415 File browser: sort by metadata (#13437) 2025-03-24 19:12:46 +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 89fd0061fb filemanagerbookinfo: fix logic in getCoverImage() (#12852) 2024-12-06 14:36:30 +02:00
hius07 24d8baf3ec Notebook file (#12699) 2024-11-21 07:53:22 +02:00
hius07 ed9cde8feb UX minor fixes (#12374) 2024-08-19 08:10:14 +03:00
hius07 c46578aece BookInfo: rating, review (#12313) 2024-08-11 17:01:15 +03:00
hius07 b949d07f4f filemanagerbookinfo: proper text_type of description (#11260) 2023-12-25 07:40:13 +02:00
hius07 f765fe3070 Screenshot: set as book custom cover (#11227) 2023-12-16 10:36:57 +02:00
hius07 d0d3cf78f9 History: search (#11084) 2023-11-09 07:34:56 +02:00
hius07 b70f866656 DocSettings (again) (#11020)
Cleaning and optimizing Docsettings code.
2023-10-31 07:30:39 +02:00
hius07 0ac258fcb7 Coverbrowser: event for cache refreshing (#10956) 2023-10-03 09:24:29 +03:00
hius07 9f39614e8a Custom metadata: fixes 2 (#10919) 2023-09-23 10:21:19 +03:00
hius07 108d87742a Custom metadata: fixes (#10889) 2023-09-12 07:54:38 +03:00
hius07 e4ba8c7909 Custom metadata: event (#10869) 2023-09-06 09:41:10 +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 46933035c5 Open with: images (#10561) 2023-06-12 09:08:56 +03:00
hius07 fc7181419f CoverImage: custom cover support (#10553) 2023-06-09 10:36:34 +03:00
hius07 1944f54aa0 Custom cover: fix (#10513)
Somehow have overlooked in testing.
Closes #10512.
2023-05-31 14:28:07 +02:00
hius07 3dce41269d Translator: translate current page (#10438) 2023-05-17 07:34:37 +03:00
hius07 4f23a6fafa Custom book covers (#10329) 2023-05-03 15:43:05 +03:00
hius07 99265ba1b7 BookInfo: fix crash on show cover (#10315) 2023-04-16 21:46:09 +02:00
hius07 a3080b042a BookInfo: add page information (#10255) 2023-03-31 12:59:11 +03:00
hius07 4d26650ad6 Filesearcher: add search in book metadata (#10198) 2023-03-28 16:16:53 +03:00
hius07 a3d42ac344 Classic display mode: add popup file dialog buttons (#10185) 2023-03-07 22:24:42 +02: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 2fe8c3c41b "Book description": more consistent wording (#7789) 2021-06-04 18:47:29 +02:00
NiLuJe 94f708b53b BookInfoManager: Actually close the document after extraction
DocumentRegistry just decreases a ref, it doesn't close anything.

Plug the same Document leak in a few other places, and document this.
2021-05-19 20:55:00 +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 8a0d798e9e KeyValuePage: configurable items per page
Tweak building to start from items per page instead of
a fixed item height.
Guess the best font size that fit.
Update separator specification from using a "----" to
the now generic separator=true (this allows not wasting
a slot for each separator in the page and not have
only 12 items and 2 small lines in a 14 items page).
2021-02-20 21:30:31 +01:00
NiLuJe 7f6bc28eca BookInfoManager: Convert thumbnail compression to ZSTD
* Avoid the Lua string copies when compressing/uncompressing the bb
  thumbs
* Delay the statement reset so that the pointer returned by the BLOB
  query is actually usable ;).
* Re-use a ZSTD decompression context
* Store date & mtime for successfully extracted documents
  c.f., https://github.com/NiLuJe/koreader/commit/10477501f90471e84df68f561274f19a9a202dfb#r44914917
* Switch to user_version pragma to handle DB schema versioning
* Update file size/date on *each* extraction attempt.
  @poirez-z raised a good point, this ought to be useful to deem a file
  re-parseable after an update.
* Remove xutil
  Functionality has been moved to ffi/zlib & ffi/zstd
* Preserve settings when migrating the BookInfo DB
* Warn via InfoMessage that the DB was updated
* Only store the series name in series, and move the index in series_index
  (Column names chosen to match Calibre's).
* Handle the new series_index column in BookInfo consumers
* This allows us to get rid of the code that stripped empty decimals
  from series index in *most* places, since it's now a real Lua
  number, and the string formatting library does that magic on its
  own.
2020-12-19 04:16:44 +01:00
poire-z b5867c3ead BookInfo: add File date, handle zip sub-suffix (.fb2.zip) 2020-03-27 18:36:48 +01:00
poire-z c449d0ad1e [UI] Render metadata text with book language
Gives the book language to Text*Widget (and XText) when
drawing title, authors and other metadata text.
Might be needed to properly display a Japanese book title
when the UI language is Chinese.
2020-01-23 19:26:07 +01:00
poire-z 0599c440cc [RTL UI] Bidi-wrap filenames, paths, urls, metadata
bidi.lua:
- Revert "Alias everything to Bidi.nowrap() when in LTR UI,
  as using LTR isolates seems uneeded when already LTR" (part
  of a628714f) which was a wrong assumption: we need proper
  wrappers for all things paths. Enhance some of these wrappers.
- Fix GetText RTL wrapping which was losing empty lines and
  trailing \n.

- Wrap all paths, directories, filenames in the code with
  these wrappers.
- Wrap all book metadata (title, authors...) with BD.auto(),
  as it helps fixing some edge cases (like open/close quotation
  marks which are not considered as bracket types by FriBiDi).
  (Needed some minor logic changes in CoverBrowser.)

- Tweak hyphenation menu text
- Update forgotten SortWidget for UI mirroring
- KoptConfig: update "justification" index for RTL re-ordering,
  following the recent addition of the page_gap_height option.
2020-01-04 01:34:46 +01:00
poire-z 454f14384b Gesture manager: fix actions: Book cover, Book description (#4800)
Code removed from ReaderGesture and put into BookInfo where
it belongs, so we can just use Events.
Also convert description to plain text to not show HTML tags.
2019-03-15 15:29:25 +01:00
Frans de Jonge 80d7d1a530 [UX] Gesture manager: add action - show book information (#4777)
As requested by @ersi.

Cf. https://github.com/koreader/koreader/issues/4727#issuecomment-471766024
2019-03-12 09:17:27 +01:00
poire-z 0fde66c2c6 BookInformation: speedup getting EPUB metadata/cover (#3767)
coverbrowser: also plug optimised callback to the right
button ("Book information" was shifted when "Open with..."
was added)
2018-03-17 00:28:37 +01:00