Commit 1564bba8 authored by Stepan Salenikovich's avatar Stepan Salenikovich Committed by Guillaume Roguez

gnome: lose entry focus after call entered

To be able to enter DTMF tones right after call has started
the search entry needs to lose focus.

Also clear the entry if autocompletion has been selected.

Refs #71632

Change-Id: I7854ad9bb1a83ff7cf1a05f4f7d4391a0e3e6bdd
parent 447f4a7f
......@@ -302,6 +302,9 @@ search_entry_placecall(G_GNUC_UNUSED GtkWidget *entry, gpointer win)
QModelIndex idx = CallModel::instance()->getIndex(call);
CallModel::instance()->selectionModel()->setCurrentIndex(idx, QItemSelectionModel::ClearAndSelect);
}
/* move focus away from entry so that DTMF tones can be entered via the keyboard */
gtk_widget_child_focus(GTK_WIDGET(win), GTK_DIR_TAB_FORWARD);
}
static void
......@@ -816,6 +819,12 @@ select_autocompletion(G_GNUC_UNUSED GtkEntryCompletion *widget,
if (idx.isValid()) {
ContactMethod *n = priv->q_completion_model->number(idx);
place_new_call(n);
/* clear the entry */
gtk_entry_set_text(GTK_ENTRY(priv->search_entry), "");
/* move focus away from entry so that DTMF tones can be entered via the keyboard */
gtk_widget_child_focus(GTK_WIDGET(win), GTK_DIR_TAB_FORWARD);
} else {
g_warning("autocompletion selection is not a valid index!");
}
......
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