1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-17 07:46:03 +00:00

mm: origin: Switch to state notify signal

We don't need the old state here, so let's use the "notify::state" signal
instead of the "state-changed" signal.
This commit is contained in:
Evangelos Ribeiro Tzaras 2022-01-14 06:16:03 +01:00
parent 58507556e5
commit 470475e531

View file

@ -424,15 +424,15 @@ delete_call (CallsMMOrigin *self,
}
static void
call_state_changed_cb (CallsMMOrigin *self,
CallsCallState new_state,
CallsCallState old_state,
CallsCall *call)
call_state_changed_cb (CallsCall *call,
GParamSpec *pspec,
CallsMMOrigin *self)
{
if (new_state != CALLS_CALL_STATE_DISCONNECTED)
{
return;
}
g_assert (CALLS_IS_MM_ORIGIN (self));
g_assert (CALLS_IS_MM_CALL (call));
if (calls_call_get_state (call) != CALLS_CALL_STATE_DISCONNECTED)
return;
delete_call (self, CALLS_MM_CALL (call));
}
@ -447,9 +447,9 @@ add_call (CallsMMOrigin *self,
call = calls_mm_call_new (mm_call);
g_signal_connect_swapped (call, "state-changed",
G_CALLBACK (call_state_changed_cb),
self);
g_signal_connect (call, "notify::state",
G_CALLBACK (call_state_changed_cb),
self);
path = mm_call_dup_path (mm_call);
g_hash_table_insert (self->calls, path, call);