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

9599 Commits

Author SHA1 Message Date
hius07
91ff6ce2d8
ReaderBookmark: fix comparing positions (#10109) 2023-02-13 00:14:49 +01:00
hius07
db9cb542e4
FileChooser: optimize sorting functions (#10091) 2023-02-13 00:14:19 +01:00
NiLuJe
318a22d913
util: Rewrite makePath (#10111)
The previous iteration, besides failing to handle leaf-only input,
was relying on splitFilePathName, which just doesn't do what's required
to incrementally build the directory tree the right way around ;).

This should more closely match mkdir -p, i.e., it will *fail* if any
part (or all of it) of the path exists but is *not* a directory.

Re #10074
2023-02-12 23:48:33 +01:00
Frans de Jonge
dbad14e20b
ExternalKeyboard: make metadata capitalization abide by styleguide (#10081) 2023-02-12 23:27:00 +01:00
Utsob Roy
c9007b1e29
Exporter: add seconds in markdown export (#10065) 2023-02-12 23:24:46 +01:00
clach04
5c81d72a2d
Readme: update list of supported formats (#10004) 2023-02-12 23:23:59 +01:00
melyux
8b99c50b2d
Duration format: add "Letters" format (1h30m10s) (#9924) 2023-02-12 23:22:11 +01:00
Melik
881d8ed406 Fix spelling of filemanagerutil.genStatusButtonsRow 2023-02-11 21:49:23 +01:00
Melik
bc92ad923e Move cache update logic into CoverMenu:updateCache 2023-02-11 21:49:23 +01:00
Melik
7d6da81233 Compact covermenu addn. to for loop, fix collections bug, further gimp genStatusButton to use upvalues 2023-02-11 21:49:23 +01:00
Melik
0e470aaed9 Remove leftover function, arg 2023-02-11 21:49:23 +01:00
Melik
d9b0785a96 Reset button gen to util, collections current file check
- filemanagerutil.resetDocumentSettings()'s doc_settings:close() -> doc_settings:flush()
- Remove current_status from filemanagerutil.getStatusButtonsRow() args, get it inside from file
- Move genStatusButton() inside filemanagerutil.getStatusButtonsRow()
- Move "Reset settings" button generation to filemanagerutil
- Rename "Reset settings" button to "Reset" and update popup box text
- Disable "Reset settings" for file if it's currently open in Collections (same as History)
2023-02-11 21:49:23 +01:00
Melik
fb7ec830c6 Create getStatusButtonsRow() for status buttons, hide row if history item deleted 2023-02-11 21:49:23 +01:00
Melik
31cfffc289 Pull genStatusButton() to filemanagerutil 2023-02-11 21:49:23 +01:00
Melik
502bb0ccbf Create genStatusButton() for buttons, use item.dim for deleted in history 2023-02-11 21:49:23 +01:00
Melik
9e7e68beb6 Shorten status button names 2023-02-11 21:49:23 +01:00
Melik
c0d0b36f98 Get rid of luacheck warning 2023-02-11 21:49:23 +01:00
Melik
1b2adfd201 Return to callback fudging, fix book info callback replacement 2023-02-11 21:49:23 +01:00
Melik
628cacf1e6 Disable status buttons for deleted files in history 2023-02-11 21:49:23 +01:00
Melik
77b110a987 Add 'Reset settings' button to collections 2023-02-11 21:49:23 +01:00
Melik
8642509f26 Move 'Put on hold' between reading & read 2023-02-11 21:49:23 +01:00
Melik
a9313dda1a Add buttons to collections 2023-02-11 21:49:23 +01:00
Melik
57849b3f7c Add buttons to history, use id for button-getting 2023-02-11 21:49:23 +01:00
Melik
086d4622e6 Add buttons to file manager, lay groundwork 2023-02-11 21:49:23 +01:00
NiLuJe
9fd5bbd7cb Bump android/luajit-launcher
https://github.com/koreader/android-luajit-launcher/pull/405
https://github.com/koreader/android-luajit-launcher/pull/404
2023-02-11 20:01:31 +01:00
NiLuJe
03c0fd7f9e Bump base
https://github.com/koreader/koreader-base/pull/1580
2023-02-11 20:01:31 +01:00
NiLuJe
96850c23a0
NetworkMgr: Refine isConnected check (#10098)
Much easier to deal with thanks to the cleanup work done in #10062 ;).

* `carrier` is set to 1 as soon as the device is *administratively* up (in practice, as soon as we run `ifconfig up`). This is perfectly fine for `isWifiOn`, but absolutely not for `isConnected`, because we are not, actually, connected to *anything*, no attempt at associating has even been made at that point. Besides being semantically wrong, in practice, this will horribly break the connectivity check, because it expects that `isConnected` means we can talk to at least the LAN.
* Delving into the Linux docs reveals that `operstate` looks like a better candidate, as it reflects *operational status*; for Wi-Fi, that means associated and successfully authenticated. That's... closer, but still not it, because we still don't have an IP, so we technically can't talk to anything other than the AP.
* So, I've brought out the big guns (`getifaddrs`), and replicated a bit of code that I already use in the USBNetwork hack on Kindle, to detect whether we actually have an IP assigned. (Other approaches, like `/proc/net/route`, may not be entirely fool-proof, and/or get complicated when IPv6 enters the fray (which it does, on Kobo, Mk. 8+ devices are IPv6-enabled)).

TL;DR: Bunch of C via ffi, and `isConnected` now returns true only when the device is operationally up *and* we have an IP assigned.

Pulls in https://github.com/koreader/koreader-base/pull/1579 & https://github.com/koreader/lj-wpaclient/pull/10
2023-02-10 23:47:08 +01:00
hius07
03454a89d8
Screensaver: correct access to doc settings (#10105) 2023-02-10 19:52:12 +01:00
NiLuJe
b1c30a7b1e
Input: Don't set unnecessary input translations when viewports are involved (#10104) 2023-02-10 18:05:46 +01:00
yparitcher
d60c75e00d network: Allow auto_wifi_off on kindle & remarkable
They expose a network sysfs entry so we can track usage

Works for me on kindle, but i stop the amazon framework
2023-02-09 18:29:40 -05:00
yparitcher
0e53631f48 NetworkManager: isWifiOn isConnected consistent usage.
cervantes kindle kobo remarkable: use sysfs carrier file to determine connection state

cleanup hasWifiManager checks

gateway check: use ip if available

Fixes: #10087
Closes: #10092
2023-02-08 00:06:04 -05:00
NiLuJe
67d0808494
Misc: Make --verbose do what it should be doing ;). (#10095)
Stupid c/p typo exists since its inception in #6976
2023-02-08 01:22:59 +01:00
proletarius101
9d2ac3a0fc
improve appstream metadata (#10094)
- add developer name (can be shown on flathub.org)
- set `Translate` link to the translation repository
2023-02-07 17:57:43 +01:00
Alexander Schlemmer
849687f2d0
[fix] kodev wbuilder crashes with "attempt to index global 'G_defaults' (a nil value)" (#10088)
Fixes #10084.
2023-02-07 09:08:28 +01:00
NiLuJe
45a4aac3d3
Notification: Fence the *display* update in an attempt to avoid upsetting some boards... (#10083)
Re: https://github.com/koreader/koreader/issues/9806#issuecomment-1416827447

Depends on https://github.com/koreader/koreader-base/pull/1576

Includes assorted cosmetics tweaks related to duplicate `setDirty` calls when instantiating widgets that already have an `onShow` handler doing it. (I left widgets doing it in `update` instead of `init` alone, on the assumption that callers *may* be relying on that behavior when updating widgets at runtime. This might actually never matter, and it certainly didn't for ScreenSaverWidget, which is why I removed it from there ;p).
2023-02-07 01:01:05 +01:00
zwim
4e944dc918 patch management
Use texteditor if available

Auto disable if patches folder doesnt exist

And show a restart message after file edit

Sort menu entries in execution order

Warning sign for failing patches
2023-02-06 19:43:01 +01:00
zwim
cf9d3a0d70 Add quickEditFile method to texteditor 2023-02-06 19:43:01 +01:00
zwim
50ab620da1
Screen Warmth: Fix a bug with syncing screen warmth on start (#10066) 2023-02-06 11:33:42 +01:00
hius07
3881899338
Dispatcher: fix dynamically built menu (#10080)
Applicable for Set font and Set highlight action actions.
Closes #10077.
2023-02-05 10:47:38 +01:00
zwim
c5997a6246
[Document] Consistent menu entries in auto-save menu (#9995) 2023-02-03 22:30:11 +01:00
proletarius101
50b2267b74
AppImage AppData: fix not shown as a desktop application (#10076)
To make it shown as a desktop application and listed on flathub.org, the app data must mark it as a desktop application: https://github.com/flathub/flathub/wiki/AppData-Guidelines#header
2023-02-03 14:34:58 +01:00
yparitcher
731b802a0e
kodev: fix grep: warning: stray \ before - (#10071)
New warning in 3.8.
2023-02-03 13:45:23 +01:00
Sargun Vohra
15fb73384f
EInk: Add a setting to toggle flashing on pages with images (#10049)
With minor code cleanups along the way ;).
2023-02-02 21:09:29 +01:00
Frans de Jonge
1faf0a1786 OTAManager: pick the right binaries on Android x86_64 2023-02-02 21:04:11 +01:00
Frans de Jonge
c713df1dc7 OTAManager: pick the right binaries on Android aarch64 (arm64) 2023-02-02 21:04:11 +01:00
NiLuJe
92ebed577b OTAManager: Pick the right binaries on Kindles running on the Bellatrix
platform

Re: https://github.com/koreader/koreader/pull/4539#issuecomment-1411707712
2023-02-02 21:04:11 +01:00
hius07
c403b3bd25
Profiles: create profile with current document settings (#10036) 2023-02-02 09:09:42 +02:00
NiLuJe
21210800c1
ReaderFooter/Header: Refine autorefresh repaint-or-not checks (#10045)
Use both a whitelist for targeted widget repaints, a blacklist for no repaint at all, and a fallback for a full in-order ReaderUI repaint when unsure.

Use a similar approach in ReaderHeader (i.e., prevent explicit refreshes while ReaderMenu is open).

Re #9979, re #9768
2023-02-02 00:29:23 +01:00
yparitcher
747c3eaf9d
Kindle: NetworkMgr: isWifiOn isConnected (#10059)
isWifiOn for kindle currently returns if the interface is connected, change this to doing what is says isWifiOn the file is only present if the wireless interface is up.

isConnected pings the gateway, rely on the kernel for a more reliable check.

Whan connecting to my android phone's wifi hotspot to remote debug from my phone, the network is connected yet the phone(gateway) does not respond to pings leading koreader to shut down the connection thinking it is unsuccessful
2023-01-31 20:38:22 +01:00
Frans de Jonge
b070a121d6
Update translations for v2023.01 (#10061) 2023-01-31 20:37:53 +01:00