mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 03:25:31 +00:00
mm-call: Set call state on construction
This commit is contained in:
parent
1c37b39398
commit
9951fbf812
1 changed files with 8 additions and 1 deletions
|
@ -299,6 +299,7 @@ constructed (GObject *object)
|
|||
GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT);
|
||||
CallsMMCall *self = CALLS_MM_CALL (object);
|
||||
MmGdbusCall *gdbus_call = MM_GDBUS_CALL (self->mm_call);
|
||||
MMCallState state;
|
||||
|
||||
g_signal_connect_swapped (gdbus_call, "notify::number",
|
||||
G_CALLBACK (notify_number_cb), self);
|
||||
|
@ -307,8 +308,14 @@ constructed (GObject *object)
|
|||
|
||||
notify_number_cb (self, mm_call_get_number (self->mm_call));
|
||||
|
||||
state = mm_call_get_state (self->mm_call);
|
||||
state_changed_cb (self,
|
||||
MM_MODEM_STATE_UNKNOWN,
|
||||
state,
|
||||
mm_call_get_state_reason (self->mm_call));
|
||||
|
||||
/* Start outgoing call */
|
||||
if (mm_call_get_state (self->mm_call) == MM_CALL_STATE_UNKNOWN
|
||||
if (state == MM_CALL_STATE_UNKNOWN
|
||||
&& mm_call_get_direction (self->mm_call) == MM_CALL_DIRECTION_OUTGOING)
|
||||
{
|
||||
start_call (CALLS_CALL (self));
|
||||
|
|
Loading…
Reference in a new issue