mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-07 20:35:31 +00:00
dummy: 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
656643c522
commit
58507556e5
1 changed files with 7 additions and 8 deletions
|
@ -106,15 +106,14 @@ struct DisconnectedData
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
call_state_changed_cb (CallsDummyOrigin *self,
|
call_state_changed_cb (CallsCall *call,
|
||||||
CallsCallState new_state,
|
GParamSpec *pspec,
|
||||||
CallsCallState old_state,
|
CallsDummyOrigin *self)
|
||||||
CallsCall *call)
|
|
||||||
{
|
{
|
||||||
g_assert (CALLS_IS_DUMMY_ORIGIN (self));
|
g_assert (CALLS_IS_DUMMY_ORIGIN (self));
|
||||||
g_assert (CALLS_IS_DUMMY_CALL (call));
|
g_assert (CALLS_IS_DUMMY_CALL (call));
|
||||||
|
|
||||||
if (new_state != CALLS_CALL_STATE_DISCONNECTED)
|
if (calls_call_get_state (call) != CALLS_CALL_STATE_DISCONNECTED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
remove_call (self, call, "Disconnected");
|
remove_call (self, call, "Disconnected");
|
||||||
|
@ -132,9 +131,9 @@ add_call (CallsDummyOrigin *self, const gchar *number, gboolean inbound)
|
||||||
|
|
||||||
call = CALLS_CALL (dummy_call);
|
call = CALLS_CALL (dummy_call);
|
||||||
g_signal_emit_by_name (CALLS_ORIGIN (self), "call-added", call);
|
g_signal_emit_by_name (CALLS_ORIGIN (self), "call-added", 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);
|
||||||
|
|
||||||
self->calls = g_list_append (self->calls, dummy_call);
|
self->calls = g_list_append (self->calls, dummy_call);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue