[gnome-bluetooth] lib: Remove private bluetooth_chooser_get_type_column()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] lib: Remove private bluetooth_chooser_get_type_column()
- Date: Tue, 18 Oct 2011 15:56:21 +0000 (UTC)
commit 51d3dd813add9bf864729b71e6c10c057ef4e6b5
Author: Bastien Nocera <hadess hadess net>
Date: Tue Oct 18 16:22:28 2011 +0100
lib: Remove private bluetooth_chooser_get_type_column()
Which was only used in the properties panel. Replaced by a
more generic "show-device-type-column" property.
lib/bluetooth-chooser-private.h | 1 -
lib/bluetooth-chooser.c | 28 ++++++++++++----------------
2 files changed, 12 insertions(+), 17 deletions(-)
---
diff --git a/lib/bluetooth-chooser-private.h b/lib/bluetooth-chooser-private.h
index a17e9a2..cb02ca5 100644
--- a/lib/bluetooth-chooser-private.h
+++ b/lib/bluetooth-chooser-private.h
@@ -32,7 +32,6 @@ G_BEGIN_DECLS
GtkTreeModel *bluetooth_chooser_get_model (BluetoothChooser *self);
GtkTreeViewColumn *bluetooth_chooser_get_device_column (BluetoothChooser *self);
-GtkTreeViewColumn *bluetooth_chooser_get_type_column (BluetoothChooser *self);
GtkWidget *bluetooth_chooser_get_treeview (BluetoothChooser *self);
GtkWidget *bluetooth_chooser_get_scrolled_window (BluetoothChooser *self);
gboolean bluetooth_chooser_remove_selected_device (BluetoothChooser *self);
diff --git a/lib/bluetooth-chooser.c b/lib/bluetooth-chooser.c
index c11504c..5ba7ff0 100644
--- a/lib/bluetooth-chooser.c
+++ b/lib/bluetooth-chooser.c
@@ -414,22 +414,6 @@ bluetooth_chooser_get_device_column (BluetoothChooser *self)
}
/**
- * bluetooth_chooser_get_type_column:
- * @self: A #BluetoothChooser widget.
- *
- * Returns a #GtkTreeViewColumn object to the type column of the #BluetoothChooser.
- *
- * Return value: a #GtkTreeViewColumn object.
- **/
-GtkTreeViewColumn *
-bluetooth_chooser_get_type_column (BluetoothChooser *self)
-{
- BluetoothChooserPrivate *priv = BLUETOOTH_CHOOSER_GET_PRIVATE(self);
-
- return gtk_tree_view_get_column (GTK_TREE_VIEW (priv->treeview), 1);
-}
-
-/**
* bluetooth_chooser_get_treeview:
* @self: A #BluetoothChooser widget.
*
@@ -965,6 +949,7 @@ enum {
PROP_SHOW_CONNECTED,
PROP_SHOW_SEARCHING,
PROP_SHOW_DEVICE_TYPE,
+ PROP_SHOW_DEVICE_TYPE_COLUMN,
PROP_SHOW_DEVICE_CATEGORY,
PROP_DEVICE_TYPE_FILTER,
PROP_DEVICE_CATEGORY_FILTER,
@@ -1041,6 +1026,10 @@ bluetooth_chooser_set_property (GObject *object, guint prop_id,
g_object_set (G_OBJECT (priv->filters_vbox), "visible", FALSE, NULL);
}
break;
+ case PROP_SHOW_DEVICE_TYPE_COLUMN:
+ gtk_tree_view_column_set_visible (gtk_tree_view_get_column (GTK_TREE_VIEW (priv->treeview), 1),
+ g_value_get_boolean (value));
+ break;
case PROP_SHOW_DEVICE_CATEGORY:
priv->show_device_category = g_value_get_boolean (value);
if (priv->internal_filter) {
@@ -1097,6 +1086,10 @@ bluetooth_chooser_get_property (GObject *object, guint prop_id,
case PROP_SHOW_DEVICE_TYPE:
g_value_set_boolean (value, priv->show_device_type);
break;
+ case PROP_SHOW_DEVICE_TYPE_COLUMN:
+ g_value_set_boolean (value,
+ gtk_tree_view_column_get_visible (gtk_tree_view_get_column (GTK_TREE_VIEW (priv->treeview), 1)));
+ break;
case PROP_SHOW_DEVICE_CATEGORY:
g_value_set_boolean (value, priv->show_device_category);
break;
@@ -1190,6 +1183,9 @@ bluetooth_chooser_class_init (BluetoothChooserClass *klass)
PROP_SHOW_DEVICE_TYPE, g_param_spec_boolean ("show-device-type",
"show-device-type", "Whether to show the device type filter", TRUE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (G_OBJECT_CLASS(klass),
+ PROP_SHOW_DEVICE_TYPE_COLUMN, g_param_spec_boolean ("show-device-type-column",
+ "show-device-type-column", "Whether to show the device type column", TRUE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ g_object_class_install_property (G_OBJECT_CLASS(klass),
PROP_SHOW_DEVICE_CATEGORY, g_param_spec_boolean ("show-device-category",
"show-device-category", "Whether to show the device category filter", TRUE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
for (i = 0, max_filter_val = 0 ; i < _BLUETOOTH_TYPE_NUM_TYPES; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]