Commit Graph

471 Commits (859327dea58cfa2b3c634b5ae4ecc1008b8c6f23)

Author SHA1 Message Date
hius07 859327dea5
Input dialogs: keep size in rotation (#8223) 3 years ago
hius07 1a127633c2
InputDialog: add :addWidget(), use it for checkboxes (#8168)
Also: Text editor now closes its keyboard when calling Find
and Go to line (which open their own keyboards) to avoid
conflicts between multiple keyboards.
3 years ago
hius07 68782c3f89
Checkbutton: optimize callback (#8134) 3 years ago
hius07 3c3361addf
File browser, Path chooser: fix margin of the long folder name in the header (#8103)
* Filemanager: margin of the folder name in the header

* Menu: margin of the folder name in the header
3 years ago
hius07 b4ec68d8c0
[UX] File search: add hold in search results (#8100)
Currently we see filenames only.

Added hold action to show the full path. Go to on a file will open the folder with a focused file.
3 years ago
hius07 3c597d1d84
FileSearcher: allow call with a search string (#8073) 3 years ago
hius07 c8a7f52672
Checkbutton: ensure max width, multiline if needed (#8066) 3 years ago
hius07 2a6931e72f
History: add confirmation before cleaning (#8016) 3 years ago
hius07 2ab31a9a36
File browser: Settings submenu reordering (#8000) 3 years ago
NiLuJe ae35e898fb
Kobo Elipsa support (#7986)
Includes a few minor cleanups along the way ;).
3 years ago
poire-z b31b7728db
Quick start guide: revamp text and look (#7985)
By @offset-torque, extracts from his upcoming user manual.
See https://github.com/koreader/koreader/discussions/7898
3 years ago
zwim 48d1b23469
FileSearcher honor filemanagers sorting order (#7978) 3 years ago
zwim ab6867c8fa
FileManager: allow case sensitive file search (#7956)
Bump base for cre.cpp cleanup and utf8proc FFI.
Add a checkbutton for case sensitive search in FileBrowser,
and use Utf8Proc.lowercase() for case insensitive search.
Also use it in ReaderUserHyph as a replacement for
crengine getLowercasedWord().
3 years ago
hius07 eb41ad3bda
FileManager: add overwrite check for Rename (#7833)
Checks for existing destination file/folder for Rename operation
and asks to overwrite.
3 years ago
hius07 2fe8c3c41b
"Book description": more consistent wording (#7789) 3 years ago
NiLuJe d56a944b79 Tests: Handle FM/ReaderUI instances slightly more sanely
* Tear down FM instances properly
* Don't manhandle ReaderUI too much, and document when the tests do
  actively broken shit, like bypassing safeties to open two // ReaderUI
  instances.
3 years ago
NiLuJe 90c38e2d0d ReadHistory: nil guard a Document instance access
We're now more careful about this, so, I suppose weird timings may mean
we might be trying to access a nil here.

Fix #7706

Guard a few other similar constructs
3 years ago
NiLuJe 94f708b53b BookInfoManager: Actually close the document after extraction
DocumentRegistry just decreases a ref, it doesn't close anything.

Plug the same Document leak in a few other places, and document this.
3 years ago
NiLuJe 4b265bcd7a Allow ingoring the B288 feature bans, for debugging purposes. 3 years ago
NiLuJe bb65a69193
Geom: nil guard a few rect methods (#7664)
We've managed to trip a few of those on dimen fields post-init but
pre-paintTo in a few weird coner-cases, a point at which dimen is often
nil.

ConfigDialog: Deal with that very thing in update()

Fix #7656
3 years ago
NiLuJe de6f2e84a3
FileManager/ReaderUI: Clarify the current instance accessor (#7658)
* FileManager/ReaderUI: Clarify the current instance accessor

Make it clearer that we actually store it in a *module/class* member, not an *instance* member.

Also, warn if there's a close/open mismatch.
3 years ago
hius07 752ec49c6f
FM: Make "Refresh content" an actual Event/Gesture (#7592)
* And enable it by default in the FM as the "hold on top-right corner" Gesture, instead of the onHold handler of the "+" button.
3 years ago
NiLuJe e7acec1526 ReaderUI: Saner FM/RD lifecycle
* Ensure that going from one to the other tears down the former and
    its plugins before instantiating the latter and its plugins.

UIManager: Unify Event sending & broadcasting
  * Make the two behave the same way (walk the widget stack from top to
    bottom), and properly handle the window stack shrinking shrinking
    *and* growing.
    Previously, broadcasting happened bottom-to-top and didn't really
    handle the list shrinking/growing, while sending only handled the list
    shrinking by a single element, and hopefully that element being the one
    the event was just sent to.

These two items combined allowed us to optimize suboptimal
refresh behavior with Menu and other Menu classes when
opening/closing a document.
e.g., the "opening document" Notification is now properly regional,
and the "open last doc" option no longer flashes like a crazy person
anymore.

Plugins: Allow optimizing Menu refresh with custom menus, too.

Requires moving Menu's close_callback *after* onMenuSelect, which, eh,
probably makes sense, and is probably harmless in the grand scheme of
things.
3 years ago
NiLuJe 9f835156d1
PluginLoader: Allow querying whether a specific plugin is loaded (#7607)
* PluginLoader: Allow querying whether a specific plugin is loaded (instantiated, actually).

Re #7598

* PluginLoader: Add a method to access a specific Plugin's instance
(Besides `self.ui[plugin_name]`, that is).

Requires some nastiness to avoid pinning stale references in memory :s.

* PluginLoader:  Tweak genPluginManagerSubItem to keep from rebuilding `self.all_plugins`, it's using `loadPlugins`, which is cached, so it made no sense to re-compute this one.
3 years ago
hius07 3cb9508185
Filemanager: enhance file operations dialogs (#7582) 3 years ago
yparitcher dde3c80e73
do not exit when opening unsupported file by last for FM (#7580)
fixes: #7577

see prior art in #3935 #3933
3 years ago
NiLuJe 14f9f9d3fc
FileManager: Tweak #7564 (#7571)
Tweak the goHome handler directly, instead of only the Home button.
Also, limit it to when it's actually needed, as changeToPath already
does it.
3 years ago
gbyl 915c5c7755
FileManager: Also refresh content when tapping the "Home" button (#7564)
Co-authored-by: gbyl <gbyl@users.noreply.github.com>
3 years ago
hius07 7b169dfa5e
FileManager: Hold the "+" button to refresh content (#7559) 3 years ago
NiLuJe d31dc1e450 FileManager modules: Slightly less hackish onSetRotationMode handlers...
And, also, rotate the parent widget (i.e., FM/RV) to avoid leaving the
user with a broken layout when they exit in a different orientation ;).
3 years ago
NiLuJe e27925f4bb FileManagerShortcuts: Handle rotation events 3 years ago
NiLuJe 99372e8c63 FileManagerCollection: Handle rotation events 3 years ago
NiLuJe a185290549 FileManagerHistory: Handle rotation events
Fix #7518
3 years ago
NiLuJe a62561e81e Fontlist: Move cache file in a subdirectory, so as not to mess with
Cache's state tracking

Re #7510

Legacy cache has to be deleted in Cache,
*before* the first getDiskCache call.

Reword the "Clear caches" Dev menu entry & callback:
We now have an actual "Restart" action (on most, if not all, platforms).
And we clear the whole cache folder, which may host other things (e.g.,
fontlist)
3 years ago
hius07 aef1e271b5
[UX] Search dialogs: don't close when searching with nothing entered (#7501)
File search, Fulltext search, Search dictionary, Search Wikipedia, DictQuickLookup: do nothing when nothing entered and search is pressed.
3 years ago
Frans de Jonge 627065c354
Add a period (#7493) 3 years ago
hius07 052e19ead5
Standardize search/find to search (#7398)
* Change 'Find a file' to 'File search' for consistency

There is 'File search' in the Gesture manager already.
There is 'Fulltext search' in the readermenu.
Some help text added.
3 years ago
hius07 91262f9647
File manager: some broken actions for parent folder (#7475)
For parent folder (..):
disabled `Copy`, `Cut`, `Delete`, `Rename`.
enabled `Paste`, `Set as HOME folder`.
3 years ago
NiLuJe 861214ce2a
Kobo: Allow toggling the WAIT_FOR_UPDATE_COMPLETE hack (#7431)
* Allow toggling the MXCFB_WAIT_FOR_UPDATE_COMPLETE bypass

* Drive-by: enable the abort_on_crash menu on Pb & rM, since they support
it
3 years ago
NiLuJe bf6c0cdd6c
LuaSettings: Add a method to initialize a setting properly (#7371)
* LuaSettings/DocSettings: Updated readSetting API to allow proper initialization to default.
Use it to initialize tables, e.g., fixing corner-cases in readerFooter that could prevent settings from being saved.
(Fixes an issue reported on Gitter).
* LuaSettings/DocSettings: Add simpler API than the the flip* ones to toggle boolean settings.
* Update LuaSettings/DocSettigns usage throughout the codebase to use the dedicated boolean methods wher appropriate, and clean up some of the more mind-bending uses.
* FileChooser: Implement an extended default exclusion list (fix #2360)
* ScreenSaver: Refactor to avoid the pile of kludges this was threatening to become. Code should be easier to follow and use, and fallbacks now behave as expected (fix #4418).
3 years ago
yparitcher 78c34e60fa
FileSearcher: Do not crash on space, show unsupported files if enabled. (#7362) 3 years ago
NiLuJe 32b070f3ac
Dispatcher: nil guard against access to a document instance (#7389)
Also:
* Properly update *all* the touch zones when rotating the FM
* Unbreak (Reader) rotation labels in Dispatcher
Regression since #7306
3 years ago
Frans de Jonge 8bdf2c5e75
Add explanation for shorten home folder (#7365)
Cf. <https://www.mobileread.com/forums/showthread.php?p=4098071#post4098071>.
3 years ago
Frans de Jonge 4f7f6169a6 Change a few more directory strings to folder
Fixes <https://github.com/koreader/koreader/issues/7350>.
3 years ago
NiLuJe 525b1957b9
[RFC] Pagination UI shenanigans (#7335)
* Menu/KeyValuePage/ReaderGoTo: Unify the dialogs. (Generally, "Enter page number" as title, and "Go to page" as OK button).
* Allow *tapping* on pagination buttons, too. Added spacers around the text to accommodate for that.
* Disable input handlers when <= 1 pages, while still printing the label in black.
* Always display both the label and the chevrons, even on single page content. (Menu being an exception, because it can handle showing no content at all, in which case we hide the chevrons).
* KVP: Tweak the pagination buttons layout in order to have consistent centering, regardless of whether the return arrow is enabled or not. (Also, match Menu's layout, more or less).
* Menu: Minor layout tweaks to follow the KVP tweaks above. Fixes, among possibly other things, buttons in (non-FM) "List" menus overlapping the final entry (e.g., OPDS), and popout menus with a border being misaligned (e.g., Calibre, Find a file).
* CalendarView: Minor layout tweaks to follow the KVP tweaks. Ensures the pagination buttons are laid out in the same way as everywhere else (they used to be a wee bit higher).
3 years ago
Frans de Jonge 1bd4636a03
Standardize directory/folder to folder (#7328)
Closes <https://github.com/koreader/koreader/issues/7157>.
3 years ago
poire-z 8a0d798e9e KeyValuePage: configurable items per page
Tweak building to start from items per page instead of
a fixed item height.
Guess the best font size that fit.
Update separator specification from using a "----" to
the now generic separator=true (this allows not wasting
a slot for each separator in the page and not have
only 12 items and 2 small lines in a 14 items page).
3 years ago
Frans de Jonge 35ff6776a5
[fix] Remove OPDS menu entry from FilemanagerMenu (#7291)
Fixes #7290.
3 years ago
poire-z 6059958ab6
File browser settings: reorganize into Settings submenu (#7259)
Move classic file browser settings from CoverBrowser plugin
into FileManagerMenu, so they are available when this
plugin is disabled (as they also apply to everything
based on Menu).
3 years ago
poire-z 3b89e32069 [UX] Add ToC/Bookmarks settings
- Menu widget: allow specifying the number of items per
  page and the item font size, so we can use other values
  than the default File browser ones
- Menu: fix setDirty when a border is used
- ToC: add item per page and font size settings, make
  Alternative ToC more visible (was previously
  available on long-press on Table of contents)
- Bookmarks: add item per page, font size, size reduction
- Progress bars (Skim widget and footer): allow selecting
  ToC depths from which ticks are made.
3 years ago