Skip to content
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

notification-area: stop warning on removal #1393

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Conversation

lukefromdc
Copy link
Member

*Use automatic signal handling for changing icon size so this code doesn't get called when the applet is removed

*Use automatic signal handling for changing icon size so this code doesn't get called when the applet is removed
@lukefromdc
Copy link
Member Author

Fixes #1380

@raveit65
Copy link
Member

raveit65 commented Jul 24, 2023

I can confirm that it fixes the crashes/warnings on x11/wayland.
But what is the different between g_signal_connect and g_signal_connect_object in our case?
This fix needs to go in stable branch too, so we're lucky that no one remove this applet normally :o))
@mate-desktop/core-team
Please test, it is reproducible with stable branch.

Copy link
Member

@raveit65 raveit65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,
it fixes crashes in fedora and (only) warnings in debian.

@lukefromdc
Copy link
Member Author

The difference is that g_signal_connect_object() automatically manages signal disconnection

@lukefromdc
Copy link
Member Author

Just confirmed the warning also occurs on 1.26 when removing the notification area applet

@cwendling
Copy link
Member

The difference is that g_signal_connect_object() automatically manages signal disconnection

To clarify: g_signal_connect() automatically disconnects when the object that emits the signal is destroyed (here, the settings instance). g_signal_connect_object() assumes the data argument is also a GObject, and tracks its lifetime as well.

@raveit65
Copy link
Member

The difference is that g_signal_connect_object() automatically manages signal disconnection

To clarify: g_signal_connect() automatically disconnects when the object that emits the signal is destroyed (here, the settings instance). g_signal_connect_object() assumes the data argument is also a GObject, and tracks its lifetime as well.

So, you approve the PR?

@cwendling
Copy link
Member

@raveit65 I couldn't test it yet, but the code looks good, yes 👍

@raveit65 raveit65 merged commit 7400deb into master Jul 26, 2023
@raveit65 raveit65 deleted the notification-warning branch July 26, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants