FileSearcher: consistent results window#13298
Conversation
|
Tuning the file dialog, I encountered that koreader/frontend/document/credocument.lua Lines 1571 to 1573 in a641207 I suppose it was done by @NiLuJe to enable adding scripts to Favorites. Currently any file can be added to a collection from within the collection. I think the providers can be removed. I do not see anything that requires a provider in the script execution code: |
poire-z
left a comment
There was a problem hiding this comment.
Too many stuff mostly moved around to review each bit, so trusting you.
| function FileManagerCollection:onShowColl(collection_name) | ||
| collection_name = collection_name or ReadCollection.default_collection_name | ||
| self.coll_menu = BookList:new{ | ||
| self.booklist_menu = BookList:new{ |
There was a problem hiding this comment.
I think this change of name everywhere is because you access this.booklist_menu in CoverBrowser.getUpdateItemTableFunc() and you need that same name everywhere.
I think it should be mentionned as a comment here (and elsewhere).
-- This may be hijacked by CoverBrowser pluging and needs to be known as booklist_menu.
(or something like that if I'm not fully correct with that comment).
| if Device:canExecuteScript(file) then | ||
| table.insert(buttons, { | ||
| filemanagerutil.genExecuteScriptButton(file, close_dialog_callback), | ||
| }) | ||
| end | ||
| if FileManagerConverter:isSupported(file) then | ||
| table.insert(buttons, { | ||
| FileManagerConverter:genConvertButton(file, close_dialog_callback, refresh_callback) | ||
| }) | ||
| end |
There was a problem hiding this comment.
This being moved around will just insert full rows above instead of below - no change in the layout of the other buttons?
There was a problem hiding this comment.
Please look at the screenshot.
Currently 'Convert' and 'Execute script' full-width buttons are added between 'Book cover' and 'Ignore cover' rows (even if we remove providers for py and sh, the provider for md should remain, i.e. these rows are shown).
I move Convert and Execute buttons upper, without changing the layout of other buttons.
There was a problem hiding this comment.
To keep related 'cover' buttons together.
There was a problem hiding this comment.
Ok, that's fine.
Please look at the screenshot.
(I didn't see any of these rarely-seen buttons on your screenshot, so that's why I asked.)
|
I haven't tested this but it looks promising. Just a question: is it still the case that this dialog is normally opened via long-press on a file, except in FileSearcher where it is flipped: long-press opens the file but short tap opens the dialog?. I think that is very confusing to a user, and makes it easy to accidentally open a search result when one just wants to see more details or choose another option. Long press for more options/details is the expected behavior. |
|
The same feeling, so this PR provides the standard behaviour in FileSearcher: tap to open, long-press to call the file dialog. |




Use CoverBrowser (following file manager display mode), standard file dialog on long-pressing.
This change is