Skip to content
Snippets Groups Projects
Commit e99b4bed authored by Julien Bonjean's avatar Julien Bonjean
Browse files

Fix keypad use when in history or contact

parent a9036eb2
No related branches found
No related tags found
No related merge requests found
......@@ -555,10 +555,27 @@ sflphone_new_call()
void
sflphone_keypad( guint keyval, gchar * key)
{
call_t * c = call_get_selected(current_calls);
if(c)
if((active_calltree != current_calls) || (active_calltree == current_calls && !c))
{
// Not in a call, not dialing, create a new call
//dbus_play_dtmf(key);
switch (keyval)
{
case 65293: /* ENTER */
case 65421: /* ENTER numpad */
case 65307: /* ESCAPE */
break;
default:
switch_tab(current_calls);
process_dialing(sflphone_new_call(), keyval, key);
break;
}
}
else if(c)
{
printf("call\n");
switch(c->state)
{
case CALL_STATE_DIALING: // Currently dialing => edit number
......@@ -652,23 +669,6 @@ sflphone_keypad( guint keyval, gchar * key)
break;
}
}
else
{ // Not in a call, not dialing, create a new call
//dbus_play_dtmf(key);
switch (keyval)
{
case 65293: /* ENTER */
case 65421: /* ENTER numpad */
case 65307: /* ESCAPE */
break;
default:
switch_tab(current_calls);
process_dialing(sflphone_new_call(), keyval, key);
break;
}
}
}
/*
......
......@@ -175,6 +175,7 @@ toggle_current_calls(GtkToggleToolButton *toggle_tool_button UNUSED,
gtk_widget_hide(history->tree);
gtk_widget_hide(contacts->tree);
gtk_widget_show(current_calls->tree);
printf("current calls toggle\n");
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (active_calltree->view));
g_signal_emit_by_name(sel, "changed");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment