Commit Graph

209 Commits (a407036acd901c1fd2be5e165c8b9de03df49981)

Author SHA1 Message Date
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
chrox 69e6b6b9cb hold on directory in filemanager can set the it as HOME directory
and this "HOME" directory will override the command line option passed to
koreader.

This patch implements #1434.
9 years ago
chrox d08e22ec2e add simple sync service as a plugin
The 'KOSync' plugin will synchronize furthest reading progress
across different koreader devices after users registering their
devices.

The synchronizing service is open-sourced as the project
[koreader/koreader-sync-server](https://github.com/koreader/koreader-sync-server).
9 years ago
Huang Xin b4574a7359 fix crash on kindle 9 years ago
chrox efe8e65dd9 refactoring search path 9 years ago
Hans-Werner Hilse d91dccae80 fix night mode setting
implement bezel cleaning with proper background color
10 years ago
chrox dec9a99fba load Device module after DEBUG is turned on
otherwise some DEBUGs are not printed.
10 years ago
Hans-Werner Hilse 3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
10 years ago
chrox a197f31da7 check if last opened file exists before opening it
This should fix #916.
10 years ago
chrox 14e2bf3d69 refatoring: lazy loading of packages 10 years ago
chrox c4a1e4d10d update PATH variable on startup for Windows 10 years ago
chrox 69919435ac restore frontlight setting only for Kobo devices 10 years ago
chrox 2bec0017a0 refactor out global functions showHomePage and showReaderUI 10 years ago
chrox c74c258fc7 add filemanager icon in reader menu
now we can access the filemanager in all launcher configurations
10 years ago
chrox c8bc9ee37c close screen framebuffer when exiting reader 10 years ago
chrox b7c7287bab remove more global variables 10 years ago
chrox e1af17938c remove global variable Image 10 years ago
WS64 2d72bb7e3f Update reader.lua 10 years ago
WS64 5a2b9103e9 Update reader.lua 10 years ago
NiLuJe 6e10b877ad We don't need those at startup, delay until needed. 10 years ago
NiLuJe f1cc984cbf Close lipc handles on exit.
No idea if bad things happen if we don't, but at least this sounds more
correct. (re #696)
10 years ago
NiLuJe 834ff9a1fb Don't fake the swipe to unlock if not needed.
Re: #695
10 years ago
chrox 26f5a4731e add peer-to-peer file sharing plugin ZSync 10 years ago
Markismus aaa84808e8 add persistent option for defaults.lua 10 years ago
chrox b92860c22a add night mode option that inverts screen color 10 years ago
chrox e23e48ffa5 fix license version in reader usage 10 years ago