nuttyartist / notes

Fast and beautiful note-taking app written in C++. Write down your thoughts.
https://notes-foss.com
Mozilla Public License 2.0
3.72k stars 326 forks source link

Fix settings not saving when closing the app using native buttons or system shortcut #487

Closed zjeffer closed 1 year ago

zjeffer commented 1 year ago

I made a mistake in #470: I didn't call QuitApplication(), so the states were never saved to the settings file. This should be fixed now.

zjeffer commented 1 year ago

Thanks for rebasing :+1:

guihkx commented 1 year ago

No problem!

Change looks sane to me.

nuttyartist commented 1 year ago

That's very important 😅. I'll test all scenarios of quitting the app once you tell me it's ready for testing

zjeffer commented 1 year ago

Tested on bpswm and Ubuntu 22.10. Here's how I tested it in Gnome:

https://user-images.githubusercontent.com/4633209/219964862-a8b3ea85-a872-40ff-86a8-2f28e418e86e.mp4

zjeffer commented 1 year ago

Found another bug: closing with the red close button (non-native frame) would also not call the QuitApplication() method, now fixed.

Ready for testing @nuttyartist ;)

nuttyartist commented 1 year ago

Great, feel free to merge this. I'll do the testing tomorrow.