[calls] record-row: Use API to query call icon name



commit 42b5b9d6001c243af4a03ac6b7fa41fc329e0ec0
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date:   Tue Dec 7 11:03:56 2021 +0100

    record-row: Use API to query call icon name
    
    This makes sure we don't need to allocate icon string names for each record.

 src/calls-call-record-row.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/src/calls-call-record-row.c b/src/calls-call-record-row.c
index c7d9c73f..7d51aa8f 100644
--- a/src/calls-call-record-row.c
+++ b/src/calls-call-record-row.c
@@ -227,9 +227,6 @@ update_time (CallsCallRecordRow *self,
              GDateTime          *answered,
              GDateTime          *end)
 {
-  gboolean missed = FALSE;
-  gchar *type_icon_name;
-
   if (end) {
     gboolean time_final;
 
@@ -237,19 +234,11 @@ update_time (CallsCallRecordRow *self,
 
     if (!time_final && !self->date_change_timeout)
       setup_date_change_timeout (self);
-
-    if (!answered)
-      missed = TRUE;
   }
 
-  type_icon_name = g_strdup_printf
-    ("call-arrow-%s%s-symbolic",
-     inbound ? "incoming" : "outgoing",
-     missed  ? "-missed"  : "");
-  gtk_image_set_from_icon_name (self->type, type_icon_name,
+  gtk_image_set_from_icon_name (self->type,
+                                get_call_icon_symbolic_name (inbound, !answered),
                                 GTK_ICON_SIZE_MENU);
-
-  g_free (type_icon_name);
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]