Commit Graph

6001 Commits (2c1178896ce64adc19fb9a33d435194e0a8be427)
 

Author SHA1 Message Date
Frans de Jonge 2c1178896c
[feat] Add ReaderBack (#3821)
This implements a reasonable facsimile of going back on Android.

The back button first goes back in a history of visited pages.
When there's no history left, it closes the app.

Fixes #3816.
6 years ago
Frans de Jonge c332d517f7
[feat, UX] bump base for SDL2: preliminary gamepad support (#3819)
* [feat] SDL2: preliminary gamepad support https://github.com/koreader/koreader-base/pull/628

This is a "dumb" implementation that spits out fake keyboard events.

* Left stick & d-pad: arrow keys
* Bumpers and right stick: page up/down
* Menu button: menu
* A: enter
* B: back

This is sufficient to use most of the program.

Made possible by @onde2rock's recent efforts in https://github.com/koreader/koreader/pull/3796
https://github.com/koreader/koreader/pull/3785 https://github.com/koreader/koreader/pull/3774
https://github.com/koreader/koreader/pull/3765 and https://github.com/koreader/koreader/pull/3745
6 years ago
onde2rock f893b01f04 [fix, UX] CoverBrowser: reset cursor (#3817)
Also don't show the underline before the first key move.
6 years ago
onde2rock 74a06d98a2 [chore] Code cleanup : deprecate the 'Enter' event, replaced with 'Press' (#3815)
'Escape' now do 'Back' on SDL
'Enter' now do 'Press' on SDL
6 years ago
onde2rock ae9d71de5f [fix] libz not found on kindle4 (#3807) 6 years ago
Frans de Jonge 79881cdef9
[feat] bump base for SDL2: update parts of window like a real device (#3812)
https://github.com/koreader/koreader-base/pull/626

This commit uses a viewport to draw only a subset of the blitbuffer onto the
rectangle to be updated in the SDL texture.

Without this, there are cases where a full screen (or at least bigger) refresh
is required that will not be obvious without first testing on a real device.
See https://github.com/koreader/koreader/pull/3804

Also fixes `EMULATE_READER_FLASH`, which was accidentally broken in 981bd40e1c

Also includes: [fix] SDL2: apply night mode on window resize (https://github.com/koreader/koreader-base/pull/627)
6 years ago
onde2rock e502bf04d3 [feat, UX] Support the virtualKeyboard on non touch-device (#3796)
* [VirtualKeyboard] Add support for keynaviguation

Also rename the variable "layout" to "keyboard_layout" because conflict
with the layout from the focusmanager

* Make the goto dialog compatible with key naviguation

My solution is to change the order of the widget. The last one will the
virtualkeybard so it catch all the keybinding, and below it, make the
dialog "is_always_active = true" so it can receive touch event.

* Correctly show the virtual keyboard on dpad devices

* change the order to call the virtualKeyboard so it end up on top

* Handle the multi input dialog

* Support reopening the virtualKeyboard by the Press key

* add check focusmanager

* Fix https://github.com/koreader/koreader/issues/3797

* MultiInputDialog : Now work on non touch-device

* Set the virtualkeyboard to be a modal widget

* Fix the layout in multiinputwidget

* Fix for the various combination of
hasKeys,hasDpad,isTouchDevice

* [Focusmanager] Better handling of malformed layout
6 years ago
Frans de Jonge 6c3ace9940
[Android] Makefile: only use VERSION, not REVISION (#3811)
Fixes always reinstalling resource package.

See https://github.com/koreader/koreader/pull/3723#issuecomment-376508917
6 years ago
Frans de Jonge 3ead3f0da4
[fix] Kobo suspend when touching screen (#3809)
As in https://github.com/koreader/koreader/issues/3706#issuecomment-370336452 Suspend kept being rescheduled on every touch while we should just ignore it.

Fixes #3706.
6 years ago
Frode Austvik f36d93a8f7 [Fix] Make ScrollTextWidget:moveCursor return the new charpos. (#3808) 6 years ago
poire-z e21fe55042 [UX] Remove search highlights when closing search bar (#3804)
They were indeed removed, but no full screen refresh was requested,
so the highlights stayed visible.
6 years ago
onde2rock 43c2c92194 [UX] FileManager: Tapplus access for non-touch devices (#3773) 6 years ago
Frans de Jonge 273f21c3a5
bump base (#3803)
Includes:

* [fix] ffi/framebuffer_android: separate invert blitbuffer https://github.com/koreader/koreader-base/pull/625
  Fixes #3529.
* SDL2: handle SDL_WINDOWEVENT_EXPOSED https://github.com/koreader/koreader-base/pull/624

  The next buffer might always contain garbage, and on X11 without
  compositing the buffers will be damaged just by moving the window
  partly offscreen, minimizing it, or putting another window
  (partially) on top of it.

  Handling `SDL_WINDOWEVENT_EXPOSED` is the only way to deal with
  this without sending regular updates.
6 years ago
Frans de Jonge fb6dbf0428
[fix] kodev update $VERSION for `run android` (#3801)
As in 16061370f4, leftover from #3723.

Also replaced a few non-standard `which` by `command -v` as per new shellcheck rule.
See https://github.com/koalaman/shellcheck/wiki/SC2230
6 years ago
Frans de Jonge 7cbfcec347
bump base (#3800)
For:

*  bump crengine: increase maximum LVDocView::Resize() width/height to 32767

https://github.com/koreader/koreader-base/pull/623
https://github.com/koreader/crengine/pull/139
6 years ago
Frans de Jonge 3838aab169
[fix] calibrecompanion.plugin (#3799)
Fixes #3794. 

Upstream luasocket 96965b179c switched from just `socket.udp()` to `socket.udp4()` and `socket.udp6()`.
6 years ago
Frans de Jonge 680b53e347
[fix] NetworkManager:isConnected() exit code check (#3795)
Fixes #3794.
6 years ago
onde2rock dfd87447da [UX] Make the reader bottom menu compatible with key navigation (#3785)
* [toggleswitch] Add support for key navigation to this widget

Add the onFocus an onUnfocus event handler
add a new function that just circle the switch if not touch event is
detected

* Add key navigation to the readermenu

The shortcut is still Alt-gr on sdl, to be defined on Kindle

* Remove the old method of handling the Press key.

Now the event is handled by the main widget who implement focusmanager
and then dispatched to the currently focused item.
Modify the fine font tuning only for non touch-devices

See : https://github.com/koreader/koreader/pull/3785#issuecomment-375306466
6 years ago
Frans de Jonge 7e6de30889
[feat, UX] SDL2: drop file to open (#3793)
Includes:

* crengine: use cache files renamed as .cr3.keep https://github.com/koreader/crengine/pull/137
6 years ago
poire-z 2a3f9d6ae2 FileManagerMenu: show tab from gesture position (#3792)
As it was done for ReaderMenu in 6e303e7
6 years ago
Frans de Jonge cb43c2b23c
bump base (revert previous commit) (#3790) 6 years ago
Frans de Jonge d091ce9cf9
Bump base (#3789)
Includes [build] Add -fsanitize=undefined to debug flags #608
6 years ago
Frans de Jonge cbcbd54dad
bump base to fix MuPDF Mac Build (#3788)
https://github.com/koreader/koreader-base/pull/616

Fixes #3783.
6 years ago
Frans de Jonge 65a63d244b
[UX] SDL2: set window title (#3784)
This initial implementation only sets the title for FileManager and ReaderUI.

Fixes #3713.
6 years ago
Frans de Jonge 8b9c83a5ed
Update README.md: more Mac info (#3787)
References #3783.
6 years ago
Frans de Jonge 5713ccb3f8
Bump base: crengine: support <ol start=N> and <li value=N> attributes (#3786)
https://github.com/koreader/crengine/pull/135
https://github.com/koreader/koreader-base/pull/617

Fixes #3782.
6 years ago
onde2rock 1b91470899 [FocusManager] More intuitive key navigation + spec (#3774)
FocusManager now finds the closest widget on the right or left on inner horizontal border.

See : https://github.com/koreader/koreader/pull/3765#issuecomment-373944897
6 years ago
Frans de Jonge 96242648c8
[UX] apps/reader/modules/readerfooter: also redraw progressbar on height change (#3780) 6 years ago
poire-z 79448ac046
coverbrowser: fix some vertical alignments (#3779)
introduced by the recent correction to UnderlineContainer.
6 years ago
Frans de Jonge f1aae6a03c [UX, fix] Redraw PdfDocument and DjvuDocument after resizing window 6 years ago
Frans de Jonge d0f1dee618 [UX, fix] ui/widget/menu: add onScreenResize action 6 years ago
Frans de Jonge 24c0132744
[feat] SDL2: resize window (#3775)
References #1417 

Bumps base for https://github.com/koreader/koreader-base/pull/614

Also includes:
* Speedup loading from cache EPUB with many files https://github.com/koreader/crengine/pull/133
* Avoid rewriting cache file when no change were made https://github.com/koreader/crengine/pull/134
6 years ago
Frans de Jonge c40e2bc0e4
bump base: crengine Speedup loading EPUB metadata (#3772) 6 years ago
onde2rock 5fcb804d47 Allow opening hold menu on non touch devices (#3765)
Emulate the hold touch behavior on non touch device by clicking the right key
ButtonTable: do not add vertical separator to the layout because the focus
manager can't traverse them. Add check to make disabled button non-clickable.
6 years ago
poire-z 5e47a83e6a
UIManager: avoid painting widgets covered by a full screen widget (#3770)
Navigating the TOC, viewing a full screen image, browsing
reading stats... would call paintTo() on ReaderUI (so, asking
the engine to render the page) or FileManager (so, rendering cover
images) even though their content is hidden.
Widgets registering to UIManager have to explicitely states
they cover the full screen (UIManager can't know, parts of their
dimen may be transparent, e.g. if it is a CenterContainer).
6 years ago
poire-z 50a96ce2b2 Fix some texts (#3769) 6 years ago
poire-z b3b7e3d279 Remove some leading and trailing newlines (#3768)
in some InfoMessage and ConfirmBox, introduced willingly
or not, that cause top or bottom padding
6 years ago
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)
6 years ago
poire-z bc1eefb20b
bump crengine: fix opening some epubs, speedup page turn (#3766) 6 years ago
poire-z b46628c08c
new option: Save Wikipedia EPUB in current book directory (#3762)
Also uses PathChooser (instead of InputDialog) in 'Set Wikipedia
Save as EPUB directory'. When setting not yet set, propose to
create and use ~/Wikipedia/ .
6 years ago
poire-z 04350a8409 coverbrowser: fix some texts (#3764) 6 years ago
poire-z 0a4fb89239 Fix possible crash with config panel when engine switched (#3761)
Reading an epub file with Mupdf would show 6 items in bottom
config panel. Reading it with crengine would show only 5.
A crash would happen if we were on the 6th when leaving MuPDF,
and later opening config panel with crengine.
6 years ago
poire-z 152e17fbe3
Adds 'cre_disk_cache_max_size' setting (#3760)
For max disk space usable by crengine for storing book caches.
Increased default from 32 MB to 64 MB.
6 years ago
poire-z 9858060c56 [lang] coverbrowser: fix some texts (#3759) 6 years ago
onde2rock e8aab49ee9 Kindle4NT improvements (#3745)
* [device][kindle4] add fake event to kindle4

* modify focusmanager to allow for more complex layout

The focusmanager now naviguate the layout by avoiding nil value
instead of relying on table lenght. It should be completely backward
compatible

* add Dpad naviguation to the touchmenu

* fix crash because virtualkeyboard on non touch device

the kindle4NT has no keyboard nor touch, the fix open the virtual
keyboard so koreader dont crash but it's not useable

* Enable device with keys to use the touchmenu

* Don't get stuck in reader progress statistics plugin

* [underlinecontainer] Fix and remove unused function

References #1898.
6 years ago
poire-z 9849d89f0e
coverbrowser: allow for batch metadata extraction (#3750)
This adds a button to the Tap Plus menu, that allows
extracting metadata and cover images for books in
current directory. Info about the process and questions are
initially shown and asked, and the process can be aborted at
any moment.
6 years ago
anarcat 14063249ab Propose installing SDL on Linux (#3753)
"hardware abstraction" didn't mean anything for me when I tried the emulator at first on Debian. In #2621, it was proposed to suggest installing SDL.
6 years ago
Frans de Jonge 5e557e2219
[i18n] Update frontend/ui/language: add Basque and uncomment Vietnamese (#3755)
Adds Basque (new) and uncomments Vietnamese (now partially translated).

Fixes #3749.
6 years ago
Frans de Jonge 18baf5b7ba
[fix, i18n] plugins/goodreads.koplugin: make untranslated string translatable (#3751)
Fixes #3748.
6 years ago
anarcat 78fbc145e4 turn missing translations into a warning (#3752)
This is not fatal and can be mistaken by new users for the cause of all their problems, like I did in #2621.
6 years ago