1

I made this simple application and made it so that the window position and size is saved on closing the app, so that the next time the user opens the app, he can resume his work directly.

https://drive.google.com/drive/folders/1YJFU2u0LNC7YO3Hwk3ts32EDh-Q965Gi?usp=sharing

This is the link to the source code of my app.

Can anyone review the code and point out my mistake?

1

You seem to be missing one last step, actually calling the function that is supposed to save the new values in the gsettings schema. To do this, you need to connect the delete_event signal to your before_destroy () function. I like to place that right before calling show_all ():

enter image description here

Also, the before_destroy () function must return false for the window to actually close.

enter image description here

EDIT: Please look into using a github repository, sharing google drive links is not recommended.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.