mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-11-19 01:51:46 +00:00
sip: origin: Set and update name of origin
This commit is contained in:
parent
5c1b76908b
commit
e9f155678e
1 changed files with 17 additions and 0 deletions
|
@ -1030,6 +1030,19 @@ supports_protocol (CallsOrigin *origin,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
update_name (CallsSipOrigin *self)
|
||||||
|
{
|
||||||
|
g_assert (CALLS_IS_SIP_ORIGIN (self));
|
||||||
|
|
||||||
|
if (self->display_name && self->display_name[0] != '\0')
|
||||||
|
self->name = self->display_name;
|
||||||
|
else
|
||||||
|
self->name = self->user;
|
||||||
|
|
||||||
|
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_NAME]);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
calls_sip_origin_set_property (GObject *object,
|
calls_sip_origin_set_property (GObject *object,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
|
@ -1189,6 +1202,8 @@ calls_sip_origin_constructed (GObject *object)
|
||||||
g_warning ("Error initializing the SIP account: %s", error->message);
|
g_warning ("Error initializing the SIP account: %s", error->message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_name (self);
|
||||||
|
|
||||||
self->media_manager = calls_sip_media_manager_default ();
|
self->media_manager = calls_sip_media_manager_default ();
|
||||||
|
|
||||||
G_OBJECT_CLASS (calls_sip_origin_parent_class)->constructed (object);
|
G_OBJECT_CLASS (calls_sip_origin_parent_class)->constructed (object);
|
||||||
|
@ -1418,6 +1433,8 @@ calls_sip_origin_set_credentials (CallsSipOrigin *self,
|
||||||
|
|
||||||
self->port = port;
|
self->port = port;
|
||||||
|
|
||||||
|
update_name (self);
|
||||||
|
|
||||||
/* Propagate changes to nua stack */
|
/* Propagate changes to nua stack */
|
||||||
update_nua (self);
|
update_nua (self);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue