From 35d9512ef8b55706bbd4a1bcd74973aa85cc1bdc Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Wed, 19 Oct 2011 14:57:29 -0400 Subject: [PATCH] * #7178: calls added to history will never have a parent --- gnome/src/actions.c | 2 +- gnome/src/contacts/calllist.c | 2 +- gnome/src/contacts/calltree.c | 34 +++++++++++++++------------------- gnome/src/contacts/calltree.h | 2 +- 4 files changed, 18 insertions(+), 22 deletions(-) diff --git a/gnome/src/actions.c b/gnome/src/actions.c index 88ec5115dc..9ec2f92f46 100644 --- a/gnome/src/actions.c +++ b/gnome/src/actions.c @@ -1098,7 +1098,7 @@ void sflphone_fill_history(void) QueueElement *element = calllist_get_nth(history_tab, i); if (element->type == HIST_CALL) - calltree_add_history_entry(element->elem.call, NULL); + calltree_add_history_entry(element->elem.call); } } diff --git a/gnome/src/contacts/calllist.c b/gnome/src/contacts/calllist.c index f8dd259bd5..75b0727f8c 100644 --- a/gnome/src/contacts/calllist.c +++ b/gnome/src/contacts/calllist.c @@ -160,7 +160,7 @@ calllist_remove_call(calltab_t* tab, const gchar * callID) g_queue_remove(tab->callQueue, element); calllist_add_call(history_tab, element->elem.call); - calltree_add_history_entry(element->elem.call, NULL); + calltree_add_history_entry(element->elem.call); } diff --git a/gnome/src/contacts/calltree.c b/gnome/src/contacts/calltree.c index 62028e9e5b..621736dec5 100644 --- a/gnome/src/contacts/calltree.c +++ b/gnome/src/contacts/calltree.c @@ -845,7 +845,7 @@ void calltree_add_call(calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent) gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(tab->view)), &iter); } -void calltree_add_history_entry(callable_obj_t *c, GtkTreeIter *parent) +void calltree_add_history_entry(callable_obj_t *c) { if (!eel_gconf_get_integer(HISTORY_ENABLED)) return; @@ -854,27 +854,23 @@ void calltree_add_history_entry(callable_obj_t *c, GtkTreeIter *parent) gchar * description = calltree_display_call_info(c, DISPLAY_TYPE_HISTORY, ""); GtkTreeIter iter; - gtk_tree_store_prepend(history_tab->store, &iter, parent); + gtk_tree_store_prepend(history_tab->store, &iter, NULL); GdkPixbuf *pixbuf = NULL; - if (parent == NULL) { - DEBUG("CallTree: This is a first level call not participating in a conference"); - 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!"); - } - } else // participant to a conference - pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/current.svg", NULL); + 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!"); + } gchar *date = get_formatted_start_timestamp(c->_time_start); gchar *duration = get_call_duration(c); diff --git a/gnome/src/contacts/calltree.h b/gnome/src/contacts/calltree.h index f960c4f498..4f4fde48c7 100644 --- a/gnome/src/contacts/calltree.h +++ b/gnome/src/contacts/calltree.h @@ -91,7 +91,7 @@ calltree_remove_call(calltab_t *, callable_obj_t *); * @param The parent item in case of a conference, should be NULL in case of a normal call */ void -calltree_add_history_entry (callable_obj_t *, GtkTreeIter *); +calltree_add_history_entry(callable_obj_t *); void calltree_add_conference_to_current_calls(conference_obj_t *); -- GitLab