1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-09-20 18:35:27 +00:00

record-row: Use API to query call icon name

This makes sure we don't need to allocate icon string names for each record.
This commit is contained in:
Evangelos Ribeiro Tzaras 2021-12-07 11:03:56 +01:00
parent a87c3eeb2e
commit 42b5b9d600

View file

@ -227,9 +227,6 @@ update_time (CallsCallRecordRow *self,
GDateTime *answered, GDateTime *answered,
GDateTime *end) GDateTime *end)
{ {
gboolean missed = FALSE;
gchar *type_icon_name;
if (end) { if (end) {
gboolean time_final; gboolean time_final;
@ -237,19 +234,11 @@ update_time (CallsCallRecordRow *self,
if (!time_final && !self->date_change_timeout) if (!time_final && !self->date_change_timeout)
setup_date_change_timeout (self); setup_date_change_timeout (self);
if (!answered)
missed = TRUE;
} }
type_icon_name = g_strdup_printf gtk_image_set_from_icon_name (self->type,
("call-arrow-%s%s-symbolic", get_call_icon_symbolic_name (inbound, !answered),
inbound ? "incoming" : "outgoing",
missed ? "-missed" : "");
gtk_image_set_from_icon_name (self->type, type_icon_name,
GTK_ICON_SIZE_MENU); GTK_ICON_SIZE_MENU);
g_free (type_icon_name);
} }