Commit Graph

234 Commits (7210fb478d8d0c6aa5bb8e0ae3e0fc67dd730874)

Author SHA1 Message Date
Frans de Jonge 644e0d6440
[fix] Behave properly on start with shortcuts (#4772)
Regression caused by #4764. Fixes #4768.
5 years ago
Qingping Hou 4b7d5c82b7 fix: update gesturedector constant for custom screen dpi 5 years ago
Qingping Hou 1605409c60 rename runtimectl to document/canvascontext 5 years ago
Qingping Hou 4d8da96177 fix test 5 years ago
Qingping Hou 855c8c2569 add dummy device & rename runtimectl:setDevice to runtimectl:init 5 years ago
Qingping Hou d749591984 decouple device from pdfdocument, font & bgr checking 5 years ago
Qingping Hou 02eca23649 decouple device from document modules 5 years ago
NiLuJe bb3f49a566 [feat, Kobo] On Kobo, drop fb to 8bpp on startup (#4637)
* The Great 8bpp Experiment

Swap to 8bpp on Kobo, because we're 'effing grayscale, for pete's sake!

* Always swap to 8bpp, no matter the launch method.

Because it turned out that, even when restarting Nickel, we had to
restore the expected bitdepth ourselves, because pickel/Nickel didn't do
the job completely.

(I'm going to guess the grayscale flag wasn't getting flipped properly).

* Dither every non-transparent icon to the eInk palette

* Make sure hasBGRFrameBuffer is only enabled when the Kobo fb actually is
@ 32bpp...

* Re-process badly grayscaled icons

* And re-grayscale that one w/ gamma correction so the squares show up
better.

* Allow the fbdepth switch to be disabled (in Developer settings).

Also, allow setting debug mode that way.

Also, forcibly disable verbose logging when disabling debug.

* Update setting name to piggyback on the existing check in reader.lua

* Update icons postprocessing info
5 years ago
Robert 192bc175fc New startup option: Folder shortcuts (#4220) 6 years ago
Frans de Jonge d0130ae9da
reader.lua: add version to ascii art (#3724)
As suggested by @poire-z in https://github.com/koreader/koreader/pull/3723#issuecomment-370557018
6 years ago
Frans de Jonge ea033431aa CircleCI fixes
* shellcheck 0.4.5 fix `LC_ALL: en_US.UTF8` (can be removed for shellcheck 0.4.6)

* hush updated luacheck on `reader.lua`; we're not assigning any variables but `= nil` is redundant
7 years ago
poire-z 308c243238 Inform once about color rendering on supported devices (#3289) 7 years ago
poire-z d4fd0b9428 frontlight on kobo: a few fixes (#3163)
* frontlight on kobo: a few fixes

Rewritten to not update NickelConf on every change, and never
if KOBO_SYNC_BRIGHTNESS_WITH_NICKEL = false.
Reintroduce global settings frontlight_intensity and
is_frontlight_on to keep level and state across koreader
sessions.
Fix a few of the remaining issues on kobo light.
Ensure settings are saved when rebooting/powering off from
File browser.

* Ensure untoggle works when starting with light off
7 years ago
Frans de Jonge 23cd585fae Support history as default view for filemanager (#3058)
Fixes #2774

* make history view borderless
* add new menu for what to start with

Should combine nicely with #2940
7 years ago
Hzj_jie a4d5165f7a Several fixes in frontlight logic (#2991)
* Use PluginShare to exchange data between plugins

* Remove legacy code in reader.lua and kobo/device.lua, and move KOBO_LIGHT_ON_START to kobo/powerd.lua

* A better sync config logic

* Consider kobo without hardware frontlight toggle

* update frontlight widget once toggle is tapped.
7 years ago
Hzj_jie 808766b7f3 Remove the deprecated restore_settings flag 7 years ago
Hzj_jie 30378eb2a8 Add restart koreader function and ensure FlushSettings event can be delivered to all widgets (#2772) 7 years ago
Frans de Jonge 89099e2c94 Swipe for menu and quickstart guide (#2761)
* Swipe for menu and quickstart guide

Because swiping for the menu is a big change from what we're used to, this commit includes a new quickstart guide.

Fixes #2608.

* add some dev docs
* add FileConverter spec
* add QuickStart spec
* add Version module
* add Version spec
7 years ago
robert00s 1749ab7227 Fix 2716 7 years ago
Robert b4462da1b6 Dialog when reopening book at start (#2259) (#2603) 7 years ago
Frans de Jonge c855494ba0 Minor: don't turn off wifi on exit
This fixes #2379 and #2511.
7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
Qingping Hou dae4a5a413 refactor: move bootstrap code into setupkoenv.lua
add ffi.load patch
add kodev prompt command
8 years ago
Qingping Hou 93873bfd69 plugins(chore): fix static check errors 8 years ago
Qingping Hou 4540d51a6e settings: add entry to toggle debug mode 8 years ago
Qingping Hou a407036acd minor: always flush banner to stdout 8 years ago
Qingping Hou db5a872ec6 minor: turn off wifi on exit 8 years ago
Qingping Hou 5309a0a47f misc: rotate crash.log for kobo/kindle/pocketbook 8 years ago
chrox 9ab005a1d3 fix unit test of readerlink and readerpaging
and have more confidence with the unit testing framework.

Now `make testfront` won't retry on failure and testing files are
ordered in each run so that it's possible to reproduce testing failure.

And this patch also fix flush settings not working before suspend issue:
at some point the `FlushSettings` event is sent to `UIManager` instead
of `ReaderUI`, but `UIManager` only delegated events to active widgets
and `ReaderUI` is actually not an active widgets thus will miss the event.

This patch also add a verbose debug mode with "-v" as a switch to turn
on this mode. With verbose mode on, event handling will be logged.
8 years ago
chrox 7ea12c0198 fix broken unit tests on Travis CI
1. It turns out that `device_id` is not defined in unit test environment
which makes the `assert(self.kosync_device_id)` fail and somehow makes `luajit` segmentation fault.
2. In the device spec, stubbing `io.open` will make subsquent `require`
all return boolean value and segmentation fault `luajit`.

This patch is a minimum viable change that makes CI work on both my
local box and Travis.
8 years ago
Zijie He 820a39c8f7 Update KOSyncClient 8 years ago
Qingping Hou 85398dc2d5 luasettings: new module to handle genric settings
also use luasettings for reader settings
8 years ago
Zijie He 882a815f6c Use default font if settings.reader.lua does not provide one. Provide a Toggle button if readerfooter gesture actions are disabled. 8 years ago
Frans de Jonge 5638819f25 Removed a bunch of "successfully", replaced an ellipsis, and some deviant spellings of KOReader. 8 years ago
NiLuJe dfe321d87a Fix a hasFrontLight call in reader.lua...
(it's a function, not a bool ;'( ).

Fix #1961
8 years ago
Qingping Hou eb37d9b8b6 kobo: fix screen probe for touch 8 years ago
hzj-jie d1e8b8098d Koreader won't start on Kobo without frontlight, powerd.fl may be nil. 8 years ago
Qingping Hou 9a3e262bb3 fix(reader.lua): typo 8 years ago
Qingping Hou 6446f9d2b0 minor(reader.lua): remove unnecessary import 8 years ago
Qingping Hou 3334bf8fe7 fix: delay showReader after UIManager:run is called 8 years ago
NiLuJe a82fe3ac44 is_fl_on -> is_frontlight_on outside of powerd
Matches the reader setting we're reading/writing at that point,
and avoids confusion related to scoping because it doesn't necessarily
match powerd.is_fl_on at that point.

Well, at least I had to wrap my mind around it ^^
8 years ago
Qingping Hou 399d676cf0 kobo: rename frontlight_state config to is_frontlight_on 8 years ago
Qingping Hou 08b08d69f7 kobo: always set light intensity to 0 if state is nil or false 8 years ago
Qingping Hou 9afae91b13 chore: rename frontlight related variables to keep style consistent
flIntensity -> fl_intensity
flState -> is_fl_on
fallback_FrontLightLevel -> fallback_fl_level
8 years ago
zijiehe e84093c414 Add a flState in Kobo, and KoboPowerD:toggleFrontlight uses flState to control the light instead of intensity. 8 years ago
Dimitrios Semitsoglou-Tsiapos eb47c5a39f Synchronise frontlight level with nickel config
* Drops support for mocking the frontlight setting internally which may
  cause incorrect in-memory values.

* Adds new supported value for `KOBO_LIGHT_ON_START` (-2), which sets
  'Kobo eReader.conf' as the source to update `settings.reader.lua`'s
  brightness setting on startup, thus using the value from it
  indirectly.

* Adds the `KOBO_SYNC_BRIGHTNESS_WITH_NICKEL` configuration variable
  which updates 'Kobo eReader.conf' every time the brightness setting is
  changed within koreader.

* Fixes missing call to save brightness when modifying via two-finger
  swipe.

Closes #1523.
8 years ago
chrox 5cbbac6b43 fix typo 9 years ago
chrox 9654e9ce6c fix #1608 with touch coordinates detection
Some kobo touch devices have X Y coordinates in touch events swapped.
This patch provides a GUI to probe if the device needs to swap the XY.
The Kobo Touch users will be directed to tap on the upper right corner
of the screen and the probe will check if the X value is smaller than
the Y value in the tap event.
9 years ago
chrox 34ea9ac574 add datastorage module to handle data directory on various platform
On kindle, kobo and pocketbook the data directory is the current
running directory but on Android the app is installed in system
defined location and users may have no access to that location.
The same circumstances should be true for the upcoming Koreader for
Ubuntu touch, so the data directory (in which tessdata, dictionaries,
global settings, persistant defaults and probably history data are
stored) could be stored in another place.
9 years ago
chrox 82393f0ed3 fix loading frontend/JSON.lua for json.lua on Kindle
The VFAT file system of `/mnt/us` is case insensitive so that
require("json") from Spore which intends to load luajson module in
rock directory actually will load `frontend/JSON.lua`, the two JSON
parser libraries have slightly different APIs.

This patch remove the pure Lua JSON library in favor of `luajson` which
uses LPeg pattern marching backend for better performance.
9 years ago