-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Properly unsubscribe when property page is removed #2091
Conversation
Sourcery Code Quality Report✅ Merging this PR will increase code quality in the affected files by 0.19%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Add a function to unsubscribe watchers. It appeared handlers were not properly removed in GTK4, since in GTK4 widgets are not "destroyed", but only use reference counting.
20a33f6
to
813a9ac
Compare
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.
This looks great! How did you figure out that GTK4 event handlers were leaking?
I know something changed in the way widgets are destroyed. Initially I just made it work (not break), but forgot to come back and fix it for real. |
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Event handlers "leak" in GTK 4.
Issue Number: N/A
What is the new behavior?
Add a function to unsubscribe watchers. It appeared handlers were not properly removed in GTK4, since in GTK4 widgets are not "destroyed", but only use reference counting.
Information
Added a function to
gaphor.diagram.propertypages
to unsubscribe automatically on widgetdestroy
(gtk3) orunparent
(gtk4).