mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-23 20:15:32 +00:00
main-window: Respect object lifecycle for signals
This commit is contained in:
parent
e168170f9e
commit
63d065118f
1 changed files with 20 additions and 16 deletions
|
@ -332,19 +332,22 @@ constructed (GObject *object)
|
|||
CallsHistoryBox *history;
|
||||
|
||||
// Show errors in in-app-notification
|
||||
g_signal_connect_swapped (calls_manager_get_default (),
|
||||
g_signal_connect_object (calls_manager_get_default (),
|
||||
"message",
|
||||
G_CALLBACK (calls_in_app_notification_show),
|
||||
self->in_app_notification);
|
||||
self->in_app_notification,
|
||||
G_CONNECT_SWAPPED);
|
||||
|
||||
g_signal_connect_swapped (calls_manager_get_default (),
|
||||
g_signal_connect_object (calls_manager_get_default (),
|
||||
"ussd-added",
|
||||
G_CALLBACK (window_ussd_added_cb),
|
||||
self);
|
||||
g_signal_connect_swapped (calls_manager_get_default (),
|
||||
self,
|
||||
G_CONNECT_SWAPPED);
|
||||
g_signal_connect_object (calls_manager_get_default (),
|
||||
"ussd-state-changed",
|
||||
G_CALLBACK (window_update_ussd_state),
|
||||
self);
|
||||
self,
|
||||
G_CONNECT_SWAPPED);
|
||||
gtk_window_set_transient_for (GTK_WINDOW (self->ussd_dialog), GTK_WINDOW (self));
|
||||
|
||||
// Add contacs box
|
||||
|
@ -390,10 +393,11 @@ constructed (GObject *object)
|
|||
g_object_unref (simple_action_group);
|
||||
|
||||
|
||||
g_signal_connect_swapped (calls_manager_get_default (),
|
||||
g_signal_connect_object (calls_manager_get_default (),
|
||||
"notify::state",
|
||||
G_CALLBACK (state_changed_cb),
|
||||
self);
|
||||
self,
|
||||
G_CONNECT_SWAPPED);
|
||||
|
||||
state_changed_cb (self, NULL, calls_manager_get_default ());
|
||||
|
||||
|
|
Loading…
Reference in a new issue