Skip to content
Snippets Groups Projects
Commit de07d5a9 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

History - Add missed calls in history

parent 49aa761b
No related branches found
No related tags found
No related merge requests found
......@@ -227,14 +227,10 @@ sflphone_hang_up()
case CALL_STATE_FAILURE:
dbus_hang_up (selectedCall);
selectedCall->state = CALL_STATE_DIALING;
//call_list_add(history, selectedCall);
//update_call_tree_add(history, selectedCall);
break;
case CALL_STATE_INCOMING:
dbus_refuse (selectedCall);
selectedCall->state = CALL_STATE_DIALING;
//call_list_add(history, selectedCall);
//update_call_tree_add(history, selectedCall);
break;
case CALL_STATE_TRANSFERT:
dbus_hang_up (selectedCall);
......@@ -372,7 +368,7 @@ sflphone_unset_transfert()
void
sflphone_incoming_call (call_t * c)
{
c->history_state = INCOMING;
c->history_state = MISSED;
call_list_add ( current_calls, c );
call_list_add( history, c );
update_call_tree_add( current_calls , c );
......@@ -464,7 +460,6 @@ sflphone_new_call()
c->to = g_strdup("");
call_list_add(current_calls,c);
update_call_tree_add(current_calls,c);
update_menus();
......@@ -512,7 +507,8 @@ sflphone_keypad( guint keyval, gchar * key)
{
case 65293: /* ENTER */
case 65421: /* ENTER numpad */
//status_bar_display_account(c);
c->history_state = INCOMING;
update_call_tree( history , c );
dbus_accept(c);
break;
case 65307: /* ESCAPE */
......
......@@ -543,7 +543,8 @@ update_call_tree (calltab_t* tab, call_t * c)
call_get_number(c));
}
if( tab == current_calls )
{
switch(c->state)
{
case CALL_STATE_HOLD:
......@@ -556,14 +557,7 @@ update_call_tree (calltab_t* tab, call_t * c)
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/current.svg", NULL);
break;
case CALL_STATE_DIALING:
if( c->history_state == INCOMING )
pixbuf = gdk_pixbuf_new_from_file( ICONS_DIR "/incoming.svg", NULL);
else if( c->history_state == OUTGOING )
pixbuf = gdk_pixbuf_new_from_file( ICONS_DIR "/outgoing.svg", NULL);
else if( c->history_state == MISSED )
pixbuf = gdk_pixbuf_new_from_file( ICONS_DIR "/missed.svg", NULL);
else
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/dial.svg", NULL);
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/dial.svg", NULL);
break;
case CALL_STATE_FAILURE:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/fail.svg", NULL);
......@@ -577,8 +571,10 @@ update_call_tree (calltab_t* tab, call_t * c)
default:
g_warning("Should not happen!");
}
/*switch(c->history_state)
}
else
{
switch(c->history_state)
{
case OUTGOING:
g_print("Outgoing state\n");
......@@ -588,10 +584,15 @@ update_call_tree (calltab_t* tab, call_t * c)
g_print("Incoming state\n");
pixbuf = gdk_pixbuf_new_from_file( ICONS_DIR "/incoming.svg", NULL);
break;
case MISSED:
g_print("Missed state\n");
pixbuf = gdk_pixbuf_new_from_file( ICONS_DIR "/missed.svg", NULL);
break;
default:
g_print("No history state\n");
break;
}*/
}
}
//Resize it
if(pixbuf)
{
......@@ -651,7 +652,6 @@ update_call_tree_add (calltab_t* tab, call_t * c)
}
}
else{
//pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/incoming.svg", NULL);
switch(c->history_state)
{
case INCOMING:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment