gnome: adapt to LRC api changes
Refs #71035
Refs #70829
Refs #71781
Change-Id: I3722a62720be1cb4275ed2ae53f16b9dc5d88e07
diff --git a/src/ringmainwindow.cpp b/src/ringmainwindow.cpp
index 828ed19..40351c1 100644
--- a/src/ringmainwindow.cpp
+++ b/src/ringmainwindow.cpp
@@ -688,10 +688,12 @@
/* get the text from the entry */
const gchar *text = gtk_entry_get_text(GTK_ENTRY(search_entry));
- if (text)
- priv->q_completion_model->setPrefix(text);
- else
- priv->q_completion_model->setPrefix(QString());
+ if (text) {
+ /* edit the the dialing call (or create a new one) */
+ Call *call = CallModel::instance()->dialingCall();
+ call->setDialNumber(text);
+ priv->q_completion_model->setCall(call);
+ }
}
static gboolean
@@ -818,7 +820,13 @@
QModelIndex idx = gtk_q_tree_model_get_source_idx(GTK_Q_TREE_MODEL(model), iter);
if (idx.isValid()) {
ContactMethod *n = priv->q_completion_model->number(idx);
- place_new_call(n);
+ /* check if using a specific account */
+ QVariant var_acc = idx.data(NumberCompletionModel::Role::ACCOUNT);
+ Account *acc = var_acc.value<Account *>();
+ if (acc) {
+ g_debug("using account: %s", acc->alias().toUtf8().constData());
+ }
+ place_new_call(n, acc);
/* clear the entry */
gtk_entry_set_text(GTK_ENTRY(priv->search_entry), "");