Skip to content
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

open unsupported documents as text #5497

Merged
merged 7 commits into from Oct 23, 2019
Merged

open unsupported documents as text #5497

merged 7 commits into from Oct 23, 2019

Conversation

@yparitcher
Copy link
Contributor

yparitcher commented Oct 17, 2019

This is a working POC / hack to allow opening unsupported files as txt, for example .lua files.
this can be very helpful when having oddly named files.
it might be a good idea to allow all providers on this list?

this only triggers via the open with menu, not by directly clicking the item, unless setting the provider as a default.

this probably needs proper integration but i am not 100% sure exactly how the DocumentRegistry works and don't want to mess things up.

once this works i would like to add a way to clear already set providers from settings.

FileManager_2019-Oct-17_015418

@yparitcher

This comment has been minimized.

Copy link
Contributor Author

yparitcher commented Oct 17, 2019

adds reset default global provider

FileManager_2019-Oct-17_150651

@yparitcher

This comment has been minimized.

Copy link
Contributor Author

yparitcher commented Oct 17, 2019

can somone test and make sure i didn't mess up DocumentRegistry too much.
thanks

@yparitcher yparitcher changed the title [Draft] open unsupported documents as text open unsupported documents as text Oct 17, 2019
@yparitcher yparitcher marked this pull request as ready for review Oct 17, 2019
@Frenzie

This comment has been minimized.

Copy link
Member

Frenzie commented on frontend/ui/widget/filechooser.lua in 0bd4243 Oct 17, 2019

For future proof/clarity it's probably better to write something like

"such as Cool Reader Engine or MuPDF."

@Frenzie

This comment has been minimized.

Copy link
Member

Frenzie commented on frontend/ui/widget/filechooser.lua in 0bd4243 Oct 17, 2019

Basically I'm happy enough with unsupported and variations on the theme. The biggest alternative would be something along the lines of Force open.

fix
@Frenzie Frenzie added this to the 2019.11 milestone Oct 18, 2019
@yparitcher

This comment has been minimized.

Copy link
Contributor Author

yparitcher commented Oct 18, 2019

FileManager_2019-Oct-18_140005
FileManager_2019-Oct-18_140020

@yparitcher yparitcher requested a review from Frenzie Oct 23, 2019
@Frenzie Frenzie added the enhancement label Oct 23, 2019
@Frenzie Frenzie merged commit 6c68df4 into koreader:master Oct 23, 2019
1 check was pending
1 check was pending
ci/circleci: build CircleCI is running your tests
Details
@Frenzie

This comment has been minimized.

Copy link
Member

Frenzie commented Oct 23, 2019

Alright, thanks!

@yparitcher yparitcher deleted the yparitcher:open_as branch Oct 23, 2019
@Frenzie Frenzie mentioned this pull request Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.