2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

4187 Commits

Author SHA1 Message Date
poire-z
6059958ab6
File browser settings: reorganize into Settings submenu (#7259)
Move classic file browser settings from CoverBrowser plugin
into FileManagerMenu, so they are available when this
plugin is disabled (as they also apply to everything
based on Menu).
2021-02-09 12:41:17 +01:00
Frans de Jonge
ac668ecb64
Add a few more mimetypes for OPDS (#7258)
Doesn't include application/zip as CBZ, but it will be downloaded (as ZIP).

Doesn't include CBR since that's not supported.

Closes #7218, closes #5997.
2021-02-07 19:11:45 +01:00
NiLuJe
82f0e68118
Button: Fix some more weird highlighting corner-cases (#7256)
Namely, the Terminal plug-in and its chain of InputDialog on top of each other (via the "Save" button, which opens a whole new fs InputDialog to set the filename, while keeping the file's fs InputDialog open).
2021-02-07 18:29:32 +01:00
NiLuJe
23affc7414
Menu: Properly unhighlight menu items with a callback that doesn't do anything (#7254)
Fix #7251
2021-02-07 18:28:55 +01:00
NiLuJe
9e862e1126
TextViewer: Flag as a modal (#7255)
It's used that way in a few contexts (e.g., View HTML).

Fix #7249
2021-02-06 21:10:44 +01:00
Martín Fernández
5c9e649804
move opds to plugin (#7237) 2021-02-06 19:09:31 +01:00
poire-z
c7e97ca3cb
Highlight dialog: fix 'Follow Link' button not shown (#7250)
Since 7bd59330: some checks can't be done at init(),
and have to be done at onShowHighlightMenu() time.
2021-02-06 16:59:09 +01:00
Frans de Jonge
893026a2ef
[chore] Fix a few Persian keyboard luacheck issues (#7253)
Cf. <https://github.com/koreader/koreader/pulls#issuecomment-774345230>.
2021-02-06 16:27:02 +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
poire-z
316107a1cb ReaderRolling: fix possible crash in scroll mode
When opening a document in scroll mode with an invalid
last_xpointer.
This code path was never taken before 05126b94, and it has
never been updated to pass the page number in scroll mode
(so it's provided to the footer) like it has been in other
places.
2021-02-05 23:58:32 +01:00
Monirzadeh
6f50d67b5d
[UX] Add Persian keyboard (#7222)
Fixes #5791.
2021-02-05 21:30:09 +01:00
Frans de Jonge
cf3fed252a
[chore] Properly set CoverImage menu order (#7239)
Reported by @pazos in <https://github.com/koreader/koreader/pull/7237#discussion_r570395126>.
2021-02-05 12:56:31 +01:00
NiLuJe
d4d5dd25ba TextViewer: Allow tweaking the region of the refresh done on close.
Use it in ReaderBookmarks to clear flash_ui highlights.

Fix #7230
2021-02-04 06:30:16 +01:00
NiLuJe
b41567e0e6 ConfigDialog: Check alt_name_text if name_text isn't set,
as it is used for the "Set as default" popup.
This allows having that text accurate on widgets without an
actual name_text (e.g., the font size wheel).

Fix #7231

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2021-02-04 06:30:16 +01:00
NiLuJe
285fc75aa7
Button: Better handling of translucent MovableContainer (#7223)
* DictQuickLookup: Preserve alpha when switching dict, and scrolling
inside a dict.

* Start moving the NumberPicker alpha hack to Button itself

This makes handling flash_ui easier and saner, avoiding flickering.

* Handle the transparency hack entirely from within Button

* Murder the now unnecessary NumberPicker update_callback hack

* Tweak comments

* And the Button handling made that redundant, too

* Squish debug print

* More comment tweaks

* Reset transparency on scrolling instead of rpeserving it

* Reset alpha when switching dictionaries

* Simplify the pre/post callbakc transparency state handling

And explain why we need to care.

* Give a named reference to ButtonDialog's MovableContainer, so the Button
alpha hack behaves with it

* Document the "self.movable" convention

* Amend that comment a bit

e.g., we don't care much about MultiConfirmBox'w MpvableContainer, as
any button action will close it.

* And make SkimTo's MovableContainer accessible so that Button can grok
that it's translucent
2021-02-02 04:27:14 +01:00
Martín Fernández
4a89c93290
Remarkable1 wifi (#7216)
* add wifi support to Rm1
* remarkable: common suspend for all models
2021-02-02 03:19:37 +01:00
poire-z
68a5fcdbc1 Notifications: stack them instead of overdrawing them 2021-02-01 23:57:47 +01:00
poire-z
cdafd9438c Georgian keyboard: remove unused variable (luacheck) 2021-02-01 23:57:47 +01:00
Beka Arabuli
f665a25e70
Georgian keyboard (#7225) 2021-02-01 22:35:15 +01:00
poire-z
a192a335f1 Footer: tweak auto refresh code
Make it similar to how it's been done recently for CRe
alt status bar, avoiding scheduling when not needed.
2021-01-31 22:39:01 +01:00
poire-z
062bb68335 Alt status bar: full repaint on font size change 2021-01-31 22:39:01 +01:00
NiLuJe
a38881a9f7
Fix a few things after #7166 (#7212)
* Switching between HTML/text dicts (Fix #7209)
* Updating the scrollbar and scroll state properly when switching dicts
* Highlights in SortWidget
* Highlights in the Dictionary Download page
* Minor simplification of the tail end of the update process in ImageViewer
2021-01-31 02:51:40 +01:00
zwim
3118d0dba0 Refresh AltStatusBar once a minute, if there are changes 2021-01-30 19:07:12 +01:00
poire-z
49e2d91afb Don't toggle the footer when toggling the top status bar 2021-01-30 19:07:12 +01:00
poire-z
8ee7dcf342 Top menu: long-press on truncated menu item to show full text 2021-01-30 19:07:12 +01:00
poire-z
05126b94b6 Dual pages: shown as 2 columns on a single page
Rework Dual pages code so that the view is considered
a single page number, so it looks more like 2-columns
on a single page.
This solves a few issues like:
- Page number and count are consistent between top
  and bottom status bars
- SkimTo -1/+1 doing nothing every other tap
- Statistics being wrong (like "Pages read" never
  going over half of the book page count)
2021-01-29 01:32:52 +01:00
poire-z
7779e2d8e7 CRe: use getDocumentRenderingHash() to detect rendering changes
Instead of just relying on document full height
and number of pages.
2021-01-29 01:32:52 +01:00
poire-z
fbdff1c672 CRe top status bar: ensure 12-hours clock setting 2021-01-29 01:32:52 +01:00
poire-z
8ff50a9e24 CreDocument: disable crengine image scaling options
Since their handling in crengine has been re-enabled.
2021-01-29 01:32:52 +01:00
poire-z
a482baac5b Footer current chapter: use first chapter on page instead of last 2021-01-29 01:32:52 +01:00
poire-z
564db73cd8 TOC: show en-dash on empty titles 2021-01-29 01:32:52 +01:00
poire-z
e74c28efa9 CRe TOC, Bookmarks: show marker when jumping 2021-01-29 01:32:52 +01:00
NiLuJe
df0bbc9db7
Tame some ButtonTable users into re-using Buttontable instances if possible (#7166)
* QuickDictLookup, ImageViewer, NumberPicker: Smarter `update` that will re-use most of the widget's layout instead of re-instantiating all the things.
* SpinWidget/DoubleSpinWidget: The NumberPicker change above renders a hack to preserve alpha on these widgets almost unnecessary. Also fixed said hack to also apply to the center, value button.

* Button: Don't re-instantiate the frame in setText/setIcon when unnecessary (e.g., no change at all, or no layout change).
* Button: Add a refresh method that repaints and refreshes a *specific* Button (provided it's been painted once) all on its lonesome.

* ConfigDialog: Free everything that's going to be re-instatiated on update
 
* A few more post #7118 fixes:
  * SkimTo: Always flag the chapter nav buttons as vsync
  * Button: Fix the highlight on rounded buttons when vsync is enabled (e.g., it's now entirely visible, instead of showing a weird inverted corner glitch).
  * Some more heuristic tweaks in Menu/TouchMenu/Button/IconButton
* ButtonTable: fix the annoying rounding issue I'd noticed in #7054 ;).

* Enable dithering in TextBoxWidget (e.g., in the Wikipedia full view). This involved moving the HW dithering align fixup to base, where it always ought to have been ;).

* Switch a few widgets that were using "partial" on close to "ui", or, more rarely, "flashui". The intent being to limit "partial" purely to the Reader, because it has a latency cost when mixed with other refreshes, which happens often enough in UI ;).

* Minor documentation tweaks around UIManager's `setDirty` to reflect that change.

* ReaderFooter: Force a footer repaint on resume if it is visible (otherwise, just update it).
* ReaderBookmark: In the same vein, don't repaint an invisible footer on bookmark count changes.
2021-01-29 00:20:15 +01:00
Glen Sawyer
34b177aa69
Wifi toggle for reMarkable 2 (#7122)
reMarkable 1 is no-op for the moment
2021-01-19 21:09:17 +01:00
Jason Benwell
41ab04b49e
Fix crash attempting to set compact items in status bar (#7172) 2021-01-19 21:07:56 +01:00
NiLuJe
0c76c73e4f
Assorted fixes after #7118 (#7161)
* I'd failed to notice that ButtonTable *also* instantiates seven billion Buttons on each update. Unfortunately, that one is way trickier to fix properly, so, work around its behavior in Button. (This fixes multiple issues with stuff using ButtonTable, which is basically anything with a persistent set of buttons. A good and easy test-case is the dictionary popup, e.g., the Highlight button changes text, and the next/prev dic buttons change state. All that, and more, was broken ;p).

* Handle corner-cases related to VirtualKeyboard (e.g., Terminal & Text Editor), which screwed with both TouchMenu & Button heuristics because it's weird.

* Flag a the dictionary switch buttons as vsync

(They trigger a partial repaint of the dictionary content).

* Flag the ReaderSearch buttons as vsync

They very obviously trigger a partial repaint, much like SkimTo ;p.
2021-01-18 16:51:25 +01:00
Cali-Co
66eb939936
[feat] Add skimming support for Non-Touch devices (#7163)
Fixes #6866.
Replace InputContainer with FocusManager for easier DPad Handling.
Add ProgressBar jump via key Q to P, corresponds with 0% to 100%.

Tested on K3 and SDL. Should be safe for devices with touch.
2021-01-18 11:59:04 +01:00
Frans de Jonge
1ef6d0b257
[feat] Support mimetypes in DocumentRegistry:hasProvider() (#7155)
And make .djvu the canonical extension for DjVu.

Fixes #5478.
2021-01-17 09:22:48 +01:00
Glen Sawyer
7753577616
[reMarkable] Don't need to keep attempting WiFi connection after success (#7121)
If we're in range of multiple known WiFi Access Points (including multiple instances of the same SSID), we don't need to keep trying to connect after the first successful connection.

Minimal change would have been replacing the return inside the foreach function with return [a non-nil value].
But foreach is deprecated, and since I was touching the code anyhow, I figured I'd do that tiny update as well.
2021-01-16 21:44:47 +01:00
Frans de Jonge
5c9dc850e8
Address assorted Weblate comments (#7154)
* Fix typo in dropbox

Reported by @lescheck

* Rephrase text justification explanation more elegantly

* CoverBrowser: fix up some plurals

* Statistics: remove random use of template function

* Use ngettext for minute/minutes and second/seconds

* Change KB/MB/GB to kB/MB/GB SI units
2021-01-16 21:40:00 +01:00
Jason Benwell
cd6e2d9975
Make status bar prefix compact items a bit more compact (#7153)
For battery level, show icon only
Reduce separator between items to " " from "  "
2021-01-16 15:30:43 +01:00
NiLuJe
dffe86dfe9
Cleanup eye-gouging madness around io.read calls (#7149)
* Don't reinvent the wheel when reading a one-line int or string from sysfs

* Simplify a whole other bunch of read calls
2021-01-16 04:41:46 +01:00
Martín Fernández
f52fffd467
Mark calibrecompanion plugin as obsolete (#7147) 2021-01-15 20:31:44 +01:00
NiLuJe
183e0a2e25
Bump android-luajit-launcher (#7137)
* Check available width when using a viewport

* Mention that available_width should always match width
2021-01-13 21:43:46 +01:00
poire-z
396d1fbf46
bump crengine: parsing, lists, 2-pages mode fixes & tweaks (#7138)
Includes:
- EPUB: fix truncated HEAD>STYLE stylesheet
- XML parsing: slightly better parsing of <script>
- Update German hyphenation patterns
- (chore) Silence some clang warnings
- (Upstream) CSS content: fix regression with open-quote/close-quote
- (Upstream) HTML lists: support the 'reversed' attribute
- (Upstream) Tweak list items disc/circle/square symbols
- 2-pages mode: option to skip geometry checks

CRE bottom menu: allow toggling Dual Pages in portrait mode.
2021-01-13 20:26:14 +01:00
Martín Fdez
1148e46651 migrate fontlist to persist 2021-01-13 15:00:13 +01:00
Martín Fdez
b8f0dc3752 add table persistence module 2021-01-13 15:00:13 +01:00
NiLuJe
47b0d4089a
Remember the final rotation during Reboot/PowerOff/AutoSuspend, too (#7133)
Re #7096, Fix #7125

Co-authored-by: yparitcher <y@paritcher.com>
2021-01-12 22:31:38 +01:00
Jason Benwell
f53fa1d323
[UX] Footer: add prefix option "Compact items" (#7127)
For a compact layout, with removed/shortened spaces.
2021-01-12 02:04:15 +01:00
poire-z
9b11497652 KOPT bottom menu: hide it when applying Zoom options 2021-01-12 00:34:30 +01:00