[gnome-bluetooth/wip/hadess/function-removal: 1/5] lib: Remove bluetooth_client_get_adapter_model()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/function-removal: 1/5] lib: Remove bluetooth_client_get_adapter_model()
- Date: Thu, 18 Nov 2021 17:02:34 +0000 (UTC)
commit 964c2e6e246253a35b6cf39114fa9c3f272410b0
Author: Bastien Nocera <hadess hadess net>
Date: Thu Nov 18 15:51:49 2021 +0100
lib: Remove bluetooth_client_get_adapter_model()
.../gnome-bluetooth-sections.txt | 1 -
lib/bluetooth-client.c | 62 ----------------------
lib/bluetooth-client.h | 1 -
lib/gnome-bluetooth.map | 1 -
4 files changed, 65 deletions(-)
---
diff --git a/docs/reference/libgnome-bluetooth/gnome-bluetooth-sections.txt
b/docs/reference/libgnome-bluetooth/gnome-bluetooth-sections.txt
index ef59c2a6..4f4b0e20 100644
--- a/docs/reference/libgnome-bluetooth/gnome-bluetooth-sections.txt
+++ b/docs/reference/libgnome-bluetooth/gnome-bluetooth-sections.txt
@@ -4,7 +4,6 @@
BluetoothClient
bluetooth_client_connect_service
bluetooth_client_connect_service_finish
-bluetooth_client_get_adapter_model
bluetooth_client_get_device_model
bluetooth_client_get_model
bluetooth_client_new
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index d59b0c66..e1268c86 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -1202,68 +1202,6 @@ GtkTreeModel *bluetooth_client_get_model (BluetoothClient *client)
return model;
}
-/**
- * bluetooth_client_get_filter_model:
- * @client: a #BluetoothClient object
- * @func: a #GtkTreeModelFilterVisibleFunc
- * @data: user data to pass to gtk_tree_model_filter_set_visible_func()
- * @destroy: a destroy function for gtk_tree_model_filter_set_visible_func()
- *
- * Returns a #GtkTreeModelFilter of devices filtered using the @func, @data and @destroy arguments to pass
to gtk_tree_model_filter_set_visible_func().
- *
- * Return value: (transfer full): a #GtkTreeModel object.
- **/
-static GtkTreeModel *
-bluetooth_client_get_filter_model (BluetoothClient *client,
- GtkTreeModelFilterVisibleFunc func,
- gpointer data,
- GDestroyNotify destroy)
-{
- GtkTreeModel *model;
-
- g_return_val_if_fail (BLUETOOTH_IS_CLIENT (client), NULL);
-
- model = gtk_tree_model_filter_new(GTK_TREE_MODEL(client->store), NULL);
-
- gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(model),
- func, data, destroy);
-
- return model;
-}
-
-static gboolean adapter_filter(GtkTreeModel *model,
- GtkTreeIter *iter, gpointer user_data)
-{
- GDBusProxy *proxy;
- gboolean active;
-
- gtk_tree_model_get(model, iter, BLUETOOTH_COLUMN_PROXY, &proxy, -1);
-
- if (proxy == NULL)
- return FALSE;
-
- active = g_str_equal(BLUEZ_ADAPTER_INTERFACE,
- g_dbus_proxy_get_interface_name(proxy));
-
- g_object_unref(proxy);
-
- return active;
-}
-
-/**
- * bluetooth_client_get_adapter_model:
- * @client: a #BluetoothClient object
- *
- * Returns a #GtkTreeModelFilter with only adapters present.
- *
- * Return value: (transfer full): a #GtkTreeModel object.
- **/
-GtkTreeModel *bluetooth_client_get_adapter_model (BluetoothClient *client)
-{
- return bluetooth_client_get_filter_model (client, adapter_filter,
- NULL, NULL);
-}
-
/**
* bluetooth_client_get_device_model:
* @client: a #BluetoothClient object
diff --git a/lib/bluetooth-client.h b/lib/bluetooth-client.h
index 15fddce1..621c162d 100644
--- a/lib/bluetooth-client.h
+++ b/lib/bluetooth-client.h
@@ -34,7 +34,6 @@ BluetoothClient *bluetooth_client_new(void);
GtkTreeModel *bluetooth_client_get_model(BluetoothClient *client);
-GtkTreeModel *bluetooth_client_get_adapter_model(BluetoothClient *client);
GtkTreeModel *bluetooth_client_get_device_model(BluetoothClient *client);
void bluetooth_client_connect_service (BluetoothClient *client,
diff --git a/lib/gnome-bluetooth.map b/lib/gnome-bluetooth.map
index 7ec1912e..9c1a9b55 100644
--- a/lib/gnome-bluetooth.map
+++ b/lib/gnome-bluetooth.map
@@ -8,7 +8,6 @@ global:
bluetooth_client_get_type;
bluetooth_client_new;
bluetooth_client_get_model;
- bluetooth_client_get_adapter_model;
bluetooth_client_get_device_model;
bluetooth_client_connect_service;
bluetooth_client_connect_service_finish;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]