Commit e99b4bed authored by Julien Bonjean's avatar Julien Bonjean

Fix keypad use when in history or contact

parent a9036eb2
......@@ -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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment