Use more g_signal_connect_object()

Most of these are probably paranoid, not bugs. I haven't done an
exhaustive review to see what really needs it: that would be
time-consuming and require significant familiarity with the Calendar
codebase. This was just a quick check. Anyway, I vote for paranoid
when it comes to using g_signal_connect() regardless. It's dangerous,
and there's no reason to ever leave a signal connected after the user
data object has been destroyed.

Fixes #423
This commit is contained in:
Michael Catanzaro
2019-09-14 23:28:42 +00:00
committed by Georges Basile Stavracas Neto
parent 9644c30eee
commit 18ae67cb59
15 changed files with 87 additions and 74 deletions
+5 -4
View File
@@ -118,10 +118,11 @@ update_grid_scroll_position (GcalWeekView *self)
stack = gtk_widget_get_ancestor (GTK_WIDGET (self), GTK_TYPE_STACK);
g_signal_connect (stack,
"notify::visible-child",
G_CALLBACK (stack_visible_child_changed_cb),
self);
g_signal_connect_object (stack,
"notify::visible-child",
G_CALLBACK (stack_visible_child_changed_cb),
self,
0);
self->scroll_grid_timeout_id = 0;