mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 11:35:32 +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
|
||||
calls_sip_origin_set_property (GObject *object,
|
||||
guint property_id,
|
||||
|
@ -1189,6 +1202,8 @@ calls_sip_origin_constructed (GObject *object)
|
|||
g_warning ("Error initializing the SIP account: %s", error->message);
|
||||
}
|
||||
|
||||
update_name (self);
|
||||
|
||||
self->media_manager = calls_sip_media_manager_default ();
|
||||
|
||||
G_OBJECT_CLASS (calls_sip_origin_parent_class)->constructed (object);
|
||||
|
@ -1418,6 +1433,8 @@ calls_sip_origin_set_credentials (CallsSipOrigin *self,
|
|||
|
||||
self->port = port;
|
||||
|
||||
update_name (self);
|
||||
|
||||
/* Propagate changes to nua stack */
|
||||
update_nua (self);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue