mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-11-17 16:05:36 +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:
parent
58507556e5
commit
470475e531
1 changed files with 11 additions and 11 deletions
|
@ -424,15 +424,15 @@ delete_call (CallsMMOrigin *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
call_state_changed_cb (CallsMMOrigin *self,
|
call_state_changed_cb (CallsCall *call,
|
||||||
CallsCallState new_state,
|
GParamSpec *pspec,
|
||||||
CallsCallState old_state,
|
CallsMMOrigin *self)
|
||||||
CallsCall *call)
|
|
||||||
{
|
{
|
||||||
if (new_state != CALLS_CALL_STATE_DISCONNECTED)
|
g_assert (CALLS_IS_MM_ORIGIN (self));
|
||||||
{
|
g_assert (CALLS_IS_MM_CALL (call));
|
||||||
return;
|
|
||||||
}
|
if (calls_call_get_state (call) != CALLS_CALL_STATE_DISCONNECTED)
|
||||||
|
return;
|
||||||
|
|
||||||
delete_call (self, CALLS_MM_CALL (call));
|
delete_call (self, CALLS_MM_CALL (call));
|
||||||
}
|
}
|
||||||
|
@ -447,9 +447,9 @@ add_call (CallsMMOrigin *self,
|
||||||
|
|
||||||
call = calls_mm_call_new (mm_call);
|
call = calls_mm_call_new (mm_call);
|
||||||
|
|
||||||
g_signal_connect_swapped (call, "state-changed",
|
g_signal_connect (call, "notify::state",
|
||||||
G_CALLBACK (call_state_changed_cb),
|
G_CALLBACK (call_state_changed_cb),
|
||||||
self);
|
self);
|
||||||
|
|
||||||
path = mm_call_dup_path (mm_call);
|
path = mm_call_dup_path (mm_call);
|
||||||
g_hash_table_insert (self->calls, path, call);
|
g_hash_table_insert (self->calls, path, call);
|
||||||
|
|
Loading…
Reference in a new issue