Commit Graph

6028 Commits (0e61eb7a7b3da3baefa31eac56b08680f92ec4b4)
 

Author SHA1 Message Date
Frans de Jonge 0e61eb7a7b
[fix] Cache: don't overwrite same CacheItem (#3847)
If the most recently used global cache item refers to the same
page, it would be overwritten. This will happen when closing a
paged (PDF/DjVu) document on the same page you opened it, as well
as when opening and closing EPUBs with crengine because it uses
its own cache.

Fixes #3846.
6 years ago
onde2rock d7a7a78731 [fix] MenuSorter: don't leave ghost top level items (#3844)
See https://github.com/koreader/koreader/pull/3773#issuecomment-379181517
6 years ago
Frans de Jonge afb07a8ca7
bump base for [build] djvulibre: add Kobo always UTF-8 filenames patch (#3845)
https://github.com/koreader/koreader-base/pull/639

Fixes #542.
6 years ago
David Engster 7a28c7d7aa [fix, UX] frontlightwidget: More space for text and centering
Otherwise clock display will have a line break for low DPI (see issue
6 years ago
David Engster 7c527aa5dd [chg] kobo/powerd: Keep max. warmth 2h after bedtime (issue #3825)
Keep max. warmth for 2h after bedtime, and then start reducing for 2h,
so that 4h after bedtime we have reached zero warmth.
6 years ago
David Engster 33c8c36f7a [fix, UX] frontlightwidget: Reduce text for automatic warmth
Reduce text size because for larger fonts this would not fit into
widget's size (issue #3825).
6 years ago
David Engster cb0fadb80b [fix, UX] naturallightwidget: Reduce text size in button
'Save settings' was too large a string for larger fonts, so replace
with just 'Save' (issue #3825).
6 years ago
David Engster f8d43b5c09 [fix] kobo/nickel_conf: Remove redundant 'return nil' 6 years ago
David Engster 9b67323326 [UX] naturallightwidget: Use unicode minus for button 6 years ago
Frans de Jonge 5d35d5190f
bump base (#3839)
* [build] bump LodePNG to latest Git https://github.com/koreader/koreader-base/pull/636
* [build] bump libpng to v1.6.34 5e30b38fa5
* djvu.c: return internal djvulibre error 22fcaa5bd0
* [build] bump glib to 2.54.3 031eb1583a
6 years ago
poire-z 2473ebce01
Wikipedia link: check if previously saved as EPUB (#3837)
Also makes MultiConfirmBox movable, like ConfirmBox is.
6 years ago
poire-z cc7ef363e5 [UX] CoverBrowser: set default display modes on first launch (#3834) 6 years ago
poire-z eb613ace3e [chore] CoverBrowser: avoid page info code duplication (#3835)
Also allows full refresh with small diagonal swipe
of Menu instances (TOC, bookmarks)
6 years ago
poire-z 6a997cf609 [UX] FileManager menu: split Settings tab into 2 tabs (#3836) 6 years ago
Frans de Jonge 38a0519062
bump base for FreeType 2.9 (#3831) 6 years ago
Frans de Jonge 989e319af9
[PocketBook] Add Inkpad 3 (PB740) definition (#3830)
Fixes #3687

Thanks to @Maradar for testing, see https://github.com/koreader/koreader/issues/3687#issuecomment-378652074
6 years ago
Frans de Jonge 62703ff501
bump base for zlib 1.2.11 (#3829)
https://github.com/koreader/koreader-base/pull/632
6 years ago
Frans de Jonge e18d495c6e
bump base for Gtk3 open dialog (#3828)
(Stupid, forgot this in #3827.)
6 years ago
Frans de Jonge b4002dc9ce
[chore] device/input: migrate custom event map to settings dir (#3822) 6 years ago
Frans de Jonge 086ced07f9
[feat, UX] SDL: add Gtk3 filechooser (#3827)
The specifics for other implementations are easy to change in the backend.
6 years ago
Frans de Jonge 7f4be45d4e
[chore] Handle SDL_MOUSEWHEEL and less hackish SDL events (#3826) 6 years ago
Frans de Jonge 844a2e78ab
bump base for smaller MuPDF build (#3824)
https://github.com/koreader/koreader-base/pull/629
6 years ago
Frans de Jonge 489bfb4c77
[fix, i18n] ui/widget/frontlightwidget: translators don't need to worry about number of spaces (#3823)
Transifex warns about some issues but this is not one of them.

The proper solution would be `padding_right`. But although it's supported on FrameContainer it's not passed on through TextBoxWidget.
6 years ago
David Engster ba46376299 [UX] plugins/kobolight: Handle automatic warmth
If warmth is handled automatically, do not try to change warmth but
display a message instead.
6 years ago
David Engster daa1f466ff [feat, UX] frontlighwidget: Support for automatic warmth
If the device supports it, add a checkbox for enabling automatic
warmth, and a widget for setting the hour at which warmth should be
maximal ("bedtime").

The hour can be changed through +/- buttons; holding them will change
with 30min steps. As soon as automatic warmth is enabled, the 'warmth'
cannot be changed manually anymore, so we make its widget grey, but
the current value is still displayed correctly. Changing the hour
changes warmth accordingly.
6 years ago
David Engster e80951413d [feat] kobo/powerd, kobo/nickel_conf: Saving of auto-warmth settings
Add support in nickel_conf to save/retrieve setting of
'autoColorEnabled', which is the automatic warmth feature in
Nickel. We do not support reading of 'BedTime', because it is encoded
as a QVariant. This setting is hence saved/loaded solely in/from
G_reader_settings.
6 years ago
David Engster 596e20e588 [feat] kobo/powerd: Support for automatic warmth
This is the first step to support "automatic warmth", meaning that
warmth will be set according to the current time. The user can set a
"bedtime" at which warmth should be maximal. Warmth will increase
towards approaching bedtime and decrease afterwards.

Add new members 'auto_warmth' and 'max_warmth_hour' which tell if this
feature is enabled and the "bedtime", resp. Add a method
'calculateAutoWarmth' which will set the current warmth according to
the current time. The progression is linear but not symmetrical: we
start 5h before "bedtime", but turn back warmth to '0' 2h after it, to
make sure that warmth is '0' in the morning.

For automatically setting warmth in the background we use the
backgroundrunner plugin, because not only is it more comfortable to
use, but we also cannot require 'uimanager' during device
initialization.
6 years ago
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