-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
File search, FileChooser and others #10994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
frontend/dispatcher.lua
Outdated
|
||
-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And in the context of the comment I just left this confuses me greatly. The newline provides the clarifying separation, what need is there for a visual distraction. :-P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dashes because
-sections are divided with empty lines
-look like separators
koreader/frontend/ui/elements/filemanager_menu_order.lua
Lines 18 to 20 in 27104ea
"sort_mixed", | |
"----------------------------", | |
"start_with", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, lgtm, though the impact is a little hard to gauge in places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 9 of 9 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @Frenzie and @hius07)
frontend/dispatcher.lua
line 57 at r1 (raw file):
Previously, hius07 wrote…
Dashes because
-sections are divided with empty lines
-look like separators
koreader/frontend/ui/elements/filemanager_menu_order.lua
Lines 18 to 20 in 27104ea
"sort_mixed", "----------------------------", "start_with",
I sort of like the idea, but I might go with four dashes to make it clearer that it's not just a leftover empty comment oir something. (Also, ----
means a HR in MarkDown, right, so it's not entirely random?).
frontend/dispatcher.lua
line 127 at r1 (raw file):
file_search = {category="none", event="ShowFileSearch", title=_("File search"), filemanager=true, separator=true}, -- -- go_to
Those two I'm mildly confused by, though. Was the intent to match the actual Menu layout, but those two aren't applicable to Dispatcher?
frontend/ui/widget/filechooser.lua
line 460 at r1 (raw file):
local setting = not self[mode] self[mode] = setting FileChooser[mode] = setting
I'm not necessarily a fan of having this both in the instance and the class.
I'd much prefer it be one or the other.
(no preference as to which, so go with whatever is more practical, likely the class).
(Note that, if it's nil
in the instance, looking up the instance will go to the class anyway).
That was the intention. koreader/frontend/dispatcher.lua Line 141 in 3b293f3
|
And what is the benefit if of setting |
Not necessarily what I was going for ;). I just meant that if a field isn't set in an instance, looking it up in said instance will resolve it in the class instead. (With the intent being that having the actual storage in the class means you don't necessarily have to hunt down every instance access to make them explicit class access instead... As long as nothing ever sets it in the instance, that is. Although, FWIW, I do prefer when class members are always explicitly accessed as such, and not via |
Oh, yes, this line can just be removed, thanks. |
All is cross-bound, hence the combined PR.
(1) File search
File search now is available in the file browser only.
Standard file dialog pop-up buttons added. Closes #10991.
(2) File manager
Unapplicable pop-up buttons in the file dialog are hidden (previously they were disabled).
Supported file

Unsupported file

(3) FileChooser
"Show" settings (finished books, hidden files, unsupported files) are centralized in FileChooser.
Optimization: do not init the settings every time when FM is launched.
(4) Dispatcher
"File search" is moved from General to File browser section.
"Fulltext search" is moved from General to Reader section.
Tidy: lines of code are ordered in accordance with the action menu order, comments fixed/added.
(5) History
Finished books timestamp is dimmed if "Freeze last read date of finished books" is enabled.
This change is