Commit 62c2ba01 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

GTK bug fix: ESC key hang up outgoing call when ringing

The bug was due to the fact that the dtmf info was send
parent 46c72c2d
...@@ -413,7 +413,6 @@ call_t * sflphone_new_call() ...@@ -413,7 +413,6 @@ call_t * sflphone_new_call()
void void
sflphone_keypad( guint keyval, gchar * key) sflphone_keypad( guint keyval, gchar * key)
{ {
dbus_play_dtmf(key);
call_t * c = call_get_selected(); call_t * c = call_get_selected();
if(c) if(c)
{ {
...@@ -421,13 +420,14 @@ sflphone_keypad( guint keyval, gchar * key) ...@@ -421,13 +420,14 @@ sflphone_keypad( guint keyval, gchar * key)
switch(c->state) switch(c->state)
{ {
case CALL_STATE_DIALING: // Currently dialing => edit number case CALL_STATE_DIALING: // Currently dialing => edit number
dbus_play_dtmf(key);
process_dialing(c, keyval, key); process_dialing(c, keyval, key);
break; break;
case CALL_STATE_CURRENT: case CALL_STATE_CURRENT:
switch (keyval) switch (keyval)
{ {
case 65307: /* ESCAPE */ case 65307: /* ESCAPE */
sflphone_hang_up(c); dbus_hang_up(c);
break; break;
default: // TODO should this be here? default: // TODO should this be here?
dbus_play_dtmf(key); dbus_play_dtmf(key);
...@@ -463,7 +463,7 @@ sflphone_keypad( guint keyval, gchar * key) ...@@ -463,7 +463,7 @@ sflphone_keypad( guint keyval, gchar * key)
dbus_transfert(c); dbus_transfert(c);
break; break;
case 65307: /* ESCAPE */ case 65307: /* ESCAPE */
sflphone_hang_up(c); sflphone_unset_transfert(c);
break; break;
default: // When a call is on transfert, typing new numbers will add it to c->to default: // When a call is on transfert, typing new numbers will add it to c->to
process_dialing(c, keyval, key); process_dialing(c, keyval, key);
...@@ -491,8 +491,7 @@ sflphone_keypad( guint keyval, gchar * key) ...@@ -491,8 +491,7 @@ sflphone_keypad( guint keyval, gchar * key)
switch (keyval) switch (keyval)
{ {
case 65307: /* ESCAPE */ case 65307: /* ESCAPE */
//dbus_hang_up(c); dbus_hang_up(c);
sflphone_hang_up(c);
break; break;
} }
break; break;
...@@ -502,6 +501,7 @@ sflphone_keypad( guint keyval, gchar * key) ...@@ -502,6 +501,7 @@ sflphone_keypad( guint keyval, gchar * key)
} }
else else
{ // Not in a call, not dialing, create a new call { // Not in a call, not dialing, create a new call
dbus_play_dtmf(key);
switch (keyval) switch (keyval)
{ {
case 65293: /* ENTER */ case 65293: /* ENTER */
......
...@@ -72,15 +72,6 @@ call_button( GtkWidget *widget, gpointer data ) ...@@ -72,15 +72,6 @@ call_button( GtkWidget *widget, gpointer data )
sflphone_new_call(); sflphone_new_call();
} }
/**
* Pick up
*/
/* static void
pick_up( GtkWidget *widget, gpointer data )
{
sflphone_pick_up();
}*/
/** /**
* Hang up the line * Hang up the line
*/ */
...@@ -177,7 +168,6 @@ toolbar_update_buttons () ...@@ -177,7 +168,6 @@ toolbar_update_buttons ()
break; break;
case CALL_STATE_DIALING: case CALL_STATE_DIALING:
gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE);
//gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE);
gtk_widget_set_sensitive( GTK_WIDGET(pickupButton), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(pickupButton), TRUE);
g_object_ref(callButton); g_object_ref(callButton);
gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton)); gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton));
...@@ -520,8 +510,6 @@ update_call_tree (call_t * c) ...@@ -520,8 +510,6 @@ update_call_tree (call_t * c)
} }
toolbar_update_buttons(); toolbar_update_buttons();
//return row_ref;
} }
void void
...@@ -572,9 +560,7 @@ update_call_tree_add (call_t * c) ...@@ -572,9 +560,7 @@ update_call_tree_add (call_t * c)
if (pixbuf != NULL) if (pixbuf != NULL)
g_object_unref(G_OBJECT(pixbuf)); g_object_unref(G_OBJECT(pixbuf));
//g_free(markup);
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
gtk_tree_selection_select_iter(GTK_TREE_SELECTION(sel), &iter); gtk_tree_selection_select_iter(GTK_TREE_SELECTION(sel), &iter);
toolbar_update_buttons(); toolbar_update_buttons();
//return row_ref;
} }
Supports Markdown
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