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

A few minor fixes after #4847 #4850

Merged
merged 10 commits into from Mar 29, 2019

Conversation

Projects
None yet
3 participants
@NiLuJe
Copy link
Member

commented Mar 28, 2019

  • Add a toggle to disable the C blitter in the Dev menu (depends on koreader/koreader-base#882) (never shown if the JIT is disabled, grayed out if the C blitter is not installed)
  • Fix a few sizeUtf8Text call sites that were doing a nil check in order to account for the new return type.
  • Tweak statusbar handling to avoid spurious sizeUtf8Text warnings when it's hidden, and unify its behavior between being hidden via toggle, and hidden on book open (at least when all-at-once is not enabled).

NiLuJe added some commits Mar 28, 2019

Add a button to toggle the C blitter on or off in the Dev menu.
Will never be shown on platforms with the JIT disabled.
Will be grayed out if the C blitter isn't present.
Don't call setText on an empty string in the status bar
When we open a book with the status bar hidden
Provided we're not in all at once mode (where thing sare apparently more
complex), disable footer text generation completely when we're hidden.

That was already the case when opening a book with the status bar
hidden, but not when you toggled it.
Update a few sizeUtf8Text call sites that were doing a nil check ;).
It now returns a table with the fields set to 0, so, check for that
instead.

Frenzie and others added some commits Mar 28, 2019

Update frontend/apps/filemanager/filemanagermenu.lua
Co-Authored-By: NiLuJe <ninuje@gmail.com>
Switch to setenv/unsetenv on Posix
It's slightly less awful than putenv
@@ -260,6 +260,10 @@ function FileManagerMenu:setUpdateItemTable()
end,
callback = function()
G_reader_settings:flipNilOrFalse("dev_startup_no_fbdepth")
local InfoMessage = require("ui/widget/infomessage")
UIManager:show(InfoMessage:new{
text = _("This will take effect on next restart."),

This comment has been minimized.

Copy link
@Frenzie

Frenzie Mar 29, 2019

Member

Might as well write something more specific, like The new bit depth will take effect after restarting KOReader. or KOReader will need to restart to enable the new bit depth.

This comment has been minimized.

Copy link
@Frenzie

Frenzie Mar 29, 2019

Member

Incidentally, I've been thinking that messages of this type could also consider using a ConfirmBox or something instead, with the cancel/OK buttons reading Restart later and Restart now.

Edit: although that might be slightly more problematic with platforms where restarting can only be manual. Just a generic thinking aloud, nothing to fix before merging. ;-)

This comment has been minimized.

Copy link
@NiLuJe

NiLuJe Mar 29, 2019

Author Member

I mainly went with that generic wording because it's already used elsewhere, so, already translated ;).

This comment has been minimized.

Copy link
@Frenzie

Frenzie Mar 29, 2019

Member

That's true. On the flipside, the previous translation will show up as an xx % match so it can be more easily adapted than starting from scratch. Since it's a more advanced config section I suppose we should just leave it then. :-)

@@ -275,6 +279,10 @@ function FileManagerMenu:setUpdateItemTable()
end,
callback = function()
G_reader_settings:flipNilOrFalse("dev_no_c_blitter")
local InfoMessage = require("ui/widget/infomessage")
UIManager:show(InfoMessage:new{
text = _("This will take effect on next restart."),

This comment has been minimized.

Copy link
@Frenzie

Frenzie Mar 29, 2019

Member

Same as above. Something like The new blitter will take effect after restarting KOReader. or KOReader will need to restart to enable the new blitter.

@NiLuJe NiLuJe merged commit b72a200 into koreader:master Mar 29, 2019

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@Frenzie Frenzie added this to the 2019.04 milestone Mar 30, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.