Commit Graph

88 Commits (37a01100b7a4733ae26871c4d929114aff8ea143)

Author SHA1 Message Date
NiLuJe 37a01100b7
Various Wi-Fi QoL improvements (#6424)
* Revamped most actions that require an internet connection to a new/fixed backend that allows forwarding the initial action and running it automatically once connected. (i.e., it'll allow you to set "Action when Wi-Fi is off" to "turn_on", and whatch stuff connect and do what you wanted automatically without having to re-click anywhere instead of showing you a Wi-Fi prompt and then not doing anything without any other feedback).
* Speaking of, fixed the "turn_on" beforeWifi action to, well, actually work. It's no longer marked as experimental.
* Consistently use "Wi-Fi" everywhere.
* On Kobo/Cervantes/Sony, implemented a "Kill Wi-Fi connection when inactive" system that will automatically disconnect from Wi-Fi after sustained *network* inactivity (i.e., you can keep reading, it'll eventually turn off on its own). This should be smart and flexible enough not to murder Wi-Fi while you need it, while still not keeping it uselessly on and murdering your battery.
(i.e., enable that + turn Wi-Fi on when off and enjoy never having to bother about Wi-Fi ever again).
* Made sending `NetworkConnected` / `NetworkDisconnected` events consistent (they were only being sent... sometimes, which made relying on 'em somewhat problematic).
* restoreWifiAsync is now only run when really needed (i.e., we no longer stomp on an existing working connection just for the hell of it).
* We no longer attempt to kill a bogus non-existent Wi-Fi connection when going to suspend, we only do it when it's actually needed.
* Every method of enabling Wi-Fi will now properly tear down Wi-Fi on failure, instead of leaving it in an undefined state.
* Fixed an issue in the fancy crash screen on Kobo/reMarkable that could sometime lead to the log excerpt being missing.
* Worked-around a number of sneaky issues related to low-level Wi-Fi/DHCP/DNS handling on Kobo (see the lengthy comments [below](https://github.com/koreader/koreader/pull/6424#issuecomment-663881059) for details). Fix #6421 
Incidentally, this should also fix the inconsistencies experienced re: Wi-Fi behavior in Nickel when toggling between KOReader and Nickel (use NM/KFMon, and run a current FW for best results).
* For developers, this involves various cleanups around NetworkMgr and NetworkListener. Documentation is in-line, above the concerned functions.
4 years ago
yparitcher 70f89c4df1
ReaderGesture: cleanup (#6292)
convert all gesture actions to use events for better modularity
add network event handlers and device event handlers
4 years ago
NiLuJe 1f994f8ede
Floor dimension computations (mul/div). (#6264)
* floor most every dimension computations involving MUL or DIV
Should avoid passing nonsensical floating point coordinates/dimensions
to the UI code.

* Update base

* https://github.com/koreader/koreader-base/pull/1113
* https://github.com/koreader/koreader-base/pull/1114
* https://github.com/koreader/koreader-base/pull/1115

* Bump android-luajit-launcher

https://github.com/koreader/android-luajit-launcher/pull/230
https://github.com/koreader/android-luajit-launcher/pull/231
4 years ago
Martín Fdez f756a6aaa7 stardict path override 4 years ago
mergen3107 73f1b1aad6
[UX] More compact dictionary download window (#5960)
Dictionary download window: combine the first two titles to save space and fit 3x complete dictionary selections on one page (Kindle PW3)

Closes #5955
4 years ago
poire-z c2a5d3f3f3
FileManager: tell plugins to save settings on close (#5872)
So that Statistics settings modified while in FileManager
are saved.
Also allows resetting statistics when in FileManager
(where there is no current book id to exclude).
4 years ago
poire-z 0599c440cc [RTL UI] Bidi-wrap filenames, paths, urls, metadata
bidi.lua:
- Revert "Alias everything to Bidi.nowrap() when in LTR UI,
  as using LTR isolates seems uneeded when already LTR" (part
  of a628714f) which was a wrong assumption: we need proper
  wrappers for all things paths. Enhance some of these wrappers.
- Fix GetText RTL wrapping which was losing empty lines and
  trailing \n.

- Wrap all paths, directories, filenames in the code with
  these wrappers.
- Wrap all book metadata (title, authors...) with BD.auto(),
  as it helps fixing some edge cases (like open/close quotation
  marks which are not considered as bracket types by FriBiDi).
  (Needed some minor logic changes in CoverBrowser.)

- Tweak hyphenation menu text
- Update forgotten SortWidget for UI mirroring
- KoptConfig: update "justification" index for RTL re-ordering,
  following the recent addition of the page_gap_height option.
4 years ago
Robert 494b38e9c8 [fix] Dictionary font size: avoid crash in reader mode (#5650) 5 years ago
Robert b0738960df Dictionary: add menu item to set font size (#5647) 5 years ago
NiLuJe d8e0b1759b
Other minor frontend.util cleanups (#5629)
* Resync fixUtf8 w/ upstream
* Fix lastIndexOf desc
* Drop unichar usage, it's a crappier unicodeCodepointToUtf8 ;).
5 years ago
yparitcher 83b7d8de2b [UX] Default setting option always enabled (#5580)
as per https://github.com/koreader/koreader/pull/5522#issuecomment-548006595 do not grey out the current default
5 years ago
yparitcher aa165cefe9 [UX] Set global settings independent of local setting (#5522) 5 years ago
Frans de Jonge da988c15de
[CI] Switch to custom xgettext build to extract multiline strings (#5242)
Because let's face it, it just looks much better this way.

Docker image update in https://github.com/koreader/virdevenv/pull/43

Discussion in https://github.com/koreader/koreader/pull/5238#issuecomment-523675211 and https://github.com/koreader/koreader/pull/4524
5 years ago
Frans de Jonge e2ceace302
[fix, CI] Push to Transifex from master, fix multiline strings for xgettext (#5238)
Related to https://github.com/koreader/koreader/pull/5237
5 years ago
poire-z a82d7832b9 Dict lookups: have them always interruptible
They should be now interruptible when fuzzy search is disabled
and on Android.
5 years ago
Martín Fernández b385e443e6 [Android] Add support for 3rd party dictionary apps (#5108)
Co-Authored-By: poire-z <poire-z@users.noreply.github.com>
5 years ago
Frans de Jonge 57ce8dc574
[UX] Gesture manager: add action - show dictionary/Wikipedia (#4699)
References #4687.
5 years ago
poire-z 335a513826 [chore] cleanup multi-lines translatable strings
Revert 9971eb85 and make multi-lines strings more readable.
(Multiline translatable strings extraction has been fixed
in koreader-misc tralua_xgettext.py.)
5 years ago
Frans de Jonge b21a9efa53
[UX] Download dictionary: keep menu open (#4412)
As suggested by @poire-z in https://github.com/koreader/koreader/pull/4401#issuecomment-447629244
5 years ago
Frans de Jonge b261a647c2
[feat] Add dictionary download option (#3176)
You can now download pretty much all of the easily available freely licensed dictionaries I could find.
5 years ago
poire-z b3efd5a333 ReaderDictionary:dismissLookupInfo(): avoid forceRePaint()
Avoid forceRePaint() (and showing the full page without any
widget) between closing the "Looking up..." info message and
displaying the Dictionary result window, as it's not really
needed (I must have added it for symmetry with
ReaderDictionary:showLookupInfo() where it is needed.)
This avoids some occasional refresh competition glitches.

Also trim spaces at start or end of selection (can't hurt),
and replaced ugly string.gsub(text) with text:gsub().
6 years ago
poire-z 850be52177
Keep some menus open when Tap or Hold (#4189)
TouchMenu: added options to menu items with the following defaults:
    keep_menu_open = false
    hold_keep_menu_open = true
So, default for Tap callback is to close menu, and for Hold callback
to keep menu open.
In both cases, provide the TouchMenu instance as the 1st argument to
the callback functions (instead of a refresh_menu_func I added in #3941)
so the callback can do more things, like closing, refreshing,
changing menu items text and re-ordering...

ReaderZooming: show symbol for default (like it was done for
ReaderFont, ReaderHyphenation...)
TextEditor plugin: update the previously opened files list in real
time, so the menu can be kept open and used as the TextEditor main
interface.
SSH plugin: keep menu open and update the Start/Stop state in real time
ReadTimer plugin: tried to do what feels right (but I don't use it)

Also remove forgotten cp in the move/paste file code
6 years ago
poire-z 9971eb8533 Fix untranslatable strings (#4132)
Some problem somewhere with [[...]] strings starting with a
leading newline. Should probably be allowed, but for now
fix the few such cases to allow them being translated.
6 years ago
poire-z 24d4ab43c4
dict: convert htmlentities in non-html text results (#3921) 6 years ago
onde2rock dad7f209fa [CI] Add a check to detect tab in lua files (#3919) 6 years ago
poire-z e7377cd20e Dict & wiki history: use filename when no book title (#3635) 6 years ago
TnS-hun b40bc53fc7 HTML dictionary link support (#3603) 6 years ago
poire-z e389510257 Fix speedup of dictionaries init (#3592)
Revert 338d14edb7 (#3489)
Simply just don't walk into "res/" subdirectories, which is where
resource files should be per startdict specs.
6 years ago
poire-z 8c897a086f HTML dict: enable color rendering and per-dict user fix html func (#3585)
Also fix possibility of crash in HtmlBoxWidget:free()
6 years ago
poire-z 91092c442d Fix negative nb of enabled dictionaries (#3584)
Happened when some dictionaries files have been removed, while
these were still referenced in the 'dicts_disabled' setting.
6 years ago
TnS-hun 06a8a33d39 HTML dictionary support (#3573)
* Adds a generic HTML widget modeled after the text widget, and HTML dictionary support. HTML dictionaries can have their own CSS (for X.ifo it must be X.css). The base CSS just resets the margin and sets the font.

Note that the widget doesn't handle links, that wasn't needed for the dictionary.

Closes <https://github.com/koreader/koreader/issues/1776>.

* Show tag stripped HTML if the dictionary entry isn't valid HTML

* Simulate the normal <br/> behavior

* Bump base
6 years ago
poire-z 70f2aa09ea Adds Wikipedia history (#3549)
Just like Dictionary lookup history.
Also changed Disable to Enable in some menu items to be more positive.
6 years ago
TnS-hun 29b376fdd9 [UX] Option to show dictionary in large window (#3499) 7 years ago
poire-z 338d14edb7 Speedup dictionaries init (#3489)
When looking for .ifo to populate Dictionary settings menu,
avoid walking sub-directories once we found a .ifo, as these
sub-directories may contain a lot of images and other subdirs.
7 years ago
Frans de Jonge 2ddcc7155a [fix] Dictionary no fuzzy search flag (#3433)
Upstream uses `-e` rather than the `-f` that was first introduced in our fork.

References https://github.com/koreader/koreader/issues/3429#issuecomment-339749396
7 years ago
Frans de Jonge d23d01643e Add LuaData and Dictionary Lookup History (#3161)
* Add dictionary history

Fixes #2033, fixes #2998.

* Add LuaData

* table handling in base settings

* Add LuaData spec
7 years ago
poire-z 1a97b4289c [Fix] Show 'Follow Link' even when no dict installed 7 years ago
poire-z 47139266b2 Dict lookup: allow cancelling with tap
base bumped for ffi/util.getNonBlockingReadSize(luafile)
7 years ago
Frans de Jonge f439ca0e8d [UX] Add "Follow Link" in hold/highlight dialog (#3190)
* This way you can disable "tap to follow links" on single tap yet still follow links.
* Change menu as well as per @poire-z's suggestion.
7 years ago
Frans de Jonge ba7fad2cdf [fix] Dict settings NaN in installed dicts submenu (#3173) 7 years ago
poire-z 6efcfce479 Fix "Info on dictionaries ordering" string for translation (#3156) 7 years ago
poire-z d5924f1d3d Use multiple sdcv -u params instead of renaming .ifo 7 years ago
poire-z 6d8d202f3b Dict settings menu: list dicts, and allow disabling them 7 years ago
poire-z 5d2bebcc0b Added Dictionary settings and Wikipedia settings menus (#3121)
Also removed OPDS `download_dir` from the candidates to Wikipedia
"Save as EPUB" dir.
7 years ago
Huang Xin 8938786472 [fix] stop propagation of tap events when triggering reader menu (#2934)
* [fix] stop propagation of tap events
when triggering reader menu
And also get rid of unnecessary screen refreshes on Kindle Voyage.
The "progress" window for dict lookup is also eliminated as most of the time dict lookup is an instant process, and the "progress" window is preserved for wikipedia lookup as it may take longer time to show the result window.

* [up] add an option to disable dictionary fuzzy search

* [fix] tidy up require

* [fix] fix read settings
7 years ago
poire-z 9e346f5559 Allow wikipedia lookup from filemanager
Also allow taking screenshot when on dictionary window.
7 years ago
Qingping Hou bde2139b27 wifi(fix): quote ssid and password for wpa_passphrase 7 years ago
Qingping Hou 23c2955500 chore: style cleanup for infomessage 7 years ago
Frans de Jonge ed7937f65d ReaderDictionary: add info message about installing dictionaries
Fixes #2816.
7 years ago
poire-z 5bc19fa084 clean ReaderDictionary:cleanSelection
crengine now does a much better job at finding word boundaries, so
less cleanup is needed
7 years ago