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;
|
CallsHistoryBox *history;
|
||||||
|
|
||||||
// Show errors in in-app-notification
|
// Show errors in in-app-notification
|
||||||
g_signal_connect_swapped (calls_manager_get_default (),
|
g_signal_connect_object (calls_manager_get_default (),
|
||||||
"message",
|
"message",
|
||||||
G_CALLBACK (calls_in_app_notification_show),
|
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",
|
"ussd-added",
|
||||||
G_CALLBACK (window_ussd_added_cb),
|
G_CALLBACK (window_ussd_added_cb),
|
||||||
self);
|
self,
|
||||||
g_signal_connect_swapped (calls_manager_get_default (),
|
G_CONNECT_SWAPPED);
|
||||||
"ussd-state-changed",
|
g_signal_connect_object (calls_manager_get_default (),
|
||||||
G_CALLBACK (window_update_ussd_state),
|
"ussd-state-changed",
|
||||||
self);
|
G_CALLBACK (window_update_ussd_state),
|
||||||
|
self,
|
||||||
|
G_CONNECT_SWAPPED);
|
||||||
gtk_window_set_transient_for (GTK_WINDOW (self->ussd_dialog), GTK_WINDOW (self));
|
gtk_window_set_transient_for (GTK_WINDOW (self->ussd_dialog), GTK_WINDOW (self));
|
||||||
|
|
||||||
// Add contacs box
|
// Add contacs box
|
||||||
|
@ -390,10 +393,11 @@ constructed (GObject *object)
|
||||||
g_object_unref (simple_action_group);
|
g_object_unref (simple_action_group);
|
||||||
|
|
||||||
|
|
||||||
g_signal_connect_swapped (calls_manager_get_default (),
|
g_signal_connect_object (calls_manager_get_default (),
|
||||||
"notify::state",
|
"notify::state",
|
||||||
G_CALLBACK (state_changed_cb),
|
G_CALLBACK (state_changed_cb),
|
||||||
self);
|
self,
|
||||||
|
G_CONNECT_SWAPPED);
|
||||||
|
|
||||||
state_changed_cb (self, NULL, calls_manager_get_default ());
|
state_changed_cb (self, NULL, calls_manager_get_default ());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue