diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index 4ad8189e35357b00ab96e6ef47a9f88008d05b38..de6da55168e2fe4da232483678d6fa57fd343a69 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -123,7 +123,7 @@ sflphone_quit () sflphone_hold (callable_obj_t * c ) { c->_state = CALL_STATE_HOLD; - calltree_update_call(current_calls,c); + calltree_update_call(current_calls, c, NULL); update_menus(); } @@ -131,7 +131,7 @@ sflphone_hold (callable_obj_t * c ) sflphone_ringing(callable_obj_t * c ) { c->_state = CALL_STATE_RINGING; - calltree_update_call(current_calls,c); + calltree_update_call(current_calls, c, NULL); update_menus(); } @@ -301,7 +301,7 @@ sflphone_hang_up() break; } } - calltree_update_call( history , selectedCall ); + calltree_update_call(history, selectedCall, NULL); } @@ -321,7 +321,7 @@ sflphone_pick_up() break; case CALL_STATE_INCOMING: selectedCall->_history_state = INCOMING; - calltree_update_call( history , selectedCall ); + calltree_update_call( history, selectedCall, NULL); dbus_accept (selectedCall); DEBUG("from sflphone_pick_up : "); stop_notification(); break; @@ -404,7 +404,7 @@ sflphone_off_hold () sflphone_fail( callable_obj_t * c ) { c->_state = CALL_STATE_FAILURE; - calltree_update_call(current_calls,c); + calltree_update_call(current_calls, c, NULL); update_menus(); } @@ -412,7 +412,7 @@ sflphone_fail( callable_obj_t * c ) sflphone_busy( callable_obj_t * c ) { c->_state = CALL_STATE_BUSY; - calltree_update_call(current_calls, c); + calltree_update_call(current_calls, c, NULL); update_menus(); } @@ -422,7 +422,7 @@ sflphone_current( callable_obj_t * c ) if( c->_state != CALL_STATE_HOLD ) set_timestamp (&c->_time_start); c->_state = CALL_STATE_CURRENT; - calltree_update_call(current_calls,c); + calltree_update_call(current_calls, c, NULL); update_menus(); } @@ -432,7 +432,7 @@ sflphone_record( callable_obj_t * c ) if( c->_state != CALL_STATE_HOLD ) set_timestamp (&c->_time_start); c->_state = CALL_STATE_RECORD; - calltree_update_call(current_calls,c); + calltree_update_call(current_calls, c, NULL); update_menus(); } @@ -444,7 +444,7 @@ sflphone_set_transfert() { c->_state = CALL_STATE_TRANSFERT; c->_trsft_to = g_strdup(""); - calltree_update_call(current_calls,c); + calltree_update_call(current_calls, c, NULL); update_menus(); } toolbar_update_buttons(); @@ -458,7 +458,7 @@ sflphone_unset_transfert() { c->_state = CALL_STATE_CURRENT; c->_trsft_to = g_strdup(""); - calltree_update_call(current_calls,c); + calltree_update_call(current_calls, c, NULL); update_menus(); } toolbar_update_buttons(); @@ -517,7 +517,7 @@ process_dialing(callable_obj_t * c, guint keyval, gchar * key) g_free(before); DEBUG("TO: backspace %s", c->_peer_number); } - calltree_update_call(current_calls,c); + calltree_update_call(current_calls, c, NULL); } else if(strlen(c->_peer_number) == 0) { @@ -552,7 +552,7 @@ process_dialing(callable_obj_t * c, guint keyval, gchar * key) //g_free(c->_peer_name); //c->_peer_name = g_strconcat("\"\" <", c->_peer_number, ">", NULL); } - calltree_update_call(current_calls,c); + calltree_update_call(current_calls, c, NULL); } break; } @@ -622,7 +622,7 @@ sflphone_keypad( guint keyval, gchar * key) case 65307: /* ESCAPE */ dbus_hang_up(c); set_timestamp (&c->_time_stop); - calltree_update_call( history , c ); + calltree_update_call(history, c, NULL); break; default: // To play the dtmf when calling mail box for instance @@ -645,7 +645,7 @@ sflphone_keypad( guint keyval, gchar * key) case 65293: /* ENTER */ case 65421: /* ENTER numpad */ c->_history_state = INCOMING; - calltree_update_call( history , c ); + calltree_update_call(history, c, NULL); dbus_accept(c); DEBUG("from sflphone_keypad ( enter ) : "); stop_notification(); break; @@ -695,7 +695,7 @@ sflphone_keypad( guint keyval, gchar * key) case 65307: /* ESCAPE */ dbus_hang_up(c); //c->_stop = 0; - calltree_update_call( history , c ); + calltree_update_call(history, c, NULL); break; } break; @@ -880,7 +880,7 @@ sflphone_rec_call() WARN("Should not happen in sflphone_off_hold ()!"); break; } - calltree_update_call(current_calls,selectedCall); + calltree_update_call(current_calls, selectedCall, NULL); update_menus(); // gchar* codname = sflphone_get_current_codec_name(); diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index c9b4befcb0b6f3fe9bfb20ede267a4a23324b58b..d3da89f32a9cc3523d24f4c9915a631454951cc1 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -346,7 +346,7 @@ calltree_remove_call (calltab_t* tab, callable_obj_t * c) } void -calltree_update_call (calltab_t* tab, callable_obj_t * c) + calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent) { GdkPixbuf *pixbuf=NULL; GtkTreeIter iter; @@ -354,12 +354,21 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c) callable_obj_t * iterCall; GtkTreeStore* store = tab->store; - int nbChild = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), NULL); + + int nbChild = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), parent); int i; + for( i = 0; i < nbChild; i++) { - if(gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &iter, NULL, i)) + + if(gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &iter, parent, i)) { + + if(gtk_tree_model_iter_has_child(GTK_TREE_MODEL(store), &iter)) + { + calltree_update_call (tab, c, &iter); + } + val.g_type = 0; gtk_tree_model_get_value (GTK_TREE_MODEL(store), &iter, 2, &val); @@ -647,7 +656,8 @@ void calltree_add_conference (calltab_t* tab, const conference_obj_t* conf) // New call in the list gchar * description; - description = g_markup_printf_escaped("<b>%s</b>", conf->_confID); + // description = g_markup_printf_escaped("<b>%s</b>", conf->_confID); + description = g_markup_printf_escaped("<b>%s</b>", ""); gtk_tree_store_prepend (tab->store, &iter, NULL); diff --git a/sflphone-client-gnome/src/contacts/calltree.h b/sflphone-client-gnome/src/contacts/calltree.h index 3e3d1aed0d233450a5f8045b7f64a89d532fbb78..111fc519d227a1f1e49a7a4d50c0284833480270 100644 --- a/sflphone-client-gnome/src/contacts/calltree.h +++ b/sflphone-client-gnome/src/contacts/calltree.h @@ -47,7 +47,7 @@ calltree_add_call (calltab_t* ct, callable_obj_t * c, GtkTreeIter *parent); * @param c The call to update */ void -calltree_update_call (calltab_t* ct, callable_obj_t * c); +calltree_update_call (calltab_t* ct, callable_obj_t * c, GtkTreeIter *parent); /** * Remove a call from the call tree diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index db62bc33f0c7ad9302b6c34908e0ffc72cdd6b3d..0c63c869b8825649a3f2b8cfb4cbf339deffb83d 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -124,11 +124,11 @@ call_state_cb (DBusGProxy *proxy UNUSED, // peer hung up, the conversation was established, so _stop has been initialized with the current time value DEBUG("call state current"); set_timestamp (&c->_time_stop); - calltree_update_call( history, c ); + calltree_update_call( history, c, NULL); } stop_notification(); sflphone_hung_up (c); - calltree_update_call( history, c ); + calltree_update_call( history, c, NULL ); status_bar_display_account(); } else if ( strcmp(state, "UNHOLD_CURRENT") == 0 ) diff --git a/sflphone-client-gnome/src/menus.c b/sflphone-client-gnome/src/menus.c index ba9ec4b24fc0b30e6f85ef89697c62f71fcfcd24..558137c5165de2006b84516563f43e601b5c7063 100644 --- a/sflphone-client-gnome/src/menus.c +++ b/sflphone-client-gnome/src/menus.c @@ -459,7 +459,7 @@ edit_paste ( void * foo UNUSED) { selectedCall->_peer_info = g_strconcat("\"\" <", selectedCall->_peer_number, ">", NULL); } - calltree_update_call(current_calls, selectedCall); + calltree_update_call(current_calls, selectedCall, NULL); } break; case CALL_STATE_RINGING: @@ -476,7 +476,7 @@ edit_paste ( void * foo UNUSED) selectedCall->_peer_info = g_strconcat("\"\" <", selectedCall->_peer_number, ">", NULL); - calltree_update_call(current_calls, selectedCall); + calltree_update_call(current_calls, selectedCall, NULL); } break; case CALL_STATE_CURRENT: @@ -492,7 +492,7 @@ edit_paste ( void * foo UNUSED) gchar * temp = g_strconcat(selectedCall->_peer_number, oneNo, NULL); selectedCall->_peer_info = get_peer_info (temp, selectedCall->_peer_name); // g_free(temp); - calltree_update_call(current_calls, selectedCall); + calltree_update_call(current_calls, selectedCall, NULL); } } @@ -511,7 +511,7 @@ edit_paste ( void * foo UNUSED) g_free(selectedCall->_peer_info); selectedCall->_peer_info = g_strconcat("\"\" <", selectedCall->_peer_number, ">", NULL); - calltree_update_call(current_calls,selectedCall); + calltree_update_call(current_calls, selectedCall, NULL); } }