gnome: clean up ringmainwindow.cpp

Define custom widgets in separate files and move
commonly used functions to utils:
- moved get_index_from_selection() to utils/models
- moved place_new_call() to utils/calling
- moved the contacts treeview to contactsview
- moved the history treeview to historyview

Refs #71530

Change-Id: Ia20e8d3bc3cfe997d38c880854205f063f0244a0
diff --git a/src/accountview.cpp b/src/accountview.cpp
index 48051da..95565f8 100644
--- a/src/accountview.cpp
+++ b/src/accountview.cpp
@@ -43,6 +43,7 @@
 #include "accountvideotab.h"
 #include "dialogs.h"
 #include <glib/gprintf.h>
+#include "utils/models.h"
 
 struct _AccountView
 {
@@ -97,19 +98,6 @@
     G_OBJECT_CLASS(account_view_parent_class)->finalize(object);
 }
 
-static QModelIndex
-get_index_from_selection(GtkTreeSelection *selection)
-{
-    GtkTreeIter iter;
-    GtkTreeModel *model = NULL;
-
-    if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
-        return gtk_q_tree_model_get_source_idx(GTK_Q_TREE_MODEL(model), &iter);
-    } else {
-        return QModelIndex();
-    }
-}
-
 static void
 update_account_model_selection(GtkTreeSelection *selection, G_GNUC_UNUSED gpointer user_data)
 {