1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-25 21:29:32 +00:00

mm: origin: Try using own number as the origin name

This will make it easier to select an origin for outgoing calls. Without this
change the name might be "0" which is not very expressive.
This commit is contained in:
Evangelos Ribeiro Tzaras 2021-04-20 02:07:19 +02:00
parent fecdc1fff8
commit a888ac54b1

View file

@ -663,7 +663,14 @@ get_property (GObject *object,
static gchar *
modem_get_name (MMModem *modem)
{
gchar *name = NULL;
char *name = NULL;
const char * const *numbers = NULL;
numbers = mm_modem_get_own_numbers (modem);
if (numbers && g_strv_length ((char **) numbers) > 0) {
name = g_strdup (numbers[0]);
return name;
}
#define try(prop) \
name = mm_modem_dup_##prop (modem); \