Skip to content
Snippets Groups Projects
Commit d1a6194b authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#2556] Handle history entries in calltre_update_call

parent 57ff6888
Branches
Tags
No related merge requests found
......@@ -355,7 +355,6 @@ calltree_display_call_info(callable_obj_t * c, CallDisplayType display_type, gch
if(c->_type == CALL && c->_history_state == OUTGOING) {
display_number = peer_number;
}
else {
......@@ -722,7 +721,6 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
account_t* account_details=NULL;
gchar *audio_codec = "";
int nbChild = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), parent);
int i;
......@@ -781,7 +779,6 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
} else {
calltree_display_call_info(c, DISPLAY_TYPE_STATE_CODE, audio_codec, &description);
}
}
......@@ -845,6 +842,33 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
}
}
}
if(tab == history) {
switch(c->_history_state) {
case INCOMING:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/incoming.svg", NULL);
break;
case OUTGOING:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/outgoing.svg", NULL);
break;
case MISSED:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/missed.svg", NULL);
break;
default:
WARN("History - Should not happen!");
}
calltree_display_call_info(c, DISPLAY_TYPE_HISTORY, NULL, &description);
date = get_formatted_start_timestamp (c);
duration = get_call_duration (c);
duration = g_strconcat( date , duration , NULL);
description = g_strconcat( description , duration, NULL);
}
gtk_tree_store_set(store, &iter,
0, pixbuf, // Icon
1, description, // Description
......@@ -854,11 +878,10 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
if (pixbuf != NULL)
g_object_unref(G_OBJECT(pixbuf));
}
}
}
update_actions();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment