Commit Graph

38 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 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
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
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
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
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 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
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
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
NiLuJe 80c1e5290c
File search & BookInfo: Don't traverse hidden folders if we're not showing them (#5816)
* File search: Don't traverse hidden folders if we're not showing them

Re https://www.mobileread.com/forums/showpost.php?p=3949194&postcount=21

* Ignore macOS resource forks, too.

* Apply the same logic to the BookInfo directory walker

* And never ever show resource forks in the FM, either.
4 years ago
Frans de Jonge 6c93415f67
[fix] Filesearcher crash on empty file attributes (#5351)
Fixes <https://github.com/koreader/koreader/issues/5343>.
5 years ago
Frans de Jonge a2dcfe9aec
[doc] Tag @todo, @fixme and @warning (#5244)
This commit standardizes the various todos around the code a bit in a manner recognized by LDoc.

Besides drawing more attention by being displayed in the developer docs, they're also extractable with LDoc on the command line:

```sh
ldoc --tags todo,fixme *.lua
```

However, whether that particular usage offers any advantage over other search tools is questionable at best.

* and some random beautification
5 years ago
Frans de Jonge 2ba480b41d
[UX] Gesture manager: add action - file search (#4720)
Also makes it callable from the reader.

Fixes #4717.
5 years ago
Robert 287ab2a20e File search: search in current folder, or home folder (#4093) 6 years ago
onde2rock e502bf04d3 [feat, UX] Support the virtualKeyboard on non touch-device (#3796)
* [VirtualKeyboard] Add support for keynaviguation

Also rename the variable "layout" to "keyboard_layout" because conflict
with the layout from the focusmanager

* Make the goto dialog compatible with key naviguation

My solution is to change the order of the widget. The last one will the
virtualkeybard so it catch all the keybinding, and below it, make the
dialog "is_always_active = true" so it can receive touch event.

* Correctly show the virtual keyboard on dpad devices

* change the order to call the virtualKeyboard so it end up on top

* Handle the multi input dialog

* Support reopening the virtualKeyboard by the Press key

* add check focusmanager

* Fix https://github.com/koreader/koreader/issues/3797

* MultiInputDialog : Now work on non touch-device

* Set the virtualkeyboard to be a modal widget

* Fix the layout in multiinputwidget

* Fix for the various combination of
hasKeys,hasDpad,isTouchDevice

* [Focusmanager] Better handling of malformed layout
6 years ago
Frans de Jonge ced9e45d92
[fix] DocumentRegistry: don't create empty sdr and add hasProvider() (#3675)
As suggested by @poire-z https://github.com/koreader/koreader/pull/3653#issuecomment-364663156
6 years ago
Robert d163f8281d Menu: configure number of items per page, wrap entries (#3589)
Configure number of items per page (from 6 to 24) - default is 14
Allow filenames to wrap so that we can see the full name
Used by File browser, History, Search Result, Bookmarks, Table of contents (only single line), File chooser, OPDS catalog
6 years ago
Qingping Hou 23c2955500 chore: style cleanup for infomessage 7 years ago
Frans de Jonge e1aa57f27e Font: unify font styling 7 years ago
Frans de Jonge 791d540a5a FileSearcher: filter .sdr directories
Fixes #2665
7 years ago
Frans de Jonge 0566df5f28 FileSearcher: also show directory results
Fixes #2177
7 years ago
Hzj_jie f91ad679d9 swithItemTable -> switchItemTable 7 years ago
Qingping Hou 60587e08c6 defaults(refactor): remove global hack in filemanagersetdefaults
also added screensaver folder setting dialog for kobo
8 years ago
Qingping Hou d1ca8bc494 fix(filemanager): delete document with settings 8 years ago
Qingping Hou 186673587e chore: fix some of the luacheck errors 9 years ago
Frans de Jonge 141095b0c8 Alterations to the menu
References #1219 and #1258.
10 years ago
Frans de Jonge 92f0092ad4 Filesearcher: added notification for no results 10 years ago
Frans de Jonge 19029d1aab Comment out wasteful DEBUG statements 10 years ago
Frans de Jonge 06239fb9ec Initial file search implementation
See #1165.
10 years ago