2
0
mirror of https://github.com/koreader/koreader synced 2024-11-04 12:00:25 +00:00
Commit Graph

6374 Commits

Author SHA1 Message Date
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.
2018-04-06 22:12:25 +02:00
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).
2018-04-06 22:12:25 +02:00
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).
2018-04-06 22:12:25 +02:00
David Engster
f8d43b5c09 [fix] kobo/nickel_conf: Remove redundant 'return nil' 2018-04-06 22:12:25 +02:00
David Engster
9b67323326 [UX] naturallightwidget: Use unicode minus for button 2018-04-06 22:12:25 +02:00
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
2018-04-06 21:38:16 +02:00
poire-z
2473ebce01
Wikipedia link: check if previously saved as EPUB (#3837)
Also makes MultiConfirmBox movable, like ConfirmBox is.
2018-04-06 21:13:25 +02:00
poire-z
cc7ef363e5 [UX] CoverBrowser: set default display modes on first launch (#3834) 2018-04-06 18:14:49 +02:00
poire-z
eb613ace3e [chore] CoverBrowser: avoid page info code duplication (#3835)
Also allows full refresh with small diagonal swipe
of Menu instances (TOC, bookmarks)
2018-04-06 11:53:11 +02:00
poire-z
6a997cf609 [UX] FileManager menu: split Settings tab into 2 tabs (#3836) 2018-04-06 11:32:54 +02:00
Frans de Jonge
38a0519062
bump base for FreeType 2.9 (#3831) 2018-04-05 09:33:57 +02:00
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
2018-04-04 18:26:44 +02:00
Frans de Jonge
62703ff501
bump base for zlib 1.2.11 (#3829)
https://github.com/koreader/koreader-base/pull/632
2018-04-04 17:07:04 +02:00
Frans de Jonge
e18d495c6e
bump base for Gtk3 open dialog (#3828)
(Stupid, forgot this in #3827.)
2018-04-03 23:16:20 +02:00
Frans de Jonge
b4002dc9ce
[chore] device/input: migrate custom event map to settings dir (#3822) 2018-04-03 20:28:37 +02:00
Frans de Jonge
086ced07f9
[feat, UX] SDL: add Gtk3 filechooser (#3827)
The specifics for other implementations are easy to change in the backend.
2018-04-03 20:03:56 +02:00
Frans de Jonge
7f4be45d4e
[chore] Handle SDL_MOUSEWHEEL and less hackish SDL events (#3826) 2018-04-03 14:56:28 +02:00
Frans de Jonge
844a2e78ab
bump base for smaller MuPDF build (#3824)
https://github.com/koreader/koreader-base/pull/629
2018-04-02 23:27:47 +02:00
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.
2018-04-02 13:00:13 +02:00
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.
2018-04-01 15:35:05 +02:00
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.
2018-04-01 15:35:05 +02:00
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.
2018-04-01 15:35:05 +02:00
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.
2018-04-01 15:35:05 +02:00
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.
2018-03-31 21:19:31 +02:00
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
2018-03-31 10:18:31 +02:00
onde2rock
f893b01f04 [fix, UX] CoverBrowser: reset cursor (#3817)
Also don't show the underline before the first key move.
2018-03-31 07:59:12 +02:00
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
2018-03-30 23:22:18 +02:00
onde2rock
ae9d71de5f [fix] libz not found on kindle4 (#3807) 2018-03-30 17:15:16 +02:00
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)
2018-03-30 13:00:12 +02:00
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
2018-03-30 12:46:36 +02:00
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
2018-03-29 16:59:13 +02:00
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.
2018-03-28 12:57:55 +02:00
Frode Austvik
f36d93a8f7 [Fix] Make ScrollTextWidget:moveCursor return the new charpos. (#3808) 2018-03-28 10:52:35 +02:00
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.
2018-03-26 21:10:46 +02:00
onde2rock
43c2c92194 [UX] FileManager: Tapplus access for non-touch devices (#3773) 2018-03-26 19:41:50 +02:00
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.
2018-03-26 17:35:31 +02:00
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
2018-03-26 13:08:45 +02:00
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
2018-03-25 23:42:08 +02:00
Frans de Jonge
3838aab169
[fix] calibrecompanion.plugin (#3799)
Fixes #3794. 

Upstream luasocket 96965b179c switched from just `socket.udp()` to `socket.udp4()` and `socket.udp6()`.
2018-03-25 21:37:30 +02:00
Frans de Jonge
680b53e347
[fix] NetworkManager:isConnected() exit code check (#3795)
Fixes #3794.
2018-03-23 09:35:30 +01:00
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
2018-03-22 21:01:38 +01:00
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
2018-03-22 19:13:54 +01:00
poire-z
2a3f9d6ae2 FileManagerMenu: show tab from gesture position (#3792)
As it was done for ReaderMenu in 6e303e7
2018-03-22 16:04:42 +01:00
Frans de Jonge
cb43c2b23c
bump base (revert previous commit) (#3790) 2018-03-22 09:51:17 +01:00
Frans de Jonge
d091ce9cf9
Bump base (#3789)
Includes [build] Add -fsanitize=undefined to debug flags #608
2018-03-21 23:20:09 +01:00
Frans de Jonge
cbcbd54dad
bump base to fix MuPDF Mac Build (#3788)
https://github.com/koreader/koreader-base/pull/616

Fixes #3783.
2018-03-21 20:41:53 +01:00
Frans de Jonge
65a63d244b
[UX] SDL2: set window title (#3784)
This initial implementation only sets the title for FileManager and ReaderUI.

Fixes #3713.
2018-03-21 20:10:35 +01:00
Frans de Jonge
8b9c83a5ed
Update README.md: more Mac info (#3787)
References #3783.
2018-03-21 20:00:26 +01:00
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.
2018-03-21 18:28:59 +01:00
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
2018-03-21 12:21:48 +01:00