mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-23 20:15:32 +00:00
application: Respect object lifecycle for signals
This commit is contained in:
parent
6ab5905a9b
commit
ffc3c984b0
1 changed files with 10 additions and 8 deletions
|
@ -485,10 +485,11 @@ startup (GApplication *application)
|
||||||
G_N_ELEMENTS (actions),
|
G_N_ELEMENTS (actions),
|
||||||
application);
|
application);
|
||||||
|
|
||||||
g_signal_connect_swapped (calls_manager_get_default (),
|
g_signal_connect_object (calls_manager_get_default (),
|
||||||
"notify::state",
|
"notify::state",
|
||||||
G_CALLBACK (manager_state_changed_cb),
|
G_CALLBACK (manager_state_changed_cb),
|
||||||
application);
|
application,
|
||||||
|
G_CONNECT_SWAPPED);
|
||||||
|
|
||||||
manager_state_changed_cb (application);
|
manager_state_changed_cb (application);
|
||||||
|
|
||||||
|
@ -617,10 +618,11 @@ start_proper (CallsApplication *self)
|
||||||
self->call_window = calls_call_window_new (gtk_app);
|
self->call_window = calls_call_window_new (gtk_app);
|
||||||
g_assert (self->call_window != NULL);
|
g_assert (self->call_window != NULL);
|
||||||
|
|
||||||
g_signal_connect (self->call_window,
|
g_signal_connect_object (self->call_window,
|
||||||
"notify::visible",
|
"notify::visible",
|
||||||
G_CALLBACK (notify_window_visible_cb),
|
G_CALLBACK (notify_window_visible_cb),
|
||||||
self);
|
self,
|
||||||
|
G_CONNECT_AFTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue