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

167 Commits

Author SHA1 Message Date
hius07
e577c79d95
File search, FileChooser and others (#10994) 2023-10-12 08:58:52 +03:00
hius07
0ac258fcb7
Coverbrowser: event for cache refreshing (#10956) 2023-10-03 09:24:29 +03:00
Benoit Pierre
08555ad68b coverbrowser: make showing some metadata fields optional 2023-10-02 12:46:33 +02:00
Benoit Pierre
e8bc28db33 coverbrowser: minor simplification
Add a `toggleSetting` helper.
2023-10-02 12:46:33 +02:00
Benoit Pierre
7d3456edc1
[plugin] CoverBrowser: improve title & authors layout (#10942)
- handle possible height overflow
- now that labels don't overflow, increase the minimum font size
2023-09-29 10:05:03 +02: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
poire-z
626864f856 [chore] replace utf8 bytes with Unicode escape sequence 2023-08-02 01:28:24 +02:00
hius07
01e6593dd4
File popup dialog buttons (#10537) 2023-06-08 08:27:52 +03:00
hius07
4f23a6fafa
Custom book covers (#10329) 2023-05-03 15:43:05 +03:00
hius07
fd8cb14c00
CoverBrowser: fix getting cached info (#10346) 2023-04-26 10:19:01 +03:00
hius07
b7c4e1c21b
ListMenu: show mark for books with highlights (#10276) 2023-04-02 16:58:51 +03:00
hius07
4d26650ad6
Filesearcher: add search in book metadata (#10198) 2023-03-28 16:16:53 +03:00
hius07
aedb713f82
Menu widget: cleanup (#10241) 2023-03-25 09:48:30 +02:00
hius07
cc3e48fa3a
Coverbrowser: unify display modes (#10188) 2023-03-13 09:53:09 +02:00
hius07
a3d42ac344
Classic display mode: add popup file dialog buttons (#10185) 2023-03-07 22:24:42 +02:00
Frans de Jonge
26dc43553b
[fix] CoverBrowser: fix calling upvalue crash in MosaicMenu (#10164)
Regression introduced in #10140.
2023-02-26 22:55:56 +01:00
hius07
5cf72b6eea
MosaicMenu: correct access to doc settings (#10140) 2023-02-20 08:16:44 +02:00
hius07
15605291c2
DocSettings: add support of centralized sdr storage (#10132) 2023-02-17 23:06:55 +02:00
melyux
e55b60175b
CoverBrowser Mosaic: improve book status, floating progress bar (#9939)
- New dogear icons in Mosaic cover view to indicate each
  possible book status: 'Reading', 'On hold', 'Finished'
- Progress bar redesigned to be floating, taller, thicker
  bordered in Mosaic cover view
- Don't show progress bar if book is finished
- FakeCover bottom text (filename) adjusted to not overlap
  with progress bar and dogear if they exist
- Mosaic book shortcut letter moved from bottom left to
  top left
2023-02-17 21:29:53 +01:00
hius07
da841f3d87
ListMenu: correct access to doc settings (#10119) 2023-02-15 08:30:12 +02:00
Melik
bc92ad923e Move cache update logic into CoverMenu:updateCache 2023-02-11 21:49:23 +01:00
Melik
7d6da81233 Compact covermenu addn. to for loop, fix collections bug, further gimp genStatusButton to use upvalues 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
502bb0ccbf Create genStatusButton() for buttons, use item.dim for deleted in history 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
a9313dda1a Add buttons to collections 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
Melik
086d4622e6 Add buttons to file manager, lay groundwork 2023-02-11 21:49:23 +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
b523c2e8b9 InputContainer: Fall cleanup ;).
Get rid of the doc & seqtext fields, as they are not actually used (nor
are they particularly useful, the event handler's name should be pretty
self-explanatory).

Also, tweak the key_events documentation to highlight the quirks of the
API, especially as far as array nesting is involved...

Random drive-by cleanup of the declarations of key_events & ges_events
to re-use the existing instance object (now that we know they're sane
;p) for tables with a single member (less GC pressure).
2022-10-29 22:55:20 +02:00
Benoit Pierre
1d6f4acad0
CoverBrowser: fix some button callback overrides (#9647)
Broken since b0eb0ce0: the custom callbacks for the "Reset settings"
& "Book information" buttons are not being called anymore because
patching those is done to early (before instead of after creating
the new modified dialog).
2022-10-20 20:53:50 +02:00
zwim
4969811c08
Optimization: Use constant folding for divisions not a power of two (#9609) 2022-10-10 22:21:27 +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
b0eb0ce0e1
FileManager: add Select button to the file long-press menu (#9571) 2022-10-04 07:44:17 -04: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
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
zwim
9b9cfe29a4
[feat] Replace TimeVal (RIP) with time, fixed point time seconds (#8999) 2022-05-05 21:00:22 +02:00
Utsob Roy
af7c8cade8
[feat, UX] CoverBrowser: add progressbar in Mosaic View (#8915) 2022-03-19 11:15:22 +01:00
NiLuJe
217a73f3c0
Initial Kindle PW5 support (#8856)
* Rejig frontlight warmth API to more closely match the existing API, and, hopefully, clarify some of its quirks, and reduce boilerplate and duplicate code in platform implementations.
* Tweak Kindle:setDateTime to prefer using the platform's custom script, as in interacts better with the stock UI. And make the fallbacks handle old busybox versions better.
* Add Kindle PW5 support ;).
* Add warmth support to the Kindle platform.
* Random TextBoxWidget cleanups: make sure we immediately free destroyed instances.
* FrontLightWidget: Refactor to make it slightly less obnoxious to grok and update; i.e., separate layout from update, and properly separate brightness from warmth handling. Move to simpler widgets instead of reinventing the wheel.
* TextBoxWidgets: Implement `setText` to match TextWidget's API, as some callers may be using the two interchangeably (i.e., Button).
* NaturalLightWidget: Make sure we pass a string to InputText
* InputText: Add debug guards to catch bad callers not passing strings ;).
2022-03-14 19:56:18 +01:00
hius07
7b4d6fd205
History: filter by book status (#8820) 2022-03-12 11:26:11 +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
poire-z
f21a12360a CoverBrowser: use translations for error messages 2022-01-19 12:23:38 +01:00
hius07
1bfb49c6a5
PathChooser: add left Home button (#8646) 2022-01-11 14:47:06 +02:00
hius07
55532b1397
Menu widget: insert TitileBar (#8639) 2022-01-10 21:21:39 +02:00
yparitcher
71172253b7 covermenu/listmenu: mandatory should not be nil
Caused by #8598
2022-01-08 19:28:58 -05:00
yparitcher
e0424e644f cre is a global after engineInit() 2021-12-16 15:32:40 -05:00