pgaskin / NickelMenu

The easiest way to launch scripts, change settings, and run actions on Kobo e-readers.
https://pgaskin.net/NickelMenu
MIT License
591 stars 32 forks source link

Add a confirmation dialog? #13

Closed baskerville closed 4 years ago

baskerville commented 4 years ago

I thought it might be useful to have a confirmation dialog with at least two buttons.

Maybe the cancel dialog that shows up in the output of: arm-linux-gnueabihf-objdump -T libnickel.so | grep -i 'confirm.*show.*dialog' (that is _ZN25ConfirmationDialogFactory16showCancelDialogERK7QStringS2_) could fulfill this task?

pgaskin commented 4 years ago

Yes, that would be the right symbol. The main difficulty is that it uses signals, which are a PITA to use with dlsym, as they require functional vtables, Qt metaobjects, and would-be-generated-by-moc names. Due to this, they are also the most likely to break in unexpected ways in the future. If there's any alternative, I'd rather do that instead.

Some random ideas:

pgaskin commented 4 years ago

I've decided against implementing this for now, but may reconsider it in the future if the need arises.