[gnome-bluetooth/wip/hadess/function-removal: 5/5] lib: Remove bluetooth_client_get_device_model()




commit 7c4aed4548f7febf00e29fb2b920c9475e606ce9
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Nov 18 17:38:45 2021 +0100

    lib: Remove bluetooth_client_get_device_model()

 lib/bluetooth-client.c | 46 ----------------------------------------------
 lib/bluetooth-client.h |  2 --
 2 files changed, 48 deletions(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index e1268c86..83b73836 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -1202,52 +1202,6 @@ GtkTreeModel *bluetooth_client_get_model (BluetoothClient *client)
        return model;
 }
 
-/**
- * bluetooth_client_get_device_model:
- * @client: a #BluetoothClient object
- *
- * Returns a #GtkTreeModelFilter with only devices belonging to the default adapter listed.
- * Note that the model will follow a specific adapter, and will not follow the default adapter.
- * Also note that due to the way #GtkTreeModelFilter works, you will probably want to
- * monitor signals on the "child-model" #GtkTreeModel to monitor for changes.
- *
- * Return value: (transfer full): a #GtkTreeModel object.
- **/
-GtkTreeModel *bluetooth_client_get_device_model (BluetoothClient *client)
-{
-       GtkTreeModel *model;
-       GtkTreePath *path;
-       GtkTreeIter iter;
-       gboolean cont, found = FALSE;
-
-       g_return_val_if_fail (BLUETOOTH_IS_CLIENT (client), NULL);
-
-       cont = gtk_tree_model_get_iter_first (GTK_TREE_MODEL(client->store), &iter);
-
-       while (cont == TRUE) {
-               gboolean is_default;
-
-               gtk_tree_model_get (GTK_TREE_MODEL(client->store), &iter,
-                                   BLUETOOTH_COLUMN_DEFAULT, &is_default, -1);
-
-               if (is_default == TRUE) {
-                       found = TRUE;
-                       break;
-               }
-
-               cont = gtk_tree_model_iter_next (GTK_TREE_MODEL(client->store), &iter);
-       }
-
-       if (found == TRUE) {
-               path = gtk_tree_model_get_path (GTK_TREE_MODEL(client->store), &iter);
-               model = gtk_tree_model_filter_new (GTK_TREE_MODEL(client->store), path);
-               gtk_tree_path_free (path);
-       } else
-               model = NULL;
-
-       return model;
-}
-
 typedef struct {
        BluetoothClientSetupFunc func;
        BluetoothClient *client;
diff --git a/lib/bluetooth-client.h b/lib/bluetooth-client.h
index 621c162d..85706c68 100644
--- a/lib/bluetooth-client.h
+++ b/lib/bluetooth-client.h
@@ -34,8 +34,6 @@ BluetoothClient *bluetooth_client_new(void);
 
 GtkTreeModel *bluetooth_client_get_model(BluetoothClient *client);
 
-GtkTreeModel *bluetooth_client_get_device_model(BluetoothClient *client);
-
 void bluetooth_client_connect_service (BluetoothClient     *client,
                                       const char          *path,
                                       gboolean             connect,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]