-
Notifications
You must be signed in to change notification settings - Fork 67
Capture screenshot directly #206
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
pgaskin
left a comment
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.
Seems good overall, but I haven't looked at it too closely or tested it yet.
Now by default it will show a toast after capturing screenshot. You can disable it by using "capture:quiet". |
| //libnickel 4.6 * _ZN8SettingsC2ERK6Deviceb _ZN8SettingsC2ERK6Device | ||
| NM_ACT_SYM(symbols.Settings_Settings, "_ZN8SettingsC2ERK6Deviceb"); | ||
| NM_ACT_SYM(symbols.Settings_SettingsLegacy, "_ZN8SettingsC2ERK6Device"); | ||
| NM_CHECK(SettingsSymbols{}, symbols.Settings_Settings || symbols.Settings_SettingsLegacy, "could not dlsym Settings constructor (new and/or old)"); |
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.
In the old code, this was:
NM_CHECK(nullptr, Settings_Settings || Settings_SettingsLegacy, "could not dlsym Settings constructor (new and/or old)");I had to change nullptr to SettingsSymbols{} to make it work. Will it be a problem?
I'd rather not since this doesn't really provide anything over chaining a toast action. |
|
It doesn't hide the reading menu while taking screenshot, so it's better to be used with shortcut key #207
|
I think it's still useful when capturing screenshot using a page turner. Edit: sorry I got your idea now. Do you want me to revert that change? |
… option" This reverts commit 7a6cf2c.
pgaskin
left a comment
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.
Tested on 21533 and 23552. Code looks fine, errors are checked, setting is always restored once set even in the failure cases.
|
Thanks! |

Successfully tested on Kobo Clara BW fw 4.43
Pressing the Power button on Kobo is the same as pressing the Escape key on keyboard.
So to take screenshot, we just need to:
Menu item:
I also refactored the Settings related code so it can be reused easily.
Currently after taking screenshot it doesn't show anything to indicate that the task was done. Maybe add another option to show a toast?
Thanks for the great project!
Demo video:
nickelmenu-screenshot.mp4