Commit 1479ec6d authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

GTK GUI: improve backspace key behaviour

Hangup if NO number have been dialed, except if call->CALL_STATE_TRANSFERT
parent 02822757
......@@ -358,7 +358,7 @@ void process_dialing(call_t * c, guint keyval, gchar * key)
case 65288: /* BACKSPACE */
{ /* Brackets mandatory because of local vars */
gchar * before = c->to;
if(strlen(c->to) > 1){
if(strlen(c->to) >= 1){
c->to = g_strndup(c->to, strlen(c->to) -1);
g_free(before);
g_print("TO: %s\n", c->to);
......@@ -371,8 +371,9 @@ void process_dialing(call_t * c, guint keyval, gchar * key)
//screen_set_call(c);
update_call_tree(c);
}
else if(strlen(c->to) == 1)
else if(strlen(c->to) == 0)
{
if(c->state != CALL_STATE_TRANSFERT)
dbus_hang_up(c);
}
}
......
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