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:
committed by
Georges Basile Stavracas Neto
parent
9644c30eee
commit
18ae67cb59
@@ -103,10 +103,11 @@ make_calendar_row (GcalCalendarsPage *self,
|
||||
top_label = GTK_WIDGET (gtk_builder_get_object (builder, "title"));
|
||||
gtk_label_set_label (GTK_LABEL (top_label), gcal_calendar_get_name (calendar));
|
||||
g_object_bind_property (calendar, "name", top_label, "label", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
|
||||
g_signal_connect_swapped (calendar,
|
||||
"notify::name",
|
||||
G_CALLBACK (gtk_list_box_invalidate_sort),
|
||||
self->listbox);
|
||||
g_signal_connect_object (calendar,
|
||||
"notify::name",
|
||||
G_CALLBACK (gtk_list_box_invalidate_sort),
|
||||
self->listbox,
|
||||
G_CONNECT_SWAPPED);
|
||||
|
||||
g_signal_connect_object (calendar,
|
||||
"notify::color",
|
||||
|
||||
Reference in New Issue
Block a user